原汁原昧 Claude Code 可运行,可构建, 可调试版; 生产级工程化, 企业级可靠性; 安全无毒, 内存泄露修复
Go to file
2026-05-10 14:07:05 +01:00
.claude fix: 修复 anthropic 煞笔的四个 bug (#352) 2026-04-24 20:07:18 +08:00
.github/workflows style: 完成所有文件的lint 2026-05-01 21:39:30 +08:00
.husky fix: 尝试修复 OTEL 的问题 2026-05-04 23:53:28 +08:00
.vscode chore: 添加 VSCode 推荐扩展列表并固定 Bun 运行时版本 2026-05-01 22:28:34 +08:00
docs docs: expand sub-agent architecture guide 2026-05-06 17:26:49 +08:00
learn Fix mintlify validate errors (#367) 2026-04-26 11:07:20 +08:00
packages feat: 尝试改进 Error 处理以提升内存管理效率 2026-05-05 18:18:13 +08:00
scripts feat: ai 的随机修复 2026-05-05 19:36:38 +08:00
spec/feature_20260502_F001_fork-agent-redesign feat: fork-agent-redesign — 新增 AgentTool fork 参数与 spec 设计文档 2026-05-02 23:39:43 +08:00
src feat: implement Gemini OAuth 2.0 flow with automated credential loading and improve prompt language handling. 2026-05-10 14:07:04 +01:00
teach-me Fix mintlify validate errors (#367) 2026-04-26 11:07:20 +08:00
tests feat: add support for local LLM provider and integrate Google OAuth flow 2026-05-10 14:07:04 +01:00
vendor style: 完成所有文件的lint 2026-05-01 21:39:30 +08:00
.dockerignore feat: 支持自托管的 remote-control-server (#214) 2026-04-09 17:40:50 +08:00
.editorconfig style: 完成所有文件的lint 2026-05-01 21:39:30 +08:00
.gitignore chore: update hello-agent language to English and refine .gitignore patterns 2026-05-10 14:07:05 +01:00
.impeccable.md feat: ACP 协议版本 remote control (#293) 2026-04-18 21:54:22 +08:00
.mintignore fix: 修复 mintlify ignore, 修复侧边栏 2026-04-10 18:14:07 +08:00
.npmrc build: 更改构建逻辑 2026-04-19 08:45:06 +08:00
.tool-versions chore: 添加 VSCode 推荐扩展列表并固定 Bun 运行时版本 2026-05-01 22:28:34 +08:00
AGENTS.md chore: 清理仓库审计问题——修正 CLAUDE.md、删除冗余 yoga-layout、清除 621 个未使用的类型 stub (#354) 2026-04-25 08:54:18 +08:00
biome.json style: 修复所有 lint 错误,覆盖 @ant forked 代码 2026-05-01 21:49:21 +08:00
build.ts feat: ai 的随机修复 2026-05-05 19:36:38 +08:00
bun.lock style: 完成所有文件的lint 2026-05-01 21:39:30 +08:00
bunfig.toml feat: 搭建单元测试基础设施 — Bun test runner + 示例测试 2026-04-01 02:08:38 +08:00
CLAUDE.md fix: 内存优化 — 预测性 compact 阈值、增量 lookups orphaned 修复、deferred slice 引用优化 2026-05-02 20:32:00 +08:00
contributors.svg docs: update contributors 2026-05-04 08:44:14 +00:00
DEV-LOG.md feat: 远程群控 (#243) 2026-04-11 23:22:55 +08:00
docs.json style: 完成所有文件的lint 2026-05-01 21:39:30 +08:00
Friends.md docs: 新增留影文档 2026-04-06 11:04:13 +08:00
knip.json style: 完成所有文件的lint 2026-05-01 21:39:30 +08:00
mint.json feat: 恢复 --channels 能力 (#297) 2026-04-19 10:24:34 +08:00
package.json chore: 2.1.0 2026-05-05 21:22:20 +08:00
progress.md fix: 优化压缩错误消息和自动压缩提示的可理解性 2026-05-05 07:19:19 +08:00
README_EN.md feat: implement Gemini OAuth 2.0 flow with automated credential loading and improve prompt language handling. 2026-05-10 14:07:04 +01:00
README.md feat: implement Gemini OAuth 2.0 flow with automated credential loading and improve prompt language handling. 2026-05-10 14:07:04 +01:00
SECURITY.md Create SECURITY.md 2026-04-01 08:54:08 +08:00
tsconfig.base.json feat: 重构供应商层次 (#286) 2026-04-17 09:33:14 +08:00
tsconfig.json style: 完成所有文件的lint 2026-05-01 21:39:30 +08:00
vite.config.ts feat: ai 的随机修复 2026-05-05 19:36:38 +08:00

Claude Code Best V5 (CCB)

GitHub Stars GitHub Contributors GitHub Issues GitHub License Last Commit Bun Discord

Which Claude do you like? The open source one is the best.

A source code decompilation/reverse engineering project of the official Claude Code CLI tool from Anthropic (aka "Old A"). The goal is to reproduce most of the features and engineering capabilities of Claude Code (the user says "Old Lafayette has already paid for it"). Although it's a bit awkward, it's called CCB (Cai Cai Bei / Step on the Back)... Moreover, we have implemented features that are usually limited to the Enterprise edition or require logging into a Claude account, achieving technology democratization.

We will be performing lint standardization across the entire repository during the Labor Day holiday (May 1st). PRs submitted during this period may have many conflicts, so please try to submit large features before then.

Documentation here, PR submissions welcome | Friends list documentation here | Discord Group

Feature Description Documentation
Claude Group Control Pipe IPC multi-instance collaboration: Automatic orchestration of local main/sub instances + zero-config LAN discovery and communication, /pipes selection panel + Shift+↓ interaction + message broadcast routing Pipe IPC / LAN
First-class ACP Protocol Support Supports integration with IDEs like Zed and Cursor, session recovery, Skills, and permission bridging Documentation
Remote Control Private Deployment Docker self-hosted remote interface, allowing you to use CC on your phone Documentation
Langfuse Monitoring Enterprise-grade Agent monitoring, clearly see every agent loop detail, and convert to datasets with one click Documentation
Web Search Built-in web search tool, supports Bing and Brave search Documentation
Poor Mode For the budget-conscious: disables memory extraction and typing suggestions, significantly reducing concurrent requests Toggle with /poor
Channels Notifications MCP server pushes external messages to sessions (Feishu/Slack/Discord/WeChat, etc.), enabled with --channels plugin:name@marketplace Documentation
Custom Model Providers Compatible with OpenAI/Anthropic/Gemini/Grok (/login) Documentation
Voice Mode Voice input, supports Doubao voice input (/voice doubao) Documentation
Computer Use Screenshots, keyboard and mouse control Documentation
Chrome Use Browser automation, form filling, data scraping Self-hosted Native version
Sentry Enterprise-grade error tracking Documentation
GrowthBook Enterprise-grade feature flags Documentation
/dream Memory Consolidation Automatically organize and optimize memory files Documentation

Quick Start (Installation Version)

No need to clone the repository. After downloading from NPM, use it directly.

npm i -g claude-code-best

# Bun installation has many issues, npm is recommended
# bun  i -g claude-code-best
# bun pm -g trust claude-code-best @claude-code-best/mcp-chrome-bridge

ccb # Open Claude Code with Node.js
ccb-bun # Open with Bun
ccb update # Update to the latest version
CLAUDE_BRIDGE_BASE_URL=https://remote-control.claude-code-best.win/ CLAUDE_BRIDGE_OAUTH_TOKEN=test-my-key ccb --remote-control # We have self-deployed remote control

Installation/Update Failed? Run npm rm -g claude-code-best to clean up old versions first, then npm i -g claude-code-best@latest. If it still fails, specify the version number: npm i -g claude-code-best@<version_number>

Quick Start (Source Code Version)

⚙️ Prerequisites

You MUST use the latest version of Bun, otherwise you'll encounter many strange bugs!!! bun upgrade!!!

  • 📦 Bun >= 1.3.11

Installing Bun:

# Linux and macOS
curl -fsSL https://bun.sh/install | bash

# Windows (PowerShell)
powershell -c "irm bun.sh/install.ps1 | iex"

Post-installation steps:

  1. Make bun command recognized in the current terminal

    The installation script will write ~/.bun/bin to your shell configuration file. On macOS with zsh, you will usually see:

    Added "~/.bun/bin" to $PATH in "~/.zshrc"
    

    You can restart your shell as prompted:

    exec /bin/zsh
    

    If using bash, reload the configuration:

    source ~/.bashrc
    

    Windows PowerShell users should close and reopen PowerShell.

  2. Verify Bun is available

    bun --help
    bun --version
    
  3. If Bun is already installed, update to the latest version

    bun upgrade
    
  • ⚙️ Standard CC configuration methods; each provider has its own way.

📍 Execution Directory

  • Commands to install or check Bun can be run in any directory: curl -fsSL https://bun.sh/install | bash, bun --help, bun --version, bun upgrade.
  • To install dependencies, start development mode, or build the project, you MUST be in the repository root directory (the one containing package.json).

📥 Installation

cd /path/to/claude-code
bun install

▶️ Running

# Development mode, version number 888 confirms success
bun run dev

# Build
bun run build

The build uses code splitting for multi-file packaging (build.ts), outputting to the dist/ directory (entry point dist/cli.js + approximately 450 chunk files).

The built version can be started with both Bun and Node.js. You can start it directly if you publish it to a private source.

If you encounter a bug, please open an issue; we prioritize solving them.

👤 New User Configuration /login

After running for the first time, type /login in the REPL to enter the login configuration interface.

  1. Anthropic Compatible: Connect to third-party API services (OpenRouter, AWS Bedrock proxies, etc.) (no official Anthropic account required).
  2. OpenAI / Gemini / Grok: Connect to cloud services using their respective protocols.
    • Gemini (Google Auth): Supports interactive browser login.
      1. In the Google Cloud Console, navigate to APIs & Services > OAuth consent screen and configure the OAuth client (Set User Type to External).
      2. Download the credentials JSON format and save it as /.files/OAuth.json in the project root.
      3. Leave the API Key field blank and press Enter in the /login configuration interface; the CLI will automatically open your browser for Google OAuth 2.0 authorization and fetch available models.
  3. Local LLM: (Recommended) Use models running locally.
    • Supports Ollama, LM Studio, Jan.ai, LocalAI.
    • Ollama Deep Integration: View installed models directly in the CLI, or enter a model name (e.g., llama3.1) to pull it instantly. Supports interactive model selection navigation and hardware status auto-detection.
    • Automatically detects local runner status and default ports.

Supports all Anthropic API compatible services (e.g., OpenRouter, AWS Bedrock proxies, etc.), as long as the interface is compatible with the Messages API.

Feature Flags

All feature toggles are enabled via FEATURE_<FLAG_NAME>=1 environment variables, for example:

FEATURE_BUDDY=1 FEATURE_FORK_SUBAGENT=1 bun run dev

Detailed descriptions of each feature can be found in the docs/features/ directory. Contributions are welcome.

VS Code Debugging

TUI (REPL) mode requires a real terminal and cannot be debugged directly via a VS Code launch configuration. Use attach mode:

Steps

  1. Start the inspect service in a terminal:

    bun run dev:inspect
    

    It will output an address like ws://localhost:8888/xxxxxxxx.

  2. Attach the VS Code debugger:

    • Set breakpoints in src/ files.
    • Press F5 → Select "Attach to Bun (TUI debug)".

Teach Me Learning Project

We've added a new teach-me skill, which uses a Q&A-style guide to help you understand any module of this project. (Adapted from sigma skill).

# Enter directly in the REPL
/teach-me Claude Code Architecture
/teach-me React Ink Terminal Rendering --level beginner
/teach-me Tool System --resume

What it can do

  • Level Diagnosis — Automatically assesses your mastery of related concepts, skipping what you know and focusing on weaknesses.
  • Build Learning Paths — Breaks down topics into 5-15 atomic concepts, progressing step-by-step based on dependencies.
  • Socratic Questioning — Guides your thinking with options rather than giving direct answers.
  • Misconception Tracking — Discovers and corrects deep-seated misunderstandings.
  • Resume Learning--resume continues from where you last left off.

Learning Records

Learning progress is saved in the .claude/skills/teach-me/ directory, supporting cross-topic learner profiles.

Contributors

Contributors

Star History

Star History Chart

Acknowledgments

  • doubaoime-asr — Doubao ASR voice recognition SDK, providing a voice input solution for Voice Mode without requiring Anthropic OAuth.

License

This project is for educational and research purposes only. All rights to Claude Code belong to Anthropic.