Streaming CLI
Command-line streaming options for agents
Control streaming behaviour when running agents from the command line.
Control streaming behavior when running agents from the command line.
Quick Start
- Simple Usage
bash praisonai-ts chat "Tell me a story" --stream - With Configuration
bash praisonai-ts chat "Tell me a story" --no-stream
Overview
By default, agent responses stream to the terminal in real-time. You can control this behavior with CLI flags.
Commands
Enable Streaming (Default)
praisonai-ts chat "Tell me a story" --streamDisable Streaming
praisonai-ts chat "Tell me a story" --no-streamOptions
| Option | Description | Default |
|---|---|---|
--stream | Enable streaming output | true |
--no-stream | Disable streaming, wait for complete response | false |
--verbose, -v | Show streaming output in terminal | true |
--quiet, -q | Suppress streaming output | false |
Examples
Interactive Streaming
# Stream response as it's generated
praisonai-ts chat "Explain quantum computing in detail" --streamBatch Processing
# Get complete response (better for scripting)
praisonai-ts chat "Summarize this text" --no-stream --jsonSilent Mode
# No streaming output, just final result
praisonai-ts chat "Hello" --quietVerbose Streaming
# Full streaming with debug info
praisonai-ts chat "Hello" --stream --verboseScripting Examples
Capture Streamed Output
#!/bin/bash
# Stream to file
praisonai-ts chat "Write a long story" --stream > story.txt
# Stream and display
praisonai-ts chat "Explain AI" --stream | tee output.txtJSON Output (No Streaming)
# For API-like usage, disable streaming
RESULT=$(praisonai-ts chat "Hello" --no-stream --json)
echo $RESULT | jq '.data.response'Pipeline Usage
# Pipe between commands (streaming disabled automatically)
echo "Summarize this" | praisonai-ts chat --stdin --no-streamEnvironment Variables
# Default streaming behavior
export PRAISON_STREAM=true
# Default verbose behavior
export PRAISON_VERBOSE=trueUse Cases
Interactive Chat
# Best experience for interactive use
praisonai-ts chat "Let's have a conversation" --stream --verboseAutomation Scripts
# Best for scripts and automation
praisonai-ts chat "Process this data" --no-stream --jsonLong-Form Generation
# Stream long content to see progress
praisonai-ts run \
--instructions "You are a writer" \
--task "Write a 2000-word essay" \
--streamSee Also
- Streaming – Streaming in code
- Agent CLI – Agent CLI commands
- Agents CLI – Multi-agent CLI