Skip to content

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

CaseCommand / actionSource
npmnpm install -g @tencent-ai/codebuddy-codeInstall
pnpmpnpm add -g @tencent-ai/codebuddy-codeInstall
yarnyarn global add @tencent-ai/codebuddy-codeInstall
bunbun install -g @tencent-ai/codebuddy-codeInstall
Homebrewbrew tap Tencent-CodeBuddy/tap then brew install codebuddy-codeInstall
Native fresh (install page)curl -fsSL https://www.codebuddy.cn/cli/install.sh | bashInstall
Native Windows (install page)irm https://www.codebuddy.cn/cli/install.ps1 | iexInstall
Native fresh (quick start)curl -fsSL https://copilot.tencent.com/cli/install.sh | bashQuick start
Native Windows (quick start)irm https://copilot.tencent.com/cli/install.ps1 | iexQuick start
npm → nativecodebuddy installInstall
Verifycodebuddy --versionInstall
Updatecodebuddy updateInstall / troubleshooting
npm update fallbacknpm install -g @tencent-ai/codebuddy-code@latestTroubleshooting
npm latestnpm view @tencent-ai/codebuddy-code versionTroubleshooting
Disable auto-updateexport DISABLE_AUTOUPDATER=1Install
Uninstall Homebrewbrew uninstall codebuddy-codeInstall
Uninstall npmnpm uninstall -g @tencent-ai/codebuddy-codeInstall
Remove native binaryrm -f ~/.local/bin/codebuddyInstall

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

CommandWhat it doesExample
codebuddyInteractive REPLcodebuddy
codebuddy "query"REPL with an opening promptcodebuddy "Explain this project"
codebuddy -p "query"Print and exitcodebuddy -p "Explain this function"
cat file | codebuddy -p "query"Pipecat logs.txt | codebuddy -p "Analyze the log"
codebuddy -cContinue the latest chatcodebuddy -c
codebuddy -c -p "query"Continue in print modecodebuddy -c -p "Check type errors"
codebuddy -r "<id>" "query"Resume by idcodebuddy -r "abc123" "Finish this MR"
codebuddy updateUpdatecodebuddy update
codebuddy mcpConfigure MCPSee MCP
codebuddy daemon startStart daemoncodebuddy daemon start --port 8080
codebuddy daemon stop / status / restartStop / inspect / restart
codebuddy daemon install / uninstallRegister or remove a system servicecodebuddy daemon install --port 8080
codebuddy auto-mode defaults / config / critiqueInspect auto-mode rules
codebuddy psList workerscodebuddy ps
codebuddy logs <name>Worker logscodebuddy logs feature-x
codebuddy attach <name>Attach to a workercodebuddy attach feature-x
codebuddy kill <name>Kill a workercodebuddy kill feature-x
codebuddy plugin install <plugin>Install a CLI pluginSee plugin reference

Common flags

Source: CLI reference. Daily subset, not the full page.

FlagMeaning
--print, -pPrint and exit
-y / --dangerously-skip-permissionsSkip permission prompts
--permission-modedefault / acceptEdits / auto / dontAsk / plan / bypassPermissions
--continue / -cLatest chat in this directory
--resumeResume by id
--modelModel for this session
--ideConnect to an IDE on start
--add-dirExtra work directory
--sandboxSandbox (Beta)
--worktree [name]Isolated git worktree
--tmuxWith --worktree
--bg / --nameBackground session
--serveHTTP server
--plugin-dirLoad plugins from local dirs
--output-formattext / json / stream-json (print mode)
--max-turnsMax non-interactive turns
--verbose / --debugVerbose / debug
--system-prompt / --append-system-promptReplace or append the system prompt
--mcp-configLoad 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.

CommandRole
/helpHelp
/clearNew conversation
/login / /logoutSign in / out
/initInitialize repo context
/configLocal settings
/modelSwitch or list models
/status / /doctorSession / environment
/mcpMCP
/skillsLoaded Skills
/pluginCLI plugins and marketplaces
/compactCompact context
/cost / /statsToken / usage
/resume / /rewindResume / rewind checkpoint
/permissionsTool and directory permissions
/planPreview the plan file
/ideIDE connection
/sandboxBash sandbox
/memoryLong-term memory
/upgradeOpen 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

KeyAction
↑/↓History; lists background tasks when any are running
TabComplete
EscClear input (twice) / go up
Ctrl+C / Ctrl+DQuit (Ctrl+D needs an empty input, twice)
Shift+Tab (Windows also Alt+M)Permission cycle default → bypass → accept → plan
EnterSend
Shift+Enter / \Enter / Ctrl+JNewline
Ctrl+GEdit the prompt in an external editor
Ctrl+RExpand / collapse detail
Ctrl+OThinking panel

JetBrains terminal: ESC may not work — use Ctrl+ESC or Shift+ESC (troubleshooting).

MCP add (excerpt)

Source: MCP

bash
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/http

Decision table

SituationPick
Already in VS Code / JetBrainsPlugin
One sentence → prototype / design / deployIDE
Terminal / CI / headlessCLI
Office docs / PPT, not a repoWorkBuddy (not taught here)
General chatYuanbao (not taught here)
China accountCLI Chinese Site
Overseas accountCLI International Site

Glossary index

One-line hooks. Definitions live in the Glossary.

TermHookMore
CodeBuddy IDEStandalone editorGlossary
CodeBuddy PluginExtension in an existing IDEGlossary
CodeBuddy CodeTerminal agent, codebuddyGlossary
WorkBuddyOffice workbench, not the coding pathGlossary
CN / intl sitesTwo docs and login domainsGlossary
CODEBUDDY.mdMigratable instruction fileGlossary

Common errors

SymptomOfficial handling
codebuddy: command not foundPATH missing the install dir; source ~/.zshrc
Windows "not recognized"npm config get prefix, add the global npm dir to PATH
npm succeeded, binary still oldMultiple binaries (npm + Homebrew / nvm)
Native binary missingexport PATH="$HOME/.local/bin:$PATH"
-p cannot touch filesAdd -y or another permission policy
LAN --serve empty responseListens on 127.0.0.1; use --host 0.0.0.0

Agent SDK (optional)

Source: Agent SDK. Docs target SDK v0.1.0+.

bash
npm install @tencent-ai/agent-sdk
bash
pip install codebuddy-agent-sdk

TypeScript/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

SourceUse
codebuddy.cnCN marketing site
codebuddy.cn/docsZH overview (three forms)
IDE installIDE requirements and login
Plugin docsHost versions and install
CLI overviewCLI entry
CLI installPackage managers / native / uninstall
CLI quick startLogin, /init, keys, -p
CLI referenceSubcommands and flags
Slash commandsFull / table
TroubleshootingNode, Windows, migration, quota
MCPcodebuddy mcp add
SDKAgent SDK
PricingPlan entry (client-rendered)
Tencent Cloud accCloud product page
Overview 1831Three-form comparison
codebuddy.ai/docsIntl docs
codebuddy.ai/docs/zhIntl ZH mirror
WorkBuddy introMap-row source
WorkBuddy mini programMap row
WorkBuddy mobileMap row
YuanbaoSame-vendor assistant
HunyuanSame-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.md is auto-injected the same way as ~/.codebuddy/CODEBUDDY.md (troubleshooting only names the migration file)

Built for frontend engineers · Powered by VitePress