Commands Reference
Cody CLI provides 30+ slash commands. Type / in an interactive session to see the full list with autocomplete.
Code Quality
| Command | Description |
|---|---|
/code-review | Review staged or last-commit changes for bugs, edge cases, and missing error handling |
/security-review | OWASP 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
| Command | Description |
|---|---|
/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|status | Toggle 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 list | List available workflows in .cody/workflows/ |
/workflow init | Create a sample workflow template |
/agent-view | List 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
| Command | Description |
|---|---|
/recap [minutes|all] | Show what happened in the last N minutes (default: 5) |
/rewind | Resume conversation from before /clear |
/usage | Show token and cost tracking for the current session |
/monitor start <path> | Watch files/directories for changes |
/monitor stop | Stop file watching |
/monitor status | Report accumulated changes since last check |
/notifications on|off|test | Control mobile push notifications |
/compact | Compress conversation context to free up tokens |
/clear | Clear the conversation |
Configuration
| Command | Description |
|---|---|
/config [key=value] | Set a config value inline (e.g., /config model=kimi-k2) or open the interactive settings panel |
/model | Interactive model picker — filtered by your subscription tier |
/theme | Switch UI theme |
/fast | Toggle fast mode (same model, faster output) |
Learning & Help
| Command | Description |
|---|---|
/powerup [lesson] | Interactive tutorials — 6 lessons covering tools, agents, MCP, memory, skills, and code review |
/help | Show help |
MCP & Skills
| Command | Description |
|---|---|
/mcp-login <server> | Authenticate with an MCP server via OAuth |
/mcp-logout <server> | Clear stored MCP credentials |
/skill-marketplace | Browse and install skills from the community catalog |
/index | Index the current codebase for semantic search (via ZeroDB) |
Other
| Command | Description |
|---|---|
/security | Scan project config files for vulnerabilities (score 0–100) |
/bridge | Start a remote session via Agent Cloud |
/voice | Speech-to-text input (Whisper STT) |
/plan | Enter read-only planning mode |
/brief | Toggle compact message layout |
CLI Flags
These flags are passed when launching Cody from the terminal:
cody [flags] [-p "prompt"]
| Flag | Description |
|---|---|
--model <id> | Use a specific model |
--fast | Enable fast mode |
-p, --prompt <text> | Single prompt (non-interactive) |
--print | Print mode — pipe-friendly output |
--dry-run | Preview what would be sent to the LLM without making an API call |
--color | Force or disable color output |
--output-format markdown | Structured markdown output (useful for CI/CD) |
--api-key <key> | Pass API key inline |
--safe-mode | Disable 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.