code command starts a code assistant session optimized for programming tasks.
praisonai code is safe by default: file writes and shell commands prompt for approval on first call. Pass --no-safe or --dangerously-skip-approval to restore the legacy ungated behaviour. See Tool Approval.Usage
Arguments
Options
Safe mode (
--safe) is on by default as of PR #2369. Dangerous built-in tools ask for approval in interactive sessions and are denied in non-interactive (CI) sessions. Use --no-safe to opt out, or --dangerously-skip-approval for a complete bypass. See Approval for full details.Piped Input
praisonai code reads piped stdin when the prompt is provided in the shell pipeline.
\n). See Piped Input.
Examples
Start code assistant
Ask a coding question
Specify language context
Disable safe mode (opt out of approval prompts)
Full bypass (no approval prompts, applies to subprocess tree)
Reasoning effort (per invocation)
Custom agent profile
Project context
By default,praisonai code walks up from the current directory to your git root and prepends any AGENTS.md / CLAUDE.md / agents.md / .agents/AGENTS.md it finds to the agent’s system prompt, layered on top of ~/.praisonai/AGENTS.md. Pass --no-context (or set PRAISON_NO_CONTEXT=true) to disable. See Context Files for details.
Windows Automation
For Windows automation scenarios, use the--no-acp flag and set UTF-8 encoding:
Auto checkpointing & in-session undo
Workspace checkpointing is off by default. Enable it with--checkpoints to auto-snapshot before each file-mutating turn, unlocking /undo and /revert inside the coding REPL.
How /undo differs by mode
Interactive slash commands
Type these inside apraisonai code REPL when --checkpoints is active:
Both commands show a diff preview before restoring and refuse to run while a turn is still in progress.
One-shot revert from CLI
Project config
Enable checkpointing for allpraisonai code sessions in a project:
PRAISONAI_CHECKPOINTS=on (env) > checkpoints.auto (config) > default (off).
See Checkpoints for the full checkpoint feature reference.
See Also
- Chat - General chat mode
- LSP Code Intelligence - Language server integration
- Approval - Tool approval and safety defaults
- Checkpoints - Workspace checkpointing and undo

