Continue CLI (cn) Cheatsheet - Terminal Open-source Coding Agent
All Continue CLI (cn) terminal coding-agent commands in one place — from install to interactive/headless mode, login to thread management — organized by scenario. Copy and go.
Install & Auth 5
curl -fsSL https://raw.githubusercontent.com/continuedev/continue/main/extensions/cli/scripts/install.sh | bashInstall cn via official script
cn --versionShow installed version
cn loginBrowser sign-in (assistants/MCP/models)
cn logoutSign out of the session
export CONTINUE_API_KEY=...Headless/CI auth via API key
Interactive (TUI) 5
cnStart an interactive session in the project dir
@src/auth/middleware.ts why does it reject valid tokens@-reference files/dirs as context
/clearClear conversation history
/compactCompact chat to free context
/whoamiShow current signed-in identity
Headless (scripts/CI) 5
cn -p "add tests for the auth module"-p runs once and exits after printing
cn -p "..." --autoAuto-approve all tool calls (no prompt)
cn -p "..." --readonlyRead-only plan mode, no file changes
cn -p "..." --config ./my-config.yamlRun with a specific config file
cn -p "..." --verboseVerbose logging
Threads & Config 5
cn --resumeResume the most recent session
/resumeReopen history from the picker in-session
cn --model <slug>Specify a model at launch
cn --mcp <slug>Attach a named MCP server
cn --agent <slug>Load a named agent file
Tips 5
cn TUI shares the agent with IDE pluginsConfig/habits carry over
CI: -p + CONTINUE_API_KEYHeadless env needs no login state
@-reference feeds precise contextMore accurate/cheaper than full-project scan
--readonly to plan firstPlan before big changes
--rule injects rulescn --rule "use TS strict mode" persists
Tips
- Continue CLI (command `cn`) shares the same agent as the Continue VS Code/JetBrains extensions — reuse your IDE models/MCP/rules in the terminal.
- `cn -p "..."` is headless: it prints and exits, ideal for scripts/CI; pair with `CONTINUE_API_KEY` to automate in browser-less envs.
- `@file/dir` feeds precise context — more accurate and cheaper than a full-project scan; use `--readonly` to plan before big changes.
- `--rule` repeatedly injects constraints (e.g. "use TypeScript strict mode"); `--mcp`/`--agent` attach external capabilities and custom agents.
Official References
Commands are compiled from the official docs below. Click to verify the latest usage.
Maintained by LaoHand
Publicly updated on Aug 23, 2026, continuously proofread against official docs.
Contact Us
Wrong command or description? Send us corrections, business inquiries or product feedback by email.
Contact UsEdit this page on GitHub
Edit the source file directly and open a PR to improve this cheatsheet.