Skip to main content

Commands Reference

Cody CLI provides 30+ slash commands. Type / in an interactive session to see the full list with autocomplete.

Code Quality

CommandDescription
/code-reviewReview staged or last-commit changes for bugs, edge cases, and missing error handling
/security-reviewOWASP Top 10 vulnerability scan — SQL injection, XSS, command injection, path traversal, hardcoded secrets, SSRF, insecure crypto, missing auth, insecure deserialization, security misconfiguration
/pr-review [number|url]Review a pull request for bugs, security issues, and performance
/pr-fix [number]Fetch PR review comments and auto-generate code fixes

Agents & Automation

CommandDescription
/goal <condition>Work autonomously until a condition is met (max 20 turns)
/bg <task>Delegate a task to a background agent — continue working in the foreground
/auto on|off|statusToggle auto mode — safe actions run without prompting, dangerous ones still require approval
/workflow run <file.yml>Execute a YAML-defined multi-step agent pipeline
/workflow listList available workflows in .cody/workflows/
/workflow initCreate a sample workflow template
/agent-viewList all running, completed, and failed agents with status, duration, and token usage
/agent-view <id>Inspect a specific agent
/agent-view kill <id>Stop a running agent
/loop N <instruction>Repeat an instruction N times
/loop until <condition>Loop until a condition is met (max 20 iterations)

Session

CommandDescription
/recap [minutes|all]Show what happened in the last N minutes (default: 5)
/rewindResume conversation from before /clear
/usageShow token and cost tracking for the current session
/monitor start <path>Watch files/directories for changes
/monitor stopStop file watching
/monitor statusReport accumulated changes since last check
/notifications on|off|testControl mobile push notifications
/compactCompress conversation context to free up tokens
/clearClear the conversation

Configuration

CommandDescription
/config [key=value]Set a config value inline (e.g., /config model=kimi-k2) or open the interactive settings panel
/modelInteractive model picker — filtered by your subscription tier
/themeSwitch UI theme
/fastToggle fast mode (same model, faster output)

Learning & Help

CommandDescription
/powerup [lesson]Interactive tutorials — 6 lessons covering tools, agents, MCP, memory, skills, and code review
/helpShow help

MCP & Skills

CommandDescription
/mcp-login <server>Authenticate with an MCP server via OAuth
/mcp-logout <server>Clear stored MCP credentials
/skill-marketplaceBrowse and install skills from the community catalog
/indexIndex the current codebase for semantic search (via ZeroDB)

Other

CommandDescription
/securityScan project config files for vulnerabilities (score 0–100)
/bridgeStart a remote session via Agent Cloud
/voiceSpeech-to-text input (Whisper STT)
/planEnter read-only planning mode
/briefToggle compact message layout

CLI Flags

These flags are passed when launching Cody from the terminal:

cody [flags] [-p "prompt"]
FlagDescription
--model <id>Use a specific model
--fastEnable fast mode
-p, --prompt <text>Single prompt (non-interactive)
--printPrint mode — pipe-friendly output
--dry-runPreview what would be sent to the LLM without making an API call
--colorForce or disable color output
--output-format markdownStructured markdown output (useful for CI/CD)
--api-key <key>Pass API key inline
--safe-modeDisable plugins and custom skills

Shell Escape

Run a shell command from within Cody and get an automatic explanation of the output:

! npm test

Triggers auto-explain on 4+ lines of output — explains errors, test failures, and build output.