PraisonAI Code CLI

Standalone agentic terminal CLI: run agents, chat, and code without the full wrapper

praisonai-code is the terminal-native agent CLI — install it on its own for a smaller footprint when you only need agentic commands.

python
# Standalone install — no wrapper needed
from praisonaiagents import Agent

Agent(instructions="Summarise this URL").start("https://arxiv.org/abs/2409.12345")
bash
# Same result from the CLI, standalone (PR #2853)
pip install praisonai-code
praisonai-code run "Summarise https://arxiv.org/abs/2409.12345"

The user runs a terminal prompt; praisonai-code executes the agent in-process and prints the reply.

Interactive chat and code also run from praisonai-code alone — no wrapper (PR #3818):

bash
pip install praisonai-code
praisonai chat        # opens the split-pane async TUI, no wrapper required
praisonai code        # opens the resident code TUI, no wrapper required
Diagram

pip install praisonai

pip install praisonai-code

praisonai-code CLI

default run · run –output plain/verbose/silent/actions/json/stream/stream-json · config · doctor · daemon · version · …

chat · code · resident TUI

praisonai CLI

gateway · bot · onboard · pairing · identity · kanban · claw · dashboard

praisonaiagents core

Which install do I need?

Diagram

Any text prompt: default run or –output plain/verbose/silent/actions/json/stream/stream-json

Vision prompt with –image

Interactive terminal chat or coding: resident TUI

Bots · gateway · dashboard

Warm runtime daemon

What do you run?

run ‘…’

run –image

chat · code

gateway · bot · …

daemon start

pip install praisonai-code

pip install praisonai

Both praisonai-code (console script) and python -m praisonai_code call the same entry point: configure logging, register commands, then run the Typer app.

Interactive Chat & Code (resident TUI)

A single pip install praisonai-code is enough for an interactive session — the split-pane async TUI ships inside the package (PR #3818).

bash
pip install praisonai-code
praisonai chat        # opens the split-pane async TUI, no wrapper required
praisonai code        # opens the resident code TUI, no wrapper required
Diagram

Interactive session

No

Yes

💻 praisonai chat / code

🔍 wrapper installed?

🖥️ Resident TUI
praisonai_code.cli.interactive

🎛️ Richer legacy dispatch
PraisonAI._start_interactive_mode

DimensionResident TUI (praisonai-code alone)Richer legacy dispatch (+ praisonai)
Installpip install praisonai-codepip install praisonai
Entry pointpraisonai_code.cli.interactivePraisonAI._start_interactive_mode
code commandResident split-pane TUIPreferred richer legacy dispatch
Instruction loading (context_files)Native — praisonai_code.integration.context_files (PR #4338)Prefers praisonai_bot / praisonai copy when installed
Async bridge (praisonai._async_bridge)Bridge fallback via _wrapper_bridgeDirect wrapper implementation

The wrapper is never required for the baseline TUI — it only upgrades code to the richer legacy dispatch. Instruction loading is now resident: praisonai_code.integration.context_files ships inside the package, so the subtree hook and --instructions globs/URLs work standalone without routing through _wrapper_bridge. When the wrapper (or praisonai_bot) is installed, the CLI prefers that copy.

Native rules + project instructions

rules list/add/clear and subtree instruction loading run natively on a standalone pip install praisonai-code (PR #4338) — no praisonai_bot or praisonai needed.

bash
pip install praisonai-code
praisonai rules add my_rule "Always use type hints"   # workspace-scoped rule
praisonai rules list                                   # native, backed by RulesManager
praisonai rules clear                                  # clears workspace rules only
  • rules list/add/clear run natively via praisonaiagents.memory.RulesManager.
  • Subtree AGENTS.md/CLAUDE.md auto-attach and --instructions globs/URLs both work standalone via praisonai_code.integration.context_files.
  • clear is scoped to workspace rules only — hand-authored AGENTS.md/CLAUDE.md/PRAISON.md, global rules, git-root rules, and nested subdir rules are never removed.
Diagram

Standalone praisonai-code project-instruction stack

👤 User

💻 praisonai-code run / chat / code

🔍 –instructions globs/URLs
+ AGENTS.md walk-up

📜 rules list/add/clear

📦 praisonai_code.integration.context_files
resident, stdlib + praisonaiagents.hooks

🧠 praisonaiagents.memory.RulesManager
PRAISON.md / CLAUDE.md / AGENTS.md / .praison/rules/

🤖 Agent

Deep dives: Rules, Instruction Sources, and Context Files.

Quick Start

  1. Install standalone
    bash
    pip install praisonai-code
    praisonai-code version

    The panel lists PraisonAI Code, PraisonAI Agents, and Python. When the full wrapper is installed, a PraisonAI Wrapper line appears as well.

    Use --version for a quick one-liner (package version only, no panel):

    bash
    praisonai-code --version

    Run your first agent:

    bash
    praisonai-code run "Summarise the top 3 arXiv papers on RAG this week"

    Every text mode — default run "…" and --output plain|verbose|silent|actions|json|stream|stream-json — runs standalone via the in-process Agent path. As of PR #3818, chat and code also open their resident interactive TUI standalone — the wrapper adds only the richer legacy dispatch for code and the gateway/bot channels.

  2. Upgrade later if you need bots or gateway
    bash
    pip install praisonai

    The same praisonai-code binary keeps working. Wrapper-only commands (gateway, bot, onboard, pairing, identity, kanban, claw, dashboard) become available through the composed install.

How It Works

Every text-mode run reaches the in-process Agent path on a standalone install. The sole carve-out is --image: vision routes through the wrapper’s ImageHandler, so run --image fails fast with a targeted hint when the wrapper is absent. For every other text run the CLI checks wrapper_available() — when the wrapper is present it delegates to the richer handle_direct_prompt (existing users see zero change, including vision); when it is absent it renders in-process from the same Agent the structured --output modes already build. chat and code open their resident TUI standalone (PR #3818); when the wrapper is installed, code prefers the richer legacy dispatch (PraisonAI._start_interactive_mode). Plugin discovery is vendored inside praisonai-code, so plugin-related flows keep working without the wrapper.

Diagram
praisonai (optional)praisonaiagents.Agent_wrapper_bridgepraisonai-codeUserpraisonai (optional)praisonaiagents.Agent_wrapper_bridgepraisonai-codeUseralt[wrapper installed][wrapper absent]alt[–image][text run (default / plain / verbose / silent / actions / json / stream /stream-json)]chat / code run resident standalone — wrapper only adds richer legacy dispatchpraisonai-code run “…”–image given?exit 1 — install praisonai (vision ImageHandler is wrapper-only)wrapper_available()Truehandle_direct_prompt (richer surface, incl. vision)resultnormal outputFalsein-process Agent with matching output presetresultfinal text (silent-style presets print the answer)

The --image carve-out is enforced by _require_wrapper_for_default_run; every other text-mode run reaches the in-process Agent branch when the wrapper is absent (PR #5687).

Output presets map as plain → plain, silent/default → silent, verbose → verbose; silent-style presets print the final text. chat and code open their resident interactive TUI standalone (PR #3818) — pip install praisonai-code alone delivers full interactive sessions. When the praisonai wrapper is installed, code prefers its richer legacy dispatch (PraisonAI._start_interactive_mode):

bash
pip install praisonai-code
praisonai-code chat
praisonai-code code "Refactor this function"

The vendored _registry module means plugins work even without the wrapper installed. Version resolution reads from the praisonai-code package metadata directly, not the wrapper.

Standalone agent parity

Default run "…" and the structured --output modes share one agent surface (_wire_run_agent_config), so the same inputs reach the in-process Agent on a standalone install (PR #5687).

python
# Standalone install — no wrapper needed
from praisonaiagents import Agent

agent = Agent(
    name="DevHelper",
    instructions="Diagnose developer errors",
    tools=["file.read", "shell.run"],
)
agent.start("Explain this stack trace")
bash
# Same inputs the CLI wires into the in-process Agent (PR #5687)
pip install praisonai-code
praisonai-code run \
  --tools file.read,shell.run \
  --session my-debug \
  --instructions ./AGENTS.md \
  "Explain this stack trace"
InputDefault run "…"--output actions--output json/stream/stream-json
--tools / --toolset✅✅✅
--mcp + config MCP servers✅✅✅
--session / --continue✅✅✅
--instructions✅✅✅
--approval + --permissions✅✅✅
--image❌ wrapper only❌ wrapper only❌ wrapper only

Command matrix

Three tiers decide what a command needs: fully standalone, wrapper-boosted (works standalone but gains a richer path with the wrapper), and wrapper-only (not listed without the wrapper).

Standalone (pip install praisonai-code)Wrapper-boosted (works standalone, richer with praisonai)Wrapper-only (pip install praisonai)
acp · agent · agents · attach · auth · batch · benchmark · browser · call · chat · checkpoint · code · command · commit · completion · config · context · debug · deploy · diag · docs · doctor · endpoints · env · eval · examples · flow · github · hooks · init · knowledge · langextract · langfuse · loop · lsp · managed · mcp · memory · models · n8n · obs · package · paths · permissions · plugins · port · profile · publish · rag · realtime · recipe · registry · replay · research · run "…" (default) · run --output plain/verbose/silent/actions/json/stream/stream-json · rules · sandbox · schedule · serve · session · setup · skills · templates · test · todo · tools · traces · tracker · train · ui · up · validate · version · workflowcode (resident TUI standalone → richer legacy dispatch with wrapper)bot · claw · daemon · dashboard · gateway · identity · kanban · onboard · pairing

chat and code open their resident TUI standalone (PR #3818); code prefers the richer legacy dispatch when the wrapper is installed. Wrapper-only names stay out of --help entirely and do not load a Typer module.

The 13 stub groups below are a special mixed case — their legacy entry points are wrapper-required, but native subcommands stay standalone-safe. rules is not in this list — rules list/add/clear are native standalone (PR #4338):

CommandStandaloneWrapper-required
Stub groups (agents, workflow, registry, memory, skills, hooks, eval, package, templates, todo, research, commit, call) — delegating entry points❌ Fail fast with hint✅
Stub groups — native subcommands (memory learn, skills bundle/check/eligible, eval list-judges/list)✅✅

Standalone limits

On a pip install praisonai-code-only install:

CommandWorks standalone?Notes
run --help, config, doctorYes
run --output actions "…"YesIn-process Agent (structured events preset)
run --output json "…"YesIn-process Agent. Writes a single-line {"result": ..., "status": ...} envelope on stdout for every outcome.
run --output stream "…"YesIn-process Agent. Prints the answer text; on exit 2 also prints the partial answer unless --quiet.
run --output stream-json "…"YesIn-process Agent. NDJSON event framing on stdout (no raw partial text on exit 2 — would corrupt the protocol).
run "…" (default)YesIn-process Agent (silent preset; prints final text)
run --output plain/verbose/silent "…"YesIn-process Agent (plain/verbose/silent presets)
run --image <path> "…"NoVision routes through the wrapper’s ImageHandler. Fails fast on standalone with a targeted hint: --image requires the praisonai wrapper. Install with: pip install praisonai.
chat, codeYesRun resident on the built-in split-pane TUI (PR #3818); the praisonai wrapper adds a richer dispatch mode for code
daemon start (foreground)Yes
daemon start --backgroundYesSpawns python -m praisonai_code.runtime
Piped stdin (`type file.log \praisonai-code run “…”`)YesWorks on Windows as of 2026-07-07 (PR #2705) via a stat-based pipe classifier; also supports `Get-Content file.log \praisonai-code run “…”`. Interactive terminals skip the stdin read. See Piped Input.

chat, code, and every run output mode work on a praisonai-code-only install (PR #2853, PR #3818, PR #5685, PR #5687). PR #5687 completed the picture by making the default run "…" (no --output flag) self-sufficient — previously it hard-failed with an install hint on a standalone install. Installing the wrapper (pip install praisonai) adds the richer legacy dispatch for code, the gateway, and channel bots — it is no longer required for the baseline interactive experience.

--image is the only text-mode feature that still requires pip install praisonai. Every other run text mode — default / plain / verbose / silent / actions / json / stream / stream-json — runs in-process via the shared _wire_run_agent_config surface, so --tools, --toolset, MCP servers, --session/--continue, --instructions, and the approval surface all reach the standalone Agent (PR #5687).

praisonai-code doctor returns exit 0 on a healthy standalone install — wrapper-presence checks (performance_praisonai_import, acp_module, praisonai_package_structure, console_script_execution) SKIP rather than FAIL (PR #2851).

Stub command groups on standalone

Run agents standalone without the wrapper — the SDK works directly:

python
from praisonaiagents import Agent

Agent(instructions="Summarise this URL").start("https://arxiv.org/abs/2409.12345")
bash
# Same result from the CLI, standalone (in-process)
pip install praisonai-code
praisonai-code run --output actions "Summarise https://arxiv.org/abs/2409.12345"

Thirteen command groups — agents, workflow, registry, memory, skills, hooks, eval, package, templates, todo, research, commit, and call — delegate to the praisonai wrapper for their legacy entry points. rules is not among them — rules list/add/clear run natively on standalone (PR #4338). On a standalone pip install praisonai-code (PR #2854) those entry points exit 1 with a single-line install hint — no Rich traceback:

agents requires the full wrapper. Install the full wrapper: pip install praisonai

The <group> name changes per command (workflow requires the full wrapper. …, registry requires the full wrapper. …, and so on).

Diagram

praisonai-code stub group on standalone

Native: memory learn · skills bundle/check/eligible · eval list-judges/list

Delegating stub: agents list · workflow run · registry add

Yes

No

User: praisonai-code group sub

Subcommand kind?

Runs in-process

Wrapper installed?

Delegates to praisonai wrapper

exit 1 with single-line install hint

Wrapper-command loading

Wrapper-only commands (bot, gateway, pairing, identity, onboard, kanban, dashboard, claw, daemon) are Typer sub-apps whose implementations live in the praisonai wrapper. When you install praisonai-code standalone, these commands are not listed in --help and are not resolvable — get_command() returns None instead of loading a module that doesn’t exist in praisonai_code.

bash
# Standalone install, wrapper-only command
$ pip install praisonai-code
$ praisonai-code bot --help
Error: No such command 'bot'.

To use bot, gateway, pairing, identity, onboard, kanban, dashboard, claw, or daemon, install the full wrapper:

bash
pip install praisonai

Configuration and environment

Variable / commandBehaviour
LOGLEVELRead on CLI entry via configure_cli_logging (default WARNING). Controls root log verbosity for standalone runs.
praisonai-code version checkCompares your installed version with PyPI (https://pypi.org/pypi/praisonai-code/json).

Version commands

bash
praisonai-code version

Shows the full version panel:

PraisonAI Code: 0.0.4
PraisonAI Wrapper: 1.x.x   ← only shown when praisonai is installed
PraisonAI Agents: 1.6.x
Python: 3.12.x
bash
praisonai-code version --json

Returns structured JSON:

json
{
  "praisonai-code": "0.0.4",
  "praisonai": "1.x.x",
  "praisonaiagents": "1.6.x",
  "python": "3.12.x"
}

The praisonai key is omitted when the wrapper is not installed.

bash
praisonai-code version check

Queries PyPI and returns update status:

json
{
  "current": "0.0.4",
  "latest": "0.0.5",
  "update_available": true
}

Best Practices

When to use praisonai-code alone

Use praisonai-code for any run "…" prompt (default or any --output mode), interactive chat/code (resident TUI, PR #3818), config, doctor, or the warm-runtime daemon — smaller install, no gateway/bot deps.

When to install the full wrapper

Install praisonai for vision prompts (run --image), the richer legacy code dispatch (PraisonAI._start_interactive_mode), Telegram/Discord/Slack bots, the WebSocket gateway, kanban/dashboard, and RunPolicy for unattended runs. Baseline interactive chat/code and the full run text-mode matrix (default + --output *) run standalone (PR #3818, PR #5687).

Monorepo dev install order

In dev, pip install -e src/praisonai-agents && pip install -e src/praisonai-code && pip install -e src/praisonai (this exact order) — matches the release publish order in pypi-release.yml.

AgentApp is a silent alias for AgentOS

from praisonai import AgentOS and from praisonai import AgentApp both work — AgentApp is a backward-compat silent alias for AgentOS. No deprecation warning is emitted.

Related