Real-time streaming allows you to watch AI responses generate live, providing immediate feedback and a more interactive experience. All AI-powered commands in task-o-matic support streaming output.
Streaming uses Server-Sent Events (SSE) to deliver AI responses chunk by chunk as they're generated, rather than waiting for the complete response. This provides:
- Immediate Feedback: See results as they're being generated
- Better UX: No more waiting for long-running AI operations
- Real-time Monitoring: Watch the AI's reasoning process unfold
- Early Termination: Stop operations if you see they're going in the wrong direction
Create a new task with AI enhancement and streaming output:
# Basic task creation with streaming
task-o-matic tasks create --title "Implement user authentication" --ai-enhance --stream
# Task with description and streaming
task-o-matic tasks create \
--title "Add payment integration" \
--content "Integrate Stripe for payment processing" \
--ai-enhance \
--streamEnhance existing tasks with streaming:
# Enhance a specific task with streaming
task-o-matic tasks enhance --task-id abc123 --stream
# Enhance and breakdown with streaming
task-o-matic tasks enhance --task-id abc123 --breakdown --streamGenerate documentation for tasks with streaming:
# Document task with streaming
task-o-matic tasks document --task-id abc123 --stream
# Document with custom template and streaming
task-o-matic tasks document --task-id abc123 --template technical --streamParse PRD files with streaming output:
# Parse PRD with streaming
task-o-matic prd parse --file requirements.md --stream
# Parse PRD with custom prompt and streaming
task-o-matic prd parse \
--file requirements.md \
--prompt-template custom-technical \
--streamRwork PRD content with streaming:
# Rework PRD with streaming
task-o-matic prd rework --content "old PRD content" --stream
# Rework with custom context and streaming
task-o-matic prd rework \
--content "old content" \
--context "Focus on security aspects" \
--streamWhen streaming is enabled, you'll see:
$ task-o-matic tasks create --title "Add user auth" --ai-enhance --stream
🤖 AI Enhancement in progress...
The task "Add user auth" can be enhanced by breaking it down into several subtasks:
1. **User Authentication System Design**
- Define authentication requirements (social login, email/password, etc.)
- Choose authentication framework (NextAuth.js, Auth0, etc.)
- Plan token storage and session management
2. **Database Schema Implementation**
- Create users table with authentication fields
- Set up secure password hashing (bcrypt)
- Design session storage structure
✓ Enhancement complete
Task created successfully: abc123Streaming commands include enhanced error handling:
$ task-o-matic tasks create --title "Complex task" --ai-enhance --stream
🤖 AI Enhancement in progress...
Analyzing task requirements and breaking down into subtasks...
⚠️ Enhancement finished: length
Response was truncated due to length limits, but enhancement was completed.
Task created successfully: def456Use streaming for:
- Long-running AI operations (task enhancement, PRD parsing)
- Interactive development sessions
- Debugging AI responses
- Complex task breakdowns
Skip streaming for:
- Quick operations (task listing, status updates)
- Automated scripts where human monitoring isn't needed
- CI/CD environments
- Bandwidth: Streaming uses slightly more bandwidth due to multiple small requests
- Memory: Lower memory usage as responses are processed incrementally
- CPU: Similar CPU usage to non-streaming operations
1. Stream stops unexpectedly
# This might indicate network issues or API limits
# Try again or check your API configuration
task-o-matic config show2. garbled output
# Ensure your terminal supports UTF-8 encoding
export LANG=en_US.UTF-83. No streaming output
# Verify the --stream flag is properly placed after the command
task-o-matic tasks create --title "Test" --ai-enhance --streamEnable debug mode to see streaming internals:
# Set debug environment variable
export TASK_O_MATIC_DEBUG=true
task-o-matic tasks create --title "Test" --ai-enhance --streamFor automated scripts, you might want to disable streaming:
#!/bin/bash
# Automated task creation script
task-o-matic tasks create \
--title "Automated task" \
--ai-enhance \
# Note: no --stream flag for automated usageMake streaming conditional based on environment:
#!/bin/bash
# Use streaming only in interactive mode
if [ -t 0 ]; then
STREAM_FLAG="--stream"
else
STREAM_FLAG=""
fi
task-o-matic tasks create --title "My task" --ai-enhance $STREAM_FLAGStreaming behavior can be configured through environment variables:
# Enable streaming by default (can be overridden with --no-stream)
export TASK_O_MATIC_DEFAULT_STREAM=true
# Streaming buffer size (characters)
export TASK_O_MATIC_STREAM_BUFFER_SIZE=1024
# Streaming timeout (seconds)
export TASK_O_MATIC_STREAM_TIMEOUT=300- Use Interactive Mode: Streaming works best when you can monitor the output
- Monitor for Errors: Watch for warning messages during streaming operations
- Combine with Logging: Streaming output isn't saved to logs automatically
- Test Without Streaming: Verify commands work before adding --stream flag
- Handle Interruptions: Use Ctrl+C to safely stop streaming operations
# 1. Parse PRD with streaming
task-o-matic prd parse --file product-requirements.md --stream
# 2. Review generated tasks
task-o-matic tasks list
# 3. Enhance specific task with streaming
task-o-matic tasks enhance --task-id task123 --stream
# 4. Document enhanced task with streaming
task-o-matic tasks document --task-id task123 --stream# Create multiple tasks with streaming
for title in "Setup auth" "Create database" "Build UI"; do
task-o-matic tasks create --title "$title" --ai-enhance --stream
doneTip: Streaming is designed for interactive use. For automated scripts, consider omitting the --stream flag for cleaner output.