CLI

Run agents from the command line

Run agents directly from your terminal without writing code.

Diagram

CLI Flow

💻 Terminal

praisonai

🤖 Agent

📤 Result

Quick Start

  1. Install CLI
    bash
    cargo install praisonai-cli
  2. Run an Agent
    bash
    praisonai chat "What is Rust?"
  3. Interactive Mode
    bash
    praisonai
    # > What is Rust?
    # Rust is a systems programming language...
    # > exit

Commands

CommandDescription
praisonai chat <prompt>One-shot chat
praisonaiInteractive mode
praisonai run <file>Run workflow file
praisonai --model <model>Use specific model
praisonai --helpShow help

Examples

With a Specific Model

bash
praisonai --model gpt-4o chat "Explain quantum computing"

Run Workflow File

bash
praisonai run workflow.yaml

Pipe Input

bash
echo "Summarize this" | praisonai chat

Configuration

Set defaults with environment variables:

bash
export OPENAI_API_KEY="your-key"
export PRAISONAI_MODEL="gpt-4o"
export PRAISONAI_VERBOSE="true"

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.


Related