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.

AI CLI·25 commands·Last updated 2026-08-23

Install & Auth 5

curl -fsSL https://raw.githubusercontent.com/continuedev/continue/main/extensions/cli/scripts/install.sh | bash
Install cn via official script
cn --version
Show installed version
cn login
Browser sign-in (assistants/MCP/models)
cn logout
Sign out of the session
export CONTINUE_API_KEY=...
Headless/CI auth via API key

Interactive (TUI) 5

cn
Start an interactive session in the project dir
@src/auth/middleware.ts why does it reject valid tokens
@-reference files/dirs as context
/clear
Clear conversation history
/compact
Compact chat to free context
/whoami
Show 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 "..." --auto
Auto-approve all tool calls (no prompt)
cn -p "..." --readonly
Read-only plan mode, no file changes
cn -p "..." --config ./my-config.yaml
Run with a specific config file
cn -p "..." --verbose
Verbose logging

Threads & Config 5

cn --resume
Resume the most recent session
/resume
Reopen 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 plugins
Config/habits carry over
CI: -p + CONTINUE_API_KEY
Headless env needs no login state
@-reference feeds precise context
More accurate/cheaper than full-project scan
--readonly to plan first
Plan before big changes
--rule injects rules
cn --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 Us

Edit this page on GitHub

Edit the source file directly and open a PR to improve this cheatsheet.