> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI Reference

> PraisonAI TypeScript CLI - Complete command reference

The `praisonai-ts` CLI provides a comprehensive interface for interacting with AI agents.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
graph LR
    User([User]) --> CLI[CLI]
    CLI --> Agent[Agent]

    classDef agent fill:#8B0000,stroke:#7C90A0,color:#fff
    classDef tool fill:#189AB4,stroke:#7C90A0,color:#fff

    class Agent agent
    class User,CLI tool
    classDef agent fill:#8B0000,color:#fff
    classDef tool fill:#189AB4,color:#fff

```

## Quick Start

**1. Simple Usage**

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
npm install -g praisonai
praisonai-ts chat "Hello"
```

**2. With Configuration**

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
export OPENAI_API_KEY=your-key
praisonai-ts chat "Explain AI" --model openai/gpt-4o-mini
```

***

***

## All Commands

| Command | Description |
| - | - |
| `chat` | Chat with an AI agent |
| `run` | Run an agent with a task |
| `workflow` | Execute a multi-agent workflow |
| `auto` | Auto-generate agents from topic |
| `research` | Deep research on a topic |
| `image` | Image generation and analysis |
| `providers` | List available LLM providers |
| `tools` | List or manage tools |
| `memory` | Manage agent memory |
| `session` | Manage agent sessions |
| `knowledge` | Manage knowledge base |
| `skills` | Manage agent skills |
| `guardrail` | Content validation and safety |
| `eval` | Evaluate agent performance |
| `query-rewrite` | Rewrite queries for better search |
| `prompt-expand` | Expand prompts with more detail |
| `router` | Route requests to agents |
| `context` | Manage conversation context |
| `planning` | Task planning and todo management |
| `telemetry` | Usage monitoring and analytics |
| `vector` | Vector store management |
| `observability` | Monitoring and tracing |
| `voice` | Text-to-speech and speech-to-text |
| `db` | Database adapter management |
| `cache` | Caching management |
| `version` | Show CLI version |
| `help` | Show help information |

## Core Commands

### Chat

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai-ts chat "Your prompt here"
praisonai-ts chat "Write a poem" --stream
praisonai-ts chat "Explain AI" --model anthropic/claude-sonnet-4-20250514
```

### Providers

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai-ts providers
praisonai-ts providers --json
```

## Global Options

| Option | Description |
| - | - |
| `-v, --verbose` | Enable verbose output |
| `-c, --config` | Path to config file |
| `-o, --output` | Output format (pretty, json, text) |
| `--json` | Shorthand for `--output json` |

## Environment Variables

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
export OPENAI_API_KEY=your-key
export ANTHROPIC_API_KEY=your-key
export GOOGLE_API_KEY=your-key
export PRAISONAI_MODEL=openai/gpt-4o-mini
```

### Loading a `.env` file

`praisonai-ts` no longer calls `dotenv.config()` for you (as of v-next, PR #4416). If you keep credentials in a `.env` file, load it yourself at the top of your entrypoint. Shell exports above keep working with no code changes.

```ts theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
// If you keep credentials in a .env file, load it yourself.
import 'dotenv/config';       // or: import dotenv from 'dotenv'; dotenv.config();
import { Agent } from 'praisonai';

const agent = new Agent({ instructions: 'You are a helpful assistant' });
await agent.start('Hello');
```

Prefer no `dotenv` at all? See [JS Import Safety & Runtimes](https://praison.ai/docs/features/js-import-safety.md) for per-agent credentials in browsers and webviews.

## Related

> [card] [Tools CLI](https://praison.ai/docs/js/tools-cli.md)
>
> Command reference

> [card] [Providers CLI](https://praison.ai/docs/js/providers-cli.md)
>
> Command reference

> [card] [Sessions CLI](https://praison.ai/docs/js/sessions-cli.md)
>
> Command reference

> [card] [Memory CLI](https://praison.ai/docs/js/memory-cli.md)
>
> Command reference

> [card] [Knowledge Base CLI](https://praison.ai/docs/js/knowledge-base-cli.md)
>
> Command reference

> [card] [Skills CLI](https://praison.ai/docs/js/skills-cli.md)
>
> Command reference

> [card] [Guardrails CLI](https://praison.ai/docs/js/guardrails-cli.md)
>
> Command reference

> [card] [Evaluation CLI](https://praison.ai/docs/js/evaluation-cli.md)
>
> Command reference


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.