mirror of
https://github.com/hanzoai/dev.git
synced 2026-10-25 03:32:32 +00:00
6.3 KiB
6.3 KiB
Slash Commands
The Code CLI supports a set of slash commands you can type at the start of the composer input. These commands provide quick actions, toggles, or expand into full prompts. This document lists all built‑in commands and what they do.
Notes
- Commands are shown in the TUI’s slash popup; the order below matches the UI.
- Commands marked “prompt‑expanding” transform your input into a full prompt and typically kick off multi‑agent flows.
- Some commands accept arguments; if required, usage is shown in parentheses.
Navigation & Session
/browser: open internal browser./chrome: connect to your Chrome browser./new: start a new chat during a conversation./clear: clear the terminal and start a new chat./resume: resume a past session for this folder./rename <name>: rename the current session (shown in the resume list)./quit: exit Code./exit: exit Code./logout: log out of Code./login: manage Code sign-ins (select, add, or disconnect accounts)./settings [section]: open the settings panel. Optional section argument jumps directly tomodel,theme,agents,skills,auto,review,validation,limits,chrome,mcp, ornotifications.
Workspace & Git
/init: create anAGENTS.mdfile with instructions for Code./diff: showgit diff(including untracked files)./copy: copy the last assistant response as markdown./undo: open a snapshot picker so you can restore workspace files to a previous Code snapshot and optionally rewind the conversation to that point./branch [task]: create a worktree branch and switch to it. If a task/description is provided, it is used when naming the branch. Must be run from the repository root (not inside another branch worktree). SetCODE_BRANCH_COPY_CACHES=1(legacy:CODEX_BRANCH_COPY_CACHES=1) to mirrornode_modulesand Rust build caches into the worktree; otherwise no cache directories are copied automatically./merge: merge the current worktree branch back into the default branch and remove the worktree. Run this from inside the worktree created by/branch./push: tell Code to commit, push, and monitor workflows with guarded instructions. If no workflows appear right away, wait briefly and check again before concluding none were triggered. Skips cleanup or GitHub monitoring steps automatically when the workspace is already clean or required tooling/files are missing./review [focus]: without arguments, opens a review picker so you can audit the workspace, a specific commit, compare against another branch, or enter custom instructions. With a focus argument, skips the picker and uses your text directly. Configure Auto Resolve and the max re-reviews (defaults to 5) from/settings reviewwhen you want Code to rerun fixes and follow-up checks automatically./cloud: browse Code Cloud tasks, view details, apply patches, and create new tasks from the TUI./cmd <name>: run a project command defined for the current workspace.
UX & Display
/theme: customize the app theme./verbosity (high|medium|low): change text verbosity./model: choose your default model./fast: open the model selector and toggle Fast mode./reasoning (minimal|low|medium|high): change reasoning effort./prompts: manage custom prompts./skills: manage skills./status: show current session configuration and token usage./limits: adjust session limits and visualize hourly and weekly rate-limit usage./update: check the installed version, detect available upgrades, and open a guided upgrade terminal that runs the installer interactively when possible./notifications [status|on|off]: manage notification settings. Without arguments, shows the notifications panel. With arguments:statusshows current config,onenables all,offdisables all./mcp [status|on|off <name>|add]: manage MCP servers. Without arguments, shows all servers with toggle controls. With arguments:statuslists servers,on <name>enables,off <name>disables, andaddstarts the new server workflow./validation [status|on|off|<tool> (on|off)]: inspect or toggle validation harness settings.
Search & Mentions
/mention: mention a file (opens the file search for quick insertion).
Performance & Agents
/perf (on|off|show|reset): performance tracing controls./agents: configure agents and subagent commands (including autonomous follow-ups and observer status; available in dev, dev-fast, and perf builds)./auto [goal]: start the maintainer-style auto coordinator. If no goal is provided it defaults to "review the git log for recent changes and come up with sensible follow up work".
Prompt‑Expanding (Multi‑Agent)
These commands expand into full prompts (generated by code-core) and
typically start multiple agents. They require a task/problem description.
/plan <task>: create a comprehensive plan (multiple agents). Prompt‑expanding./solve <problem>: solve a challenging problem (multiple agents). Prompt‑expanding./code <task>: perform a coding task (multiple agents). Prompt‑expanding.
Development‑Only
/demo: populate the chat history with assorted sample cells (available in dev and perf builds for UI testing)./demo auto drive card: render the Auto Drive card once for each ANSI-16 background color so you can compare theme contrast./test-approval: test approval request (available in debug builds only).
Implementation Notes
- The authoritative list of commands is defined in
code-rs/tui/src/slash_command.rs(theSlashCommandenum). When adding a new command, please update this document to keep the UI and docs in sync. - Prompt formatting for
/plan,/solve, and/codelives incode-rs/core/src/slash_commands.rs. When no[[agents]]are configured, the orchestrator advertises the following model slugs to the LLM for multi-agent runs:code-gpt-5.5,code-gpt-5.4,code-gpt-5.4-mini,claude-opus-4.8,gemini-3.1-pro,claude-sonnet-4.6,gemini-3.5-flash,claude-haiku-4.5, andqwen-3-coder(withcloud-gpt-5.1-codex-maxgated byCODE_ENABLE_CLOUD_AGENT_MODEL). (geminiresolves togemini-3.5-flash.) You can replace or pin this set via[[agents]]or per-command[[subagents.commands]].agents.