Skip to main content

CodeBuddy Installation

This page is based on the official CodeBuddy CLI installation guide. Choose the method that fits your environment.

Installation methods

Install via package manager

Node.js package managers

Prerequisite: Node.js 18.20 or later.

Choose one of the following:

npm install -g @tencent-ai/codebuddy-code
pnpm add -g @tencent-ai/codebuddy-code
yarn global add @tencent-ai/codebuddy-code
bun install -g @tencent-ai/codebuddy-code

Homebrew (macOS/Linux)

No Node.js required.

Two-step install:

# Add tap
brew tap Tencent-CodeBuddy/tap

# Install
brew install codebuddy-code

Single-command install:

brew install Tencent-CodeBuddy/tap/codebuddy-code

Brewfile:

tap "Tencent-CodeBuddy/tap"
brew "codebuddy-code"

Verify installation

After installation, run:

codebuddy --version

Install via native binary (Beta)

Beta

The native binary installer is still in beta. If you hit issues, report them on the Issues page or contact support ([email protected]).

Issues page:

Highlights

Compared to the npm version, the native binary offers:

  • A single executable with no extra dependencies
  • No Node.js runtime required
  • A more complete auto-update mechanism

Supported platforms

  • macOS (Apple Silicon M1/M2/M3 or Intel x86_64)
  • Linux (arm64 or x86_64)
  • Windows (x86_64)

Migrate from npm install

If you already installed via npm, run:

codebuddy install

Fresh install

macOS / Linux:

curl -fsSL https://copilot.tencent.com/cli/install.sh | bash

Windows (PowerShell):

irm https://copilot.tencent.com/cli/install.ps1 | iex

Verify installation

The installer downloads the latest version and configures environment variables. Then run:

codebuddy --version

If the command is not found, add the install path to PATH manually.

macOS / Linux:

export PATH="$HOME/.local/bin:$PATH"

# To persist, add to your shell profile:
# Bash: ~/.bashrc or ~/.bash_profile
# Zsh: ~/.zshrc

Windows (PowerShell):

# Add the following path to user environment variables:
# %USERPROFILE%\AppData\Local\codebuddy\bin

Configuration directory

Default CodeBuddy Code config directories:

  • macOS / Linux: ~/.codebuddy
  • Windows: %USERPROFILE%\.codebuddy

Directory contents

~/.codebuddy/
├── settings.json # user settings
├── mcp.json # MCP server config
├── .mcp.json # alternate MCP config
└── skills/ # user-defined skills

Custom config directory

You can set a custom config directory using CODEBUDDY_CONFIG_DIR:

export CODEBUDDY_CONFIG_DIR="$HOME/.my-codebuddy-config"

Useful for:

  • multiple CodeBuddy instances with separate configs
  • centralized config management in enterprise environments

References