Skip to main content
The PraisonAI CLI provides powerful commands and flags to interact with AI agents directly from your terminal.

Installation

How CLI Dispatch Works

PraisonAI uses a unified CLI entry point with Typer as the primary dispatcher: When no credentials are configured, both praisonai (bare) and praisonai run check before doing any agent work. In a TTY, the user is offered the setup wizard. In CI or --output json mode, the command exits 1 with a clear error on stderr. See First-run Onboarding for the full behaviour matrix.
PraisonAI now fails loud on CLI registration errors. If you see a new ImportError after upgrading, a Typer subcommand or one of its dependencies failed to import — fix the import rather than ignoring the error.

Unknown Command Guard

A bare single-word token that looks like a mistyped or reserved command fails fast with a hint on stderr and exit code 2, instead of becoming a paid one-shot LLM prompt.

What Triggers It

The guard only fires on a single-word positional that is not a known command, a file path, or a .yaml / .yml file. Anything containing a space stays a natural-language prompt.

The Two Hint Shapes

A reserved verb prints its canonical replacements:
A typo of a known command prints a Did you mean: suggestion via difflib (cutoff 0.8):
The guard is case-insensitivepraisonai SHOW fires the same reserved-verb hint as praisonai show.

The Escape Hatch

For a genuine one-word prompt, use run explicitly:
Or add words so the token contains a space — praisonai "write a poem" still runs as a prompt.

Exit Codes & Output Stream

The hint goes to stderr so it can be redirected separately in scripts, and the check runs before any LLM client is initialised — cost is $0.

Quick Start

Direct Prompt Execution

Direct prompt execution

With Specific Model

With specific model

Verbose Mode

Verbose mode shows execution details

Basic Math Calculation

Basic Math Calculation

Other Examples

Default Tools

The CLI now includes 5 built-in tools by default, giving agents the ability to interact with your filesystem and the web:

Tool Call Tracking

When tools are used, the CLI displays which tools were called:

New CLI Features

CLI Help Panels

--help grouped into 7 stable, categorised panels

Tool Tracking

Real-time tool call tracking and display

Tool Approval

Control tool execution approval with —trust and —approve-level

Slash Commands

Interactive /help, /cost, /model commands

Autonomy Modes

Control AI autonomy: suggest, auto_edit, full_auto

Cost Tracking

Real-time token usage and cost monitoring

Repository Map

Intelligent codebase mapping with tree-sitter

Interactive TUI

Rich terminal interface with completions

Message Queue

Queue messages while agent is processing

Git Integration

Auto-commit with AI messages, diff viewing

Sandbox Execution

Secure isolated command execution

All CLI Features

Deep Research

Automated multi-step research with citations

Planning

Step-by-step task execution with planning

Memory

Persistent agent memory management

Rules

Auto-discovered instructions from .praisonai files

Workflow

Multi-step YAML workflow execution

Hooks

Event-driven actions and callbacks

Claude Memory

Anthropic’s memory tool integration

Guardrail

Validate agent outputs with LLM-based guardrails

Metrics

Track token usage and cost metrics

Image Processing

Process images with vision-based AI agents

Telemetry

Enable usage monitoring and analytics

MCP

Integrate Model Context Protocol servers

Fast Context

Search codebase for relevant context

Knowledge

Manage RAG/vector store knowledge bases

Scheduler

Run agents 24/7 with timeout and cost limits

Session

Manage conversation sessions

Tools

Discover and manage available tools

Handoff

Enable agent-to-agent task delegation

Tracker

Step-by-step execution tracking with quality judging

Auto Memory

Automatic memory extraction and storage

Todo

Manage todo lists from tasks

Router

Smart model selection based on task complexity

Flow Display

Visual workflow tracking

Query Rewrite

RAG query optimization

Prompt Expansion

Expand prompts with detailed context

Prompt Caching

Cache prompts for cost reduction

Web Search

Real-time web search integration

Web Fetch

Fetch and process URL content

Docs

Manage project documentation

Mentions

Reference files and context with @mentions

AI Commit

AI-generated commit messages

Serve

Run agents as API server

n8n Integration

Import n8n workflows

Agent Skills

Manage modular skills for agents

Complete CLI Reference

Core Flags

Interactive Mode

Tool Approval & Safety

Planning & Memory

Tools & Extensions

--tools accepts either a comma-separated list of tool names or a tools.py file path. Names go through the same ToolResolver chain as YAML and Python, so a name unknown to every source prints Warning: Unknown tool '<name>' and is skipped. Loading a local tools.py file still requires PRAISONAI_ALLOW_LOCAL_TOOLS=true. Run praisonai tools list to see resolvable names.

Context & Prompts

Monitoring & Display

Server & Deployment

Note: As of PR #1713, --deploy --schedule invokes the real DeployHandler (previously a stub). Combine with --provider {gcp,aws,azure} and --max-retries N. See Scheduler Deployment for details.

Workflow & Integration

Initialization & Setup

Model Providers

Special Modes

Slash Commands (Interactive Mode)

Both direct prompts and interactive mode include 5 built-in tools by default: read_file, write_file, list_files, execute_command, internet_search. Tool usage is automatically tracked and displayed.

Standalone Commands

UI Commands (Browser-Based)

All browser-based UIs are under the ui namespace. Terminal commands (chat, code, tui) never open a browser.

Skills Commands

Global Options

Combining Features

You can combine multiple CLI features for powerful workflows:
Use praisonai --help to see all available options and commands.

CLI Profiling

Profiling is only supported for terminal-native execution commands:
  • praisonai chat "prompt" --profile
  • praisonai code "prompt" --profile
  • praisonai run agents.yaml --profile
Profiling is NOT supported for browser-based UI commands (praisonai ui ...), TUI (praisonai tui), or long-running servers.
Example Output: