CLI Reference

PraisonAI TypeScript CLI – Complete command reference

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

Diagram

User

CLI

Agent

Quick Start

  1. Simple Usage
    bash
    npm install -g praisonai
    praisonai-ts chat "Hello"
  2. With Configuration
    bash
    export OPENAI_API_KEY=your-key
    praisonai-ts chat "Explain AI" --model openai/gpt-4o-mini


All Commands

There is no serve or gateway command in the TypeScript CLI — the TS CLI is the single praisonai-ts executable. Run praisonai-ts help for the full list.

CategoryCommands
Agentchat, run, agent, auto, research, interactive
Multi-Agentagents run, workflow, flow, handoff, router
Toolstools list, tools info, skills list, skills discover
Memorymemory list, memory add, memory search, memory clear, session, knowledge
MCPmcp list, mcp add, mcp remove, mcp start, mcp stop
Qualityeval accuracy, eval performance, eval reliability, guardrail check, benchmark
Modelsproviders, llm providers, llm test, llm validate, embed, image
Otherquery-rewrite, prompt-expand, context, planning, telemetry, vector, observability, voice, db, cache, version, help
bash
praisonai-ts chat "Hello"
praisonai-ts agents run "Research and summarise AI news"
praisonai-ts help

Core Commands

Chat

bash
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
praisonai-ts providers
praisonai-ts providers --json

Global Options

OptionDescription
-v, --verboseEnable verbose output
-c, --configPath to config file
-o, --outputOutput format (pretty, json, text)
--jsonShorthand for --output json

Environment Variables

bash
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
// 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 for per-agent credentials in browsers and webviews.

Related