CodeBuddy Cheatsheet
Lookup only. Install commands, CLI subcommands, slash commands, and keys are copied from official pages. The full set is codebuddy --help plus the links below.
Verified 2026-08-18.
Install and update
Sources: Install guide, Quick start, Troubleshooting
| Case | Command / action | Source |
|---|---|---|
| npm | npm install -g @tencent-ai/codebuddy-code | Install |
| pnpm | pnpm add -g @tencent-ai/codebuddy-code | Install |
| yarn | yarn global add @tencent-ai/codebuddy-code | Install |
| bun | bun install -g @tencent-ai/codebuddy-code | Install |
| Homebrew | brew tap Tencent-CodeBuddy/tap then brew install codebuddy-code | Install |
| Native fresh (install page) | curl -fsSL https://www.codebuddy.cn/cli/install.sh | bash | Install |
| Native Windows (install page) | irm https://www.codebuddy.cn/cli/install.ps1 | iex | Install |
| Native fresh (quick start) | curl -fsSL https://copilot.tencent.com/cli/install.sh | bash | Quick start |
| Native Windows (quick start) | irm https://copilot.tencent.com/cli/install.ps1 | iex | Quick start |
| npm → native | codebuddy install | Install |
| Verify | codebuddy --version | Install |
| Update | codebuddy update | Install / troubleshooting |
| npm update fallback | npm install -g @tencent-ai/codebuddy-code@latest | Troubleshooting |
| npm latest | npm view @tencent-ai/codebuddy-code version | Troubleshooting |
| Disable auto-update | export DISABLE_AUTOUPDATER=1 | Install |
| Uninstall Homebrew | brew uninstall codebuddy-code | Install |
| Uninstall npm | npm uninstall -g @tencent-ai/codebuddy-code | Install |
| Remove native binary | rm -f ~/.local/bin/codebuddy | Install |
Node.js: 18.20+ (install + troubleshooting). The overview has said 18.0+. Do not mix the two.
Native PATH: ~/.local/bin; Windows %USERPROFILE%\AppData\Local\codebuddy\bin.
Config dir: ~/.codebuddy / %USERPROFILE%\.codebuddy. Override: CODEBUDDY_CONFIG_DIR.
IDE download: codebuddy.cn/ide · CN copilot.tencent.com/ide · intl codebuddy.ai. Requirements: IDE install.
Plugin: marketplace search 腾讯云代码助手. Plugin page.
CLI commands
Source: CLI reference
| Command | What it does | Example |
|---|---|---|
codebuddy | Interactive REPL | codebuddy |
codebuddy "query" | REPL with an opening prompt | codebuddy "Explain this project" |
codebuddy -p "query" | Print and exit | codebuddy -p "Explain this function" |
cat file | codebuddy -p "query" | Pipe | cat logs.txt | codebuddy -p "Analyze the log" |
codebuddy -c | Continue the latest chat | codebuddy -c |
codebuddy -c -p "query" | Continue in print mode | codebuddy -c -p "Check type errors" |
codebuddy -r "<id>" "query" | Resume by id | codebuddy -r "abc123" "Finish this MR" |
codebuddy update | Update | codebuddy update |
codebuddy mcp | Configure MCP | See MCP |
codebuddy daemon start | Start daemon | codebuddy daemon start --port 8080 |
codebuddy daemon stop / status / restart | Stop / inspect / restart | |
codebuddy daemon install / uninstall | Register or remove a system service | codebuddy daemon install --port 8080 |
codebuddy auto-mode defaults / config / critique | Inspect auto-mode rules | |
codebuddy ps | List workers | codebuddy ps |
codebuddy logs <name> | Worker logs | codebuddy logs feature-x |
codebuddy attach <name> | Attach to a worker | codebuddy attach feature-x |
codebuddy kill <name> | Kill a worker | codebuddy kill feature-x |
codebuddy plugin install <plugin> | Install a CLI plugin | See plugin reference |
Common flags
Source: CLI reference. Daily subset, not the full page.
| Flag | Meaning |
|---|---|
--print, -p | Print and exit |
-y / --dangerously-skip-permissions | Skip permission prompts |
--permission-mode | default / acceptEdits / auto / dontAsk / plan / bypassPermissions |
--continue / -c | Latest chat in this directory |
--resume | Resume by id |
--model | Model for this session |
--ide | Connect to an IDE on start |
--add-dir | Extra work directory |
--sandbox | Sandbox (Beta) |
--worktree [name] | Isolated git worktree |
--tmux | With --worktree |
--bg / --name | Background session |
--serve | HTTP server |
--plugin-dir | Load plugins from local dirs |
--output-format | text / json / stream-json (print mode) |
--max-turns | Max non-interactive turns |
--verbose / --debug | Verbose / debug |
--system-prompt / --append-system-prompt | Replace or append the system prompt |
--mcp-config | Load MCP JSON |
Official note: -p plus file / shell / network work needs an explicit permission policy (-y, --permission-mode auto / dontAsk, pre-set permissions.allow, or a permission-prompt MCP tool).
Slash commands
Source: Slash commands. High-frequency subset; full table is on the official page.
| Command | Role |
|---|---|
/help | Help |
/clear | New conversation |
/login / /logout | Sign in / out |
/init | Initialize repo context |
/config | Local settings |
/model | Switch or list models |
/status / /doctor | Session / environment |
/mcp | MCP |
/skills | Loaded Skills |
/plugin | CLI plugins and marketplaces |
/compact | Compact context |
/cost / /stats | Token / usage |
/resume / /rewind | Resume / rewind checkpoint |
/permissions | Tool and directory permissions |
/plan | Preview the plan file |
/ide | IDE connection |
/sandbox | Bash sandbox |
/memory | Long-term memory |
/upgrade | Open the upgrade page |
Custom commands: project .codebuddy/commands/*.md, user ~/.codebuddy/commands/*.md. test.md → /test. Nested dirs use colons: frontend/build.md → /frontend:build.
Keys
Source: Quick start · shortcuts
| Key | Action |
|---|---|
↑/↓ | History; ↓ lists background tasks when any are running |
Tab | Complete |
Esc | Clear input (twice) / go up |
Ctrl+C / Ctrl+D | Quit (Ctrl+D needs an empty input, twice) |
Shift+Tab (Windows also Alt+M) | Permission cycle default → bypass → accept → plan |
Enter | Send |
Shift+Enter / \Enter / Ctrl+J | Newline |
Ctrl+G | Edit the prompt in an external editor |
Ctrl+R | Expand / collapse detail |
Ctrl+O | Thinking panel |
JetBrains terminal: ESC may not work — use Ctrl+ESC or Shift+ESC (troubleshooting).
MCP add (excerpt)
Source: MCP
codebuddy mcp add --scope user my-tool -- /path/to/tool arg1 arg2
codebuddy mcp add --scope project python-tool -- python /path/to/script.py
codebuddy mcp add --scope user --transport sse sse-server https://example.com/mcp/sse
codebuddy mcp add --scope project --transport http http-server https://example.com/mcp/httpDecision table
| Situation | Pick |
|---|---|
| Already in VS Code / JetBrains | Plugin |
| One sentence → prototype / design / deploy | IDE |
| Terminal / CI / headless | CLI |
| Office docs / PPT, not a repo | WorkBuddy (not taught here) |
| General chat | Yuanbao (not taught here) |
| China account | CLI Chinese Site |
| Overseas account | CLI International Site |
Glossary index
One-line hooks. Definitions live in the Glossary.
| Term | Hook | More |
|---|---|---|
| CodeBuddy IDE | Standalone editor | Glossary |
| CodeBuddy Plugin | Extension in an existing IDE | Glossary |
| CodeBuddy Code | Terminal agent, codebuddy | Glossary |
| WorkBuddy | Office workbench, not the coding path | Glossary |
| CN / intl sites | Two docs and login domains | Glossary |
CODEBUDDY.md | Migratable instruction file | Glossary |
Common errors
| Symptom | Official handling |
|---|---|
codebuddy: command not found | PATH missing the install dir; source ~/.zshrc |
| Windows "not recognized" | npm config get prefix, add the global npm dir to PATH |
| npm succeeded, binary still old | Multiple binaries (npm + Homebrew / nvm) |
| Native binary missing | export PATH="$HOME/.local/bin:$PATH" |
-p cannot touch files | Add -y or another permission policy |
LAN --serve empty response | Listens on 127.0.0.1; use --host 0.0.0.0 |
Agent SDK (optional)
Source: Agent SDK. Docs target SDK v0.1.0+.
npm install @tencent-ai/agent-sdkpip install codebuddy-agent-sdkTypeScript/JavaScript needs Node.js >= 18.20. This site does not treat the SDK as the main path.
High-quality sources
Last verified: 2026-08-18. Only pages opened during research.
First-party
| Source | Use |
|---|---|
| codebuddy.cn | CN marketing site |
| codebuddy.cn/docs | ZH overview (three forms) |
| IDE install | IDE requirements and login |
| Plugin docs | Host versions and install |
| CLI overview | CLI entry |
| CLI install | Package managers / native / uninstall |
| CLI quick start | Login, /init, keys, -p |
| CLI reference | Subcommands and flags |
| Slash commands | Full / table |
| Troubleshooting | Node, Windows, migration, quota |
| MCP | codebuddy mcp add |
| SDK | Agent SDK |
| Pricing | Plan entry (client-rendered) |
| Tencent Cloud acc | Cloud product page |
| Overview 1831 | Three-form comparison |
| codebuddy.ai/docs | Intl docs |
| codebuddy.ai/docs/zh | Intl ZH mirror |
| WorkBuddy intro | Map-row source |
| WorkBuddy mini program | Map row |
| WorkBuddy mobile | Map row |
| Yuanbao | Same-vendor assistant |
| Hunyuan | Same-vendor model |
Unverified
- Concrete pricing numbers (page is client-rendered; 2026-08-18 reader did not extract a tariff table)
- Whether a repo-root
CODEBUDDY.mdis auto-injected the same way as~/.codebuddy/CODEBUDDY.md(troubleshooting only names the migration file)