- Updated test files to use `afterAll` for restoring mocks, ensuring cleaner test environments. - Simplified platform mocking in `modifiers-napi` tests to avoid global state mutations. - Enhanced `useFrustrationDetection` tests with clearer structure and consistent timeout settings. - Consolidated React and Ink mocks into a dedicated `test-mock.ts` file for reuse across tests. - Improved readability and maintainability of tests by standardizing timeout configurations. - Adjusted imports and module mocks to prevent interference between test files. |
||
|---|---|---|
| .claude | ||
| .files | ||
| .github | ||
| .husky | ||
| .vscode | ||
| docs | ||
| packages | ||
| scripts | ||
| spec | ||
| src | ||
| teach-me | ||
| tests | ||
| vendor | ||
| .dockerignore | ||
| .editorconfig | ||
| .gitignore | ||
| .impeccable.md | ||
| .mintignore | ||
| .npmrc | ||
| .tool-versions | ||
| AGENTS.md | ||
| biome.json | ||
| build.ts | ||
| bun.lock | ||
| bunfig.toml | ||
| CLAUDE.md | ||
| codecov.yml | ||
| contributors.svg | ||
| DEV-LOG.md | ||
| docs.json | ||
| Friends.md | ||
| knip.json | ||
| mint.json | ||
| package.json | ||
| progress.md | ||
| README_EN.md | ||
| README.md | ||
| SECURITY.md | ||
| test-mock.ts | ||
| tsconfig.base.json | ||
| tsconfig.json | ||
| vite.config.ts | ||
Claude Code Best V5 (CCB)
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-bestto clean up old versions first, thennpm 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:
-
Make
buncommand recognized in the current terminalThe installation script will write
~/.bun/binto 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/zshIf using bash, reload the configuration:
source ~/.bashrcWindows PowerShell users should close and reopen PowerShell.
-
Verify Bun is available
bun --help bun --version -
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.
- Anthropic Compatible: Connect to third-party API services (OpenRouter, AWS Bedrock proxies, etc.) (no official Anthropic account required).
- OpenAI / Gemini / Grok: Connect to cloud services using their respective protocols.
- Gemini (Google Auth): Supports interactive browser login.
- In the Google Cloud Console, navigate to APIs & Services > OAuth consent screen and configure the OAuth client (Set User Type to External).
- Download the credentials JSON format and save it as
.files/OAuth.jsonin the project root. 3. Leave the API Key field blank and press Enter in the/loginconfiguration interface; the CLI will automatically open your browser for Google OAuth 2.0 authorization and fetch available models.
- Gemini (Google Auth): Supports interactive browser login.
- 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.
Environment Variables
In addition to interactive /login configuration, you can also configure the CLI via environment variables:
LOCAL_BASE_URL: The base URL for the local LLM runner (e.g.,http://localhost:11434).LOCAL_MODEL: The model name for the local LLM (e.g.,llama3.1). Overrides the default model when using thelocalprovider.
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
-
Start the inspect service in a terminal:
bun run dev:inspectIt will output an address like
ws://localhost:8888/xxxxxxxx. -
Attach the VS Code debugger:
- Set breakpoints in
src/files. - Press F5 → Select "Attach to Bun (TUI debug)".
- Set breakpoints in
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 —
--resumecontinues from where you last left off.
Learning Records
Learning progress is saved in the .claude/skills/teach-me/ directory, supporting cross-topic learner profiles.
Related Documents and Websites
- Online Documentation (Mintlify): ccb.agent-aura.top — Documentation source code is in the
docs/directory; PRs are welcome. - DeepWiki: https://deepwiki.com/claude-code-best/claude-code
Contributors
Star History
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.