CLI
Run agents from the command line
Run agents directly from your terminal without writing code.
graph LR
subgraph "CLI Flow"
T[💻 Terminal] --> C[praisonai]
C --> A[🤖 Agent]
A --> R[📤 Result]
end
classDef terminal fill:#6366F1,stroke:#7C90A0,color:#fff
classDef agent fill:#F59E0B,stroke:#7C90A0,color:#fff
classDef result fill:#10B981,stroke:#7C90A0,color:#fff
class T terminal
class C,A agent
class R resultQuick Start
- Install CLI
bash cargo install praisonai-cli - Run an Agent
bash praisonai chat "What is Rust?" - Interactive Mode
bash praisonai # > What is Rust? # Rust is a systems programming language... # > exit
Commands
| Command | Description |
|---|---|
praisonai chat <prompt> | One-shot chat |
praisonai | Interactive mode |
praisonai run <file> | Run workflow file |
praisonai --model <model> | Use specific model |
praisonai --help | Show help |
Examples
With a Specific Model
praisonai --model gpt-4o chat "Explain quantum computing"Run Workflow File
praisonai run workflow.yamlPipe Input
echo "Summarize this" | praisonai chatConfiguration
export OPENAI_API_KEY="your-key"
export RUST_LOG="info" # tracing filterChoose the model with the --model flag — there is no PRAISONAI_MODEL environment variable.
Best Practices
Set API key in environment
Use export OPENAI_API_KEY rather than passing keys inline.
Use workflow files for complex tasks
Define multi-agent workflows in YAML for repeatability.