codebuddy-cli

TotalClaw 作者 totalclaw

CodeBuddy Code CLI 安装、配置和使用指南。 CodeBuddy Code是腾讯基于人工智能的CLI编程助手,支持自然语言驱动开发。 - 强制触发:CodeBuddy、codebuddy、AI CLI、腾讯AI编码、@tencent-ai/codebuddy-code、终端AI助手 - 在以下情况下使用:安装 CodeBuddy CLI、配置 CodeBuddy、使用 CodeBuddy 命令、排除 CodeBuddy 问题

安装 / 下载方式

TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~pmwalkercao-codebuddy-cli
cURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~pmwalkercao-codebuddy-cli/file -o pmwalkercao-codebuddy-cli.md
# CodeBuddy CLI Skill

AI-powered terminal programming assistant from Tencent.

## Installation

```bash
# Check prerequisites
node -v  # Requires Node.js 18+
npm -v

# Install globally
npm install -g @tencent-ai/codebuddy-code

# Verify
codebuddy --version
```

## Quick Start

1. Navigate to project directory
2. Run `codebuddy` to start interactive session
3. Choose login method:
   - **Google/GitHub**: International version (Gemini, GPT models)
   - **WeChat (微信)**: China version (DeepSeek models)

## CLI Arguments

| Argument | Description |
|----------|-------------|
| `codebuddy "<prompt>"` | Execute single task |
| `-y` / `--dangerously-skip-permissions` | Skip permission confirmations (sandbox only) |
| `-p` / `--print` | Single execution mode (requires `-y` for file ops) |
| `--permission-mode <mode>` | `acceptEdits`, `bypassPermissions`, `default`, `plan` |
| `--version` | Show version |

### Examples

```bash
# Interactive mode
codebuddy

# Single task
codebuddy "帮我优化这个函数的性能"
codebuddy "生成这个 API 的单元测试"
codebuddy "检查这次提交的代码质量"

# Skip permissions (sandbox only)
codebuddy -p "Review code quality" -y
```

## Slash Commands

| Command | Description |
|---------|-------------|
| `/help` | Display available commands |
| `/status` | Show account info and current model |
| `/login` | Switch accounts |
| `/logout` | Sign out |
| `/clear` | Reset conversation history |
| `/exit` | End session |
| `/config` | Open configuration |
| `/doctor` | Diagnose issues |
| `/cost` | Token usage statistics |
| `/init` | Generate CODEBUDDY.md project guide |
| `/memory` | Edit project memory files |

Type `?` during session for keyboard shortcuts.

## Custom Commands

Create `.md` files in:
- **Project**: `.codebuddy/commands/`
- **Global**: `~/.codebuddy/commands/`

## Update

```bash
npm install -g @tencent-ai/codebuddy-code
```

## Security Notes

`--dangerously-skip-permissions` risks: file deletion, scope creep, data loss. **Never use in production.**