MCPcopy
hub / github.com/claude-code-best/claude-code

github.com/claude-code-best/claude-code @v2.8.2 sqlite

repository ↗ · DeepWiki ↗ · release v2.8.2 ↗
16,372 symbols 61,822 edges 3,252 files 1,938 documented · 12%
README

Claude Code Best V5 (CCB)

GitHub Stars GitHub Contributors GitHub Issues GitHub License Last Commit Bun

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

A reverse-engineered / decompiled source restoration of Anthropic's official Claude Code CLI tool. The goal is to reproduce most of Claude Code's functionality and engineering capabilities. It's abbreviated as CCB.

Documentation (Chinese) — PR contributions welcome.

Sponsor placeholder.

  • [x] v1: Basic runability and type checking pass
  • [x] V2: Complete engineering infrastructure
  • [ ] Biome formatting may not be implemented first to avoid code conflicts
  • [x] Build pipeline complete, output runnable on both Node.js and Bun
  • [x] V3: Extensive documentation and documentation site improvements
  • [x] V4: Large-scale test suite for improved stability
  • [x] Buddy pet feature restored Docs
  • [x] Auto Mode restored Docs
  • [x] All features now configurable via environment variables instead of bun --feature
  • [x] V5: Enterprise-grade monitoring/reporting, missing tools补全, restrictions removed
  • [x] Removed anti-distillation code
  • [x] Web search capability (using Bing) Docs
  • [x] Debug mode support Docs
  • [x] Disabled auto-updates
  • [x] Custom Sentry error reporting support Docs
  • [x] Custom GrowthBook support (GB is open source — configure your own feature flag platform) Docs
  • [x] Custom login mode — configure Claude models your way
  • [ ] V6: Large-scale refactoring, full modular packaging
  • [ ] V6 will be a new branch; main branch will be archived as a historical version

I don't know how long this project will survive. Star + Fork + git clone + .zip is the safest bet.

This project updates rapidly — Opus continuously optimizes in the background, with new changes almost every few hours.

Claude has burned over $1000, out of budget, switching to GLM to continue; @zai-org GLM 5.1 is quite capable.

Quick Start

Prerequisites

Make sure you're on the latest version of Bun, otherwise you'll run into all sorts of weird bugs. Run bun upgrade!

  • Bun >= 1.3.11

Install 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 available in the current terminal

The installer adds ~/.bun/bin to the matching shell configuration file. On macOS with the default zsh shell, you may see:

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

Restart the current shell as the installer suggests:

bash exec /bin/zsh

If you use bash, reload the bash configuration:

bash source ~/.bashrc

Windows PowerShell users can close and reopen PowerShell.

  1. Verify that Bun is available: bash bun --help bun --version

  2. Update to latest version (if already installed): bash bun upgrade

  3. Standard Claude Code configuration — each provider has its own setup method

Command Execution Location

  • Bun installation and checking commands can be run from any directory: curl -fsSL https://bun.sh/install | bash, bun --help, bun --version, bun upgrade
  • Project dependency installation, development mode, and builds must be run from this repository root, the directory containing package.json.

Install

cd /path/to/claude-code
bun install

Run

# Dev mode — if you see version 888, it's working
bun run dev

# Build
bun run build

The build uses code splitting (build.ts), outputting to dist/ (entry dist/cli.js + ~450 chunk files).

The build output runs on both Bun and Node.js — you can publish to a private registry and run directly.

If you encounter a bug, please open an issue — we'll prioritize it.

First-time Setup /login

After the first run, enter /login in the REPL to access the login configuration screen. Select Anthropic Compatible to connect to third-party API-compatible services (no Anthropic account required).

Fields to fill in:

Field Description Example
Base URL API service URL https://api.example.com/v1
API Key Authentication key sk-xxx
Haiku Model Fast model ID claude-haiku-4-5-20251001
Sonnet Model Balanced model ID claude-sonnet-4-6
Opus Model High-performance model ID claude-opus-4-6
  • Tab / Shift+Tab to switch fields, Enter to confirm and move to the next, press Enter on the last field to save
  • Model fields auto-fill from current environment variables
  • Configuration saves to ~/.claude/settings.json under the env key, effective immediately

You can also edit ~/.claude/settings.json directly:

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.example.com/v1",
    "ANTHROPIC_AUTH_TOKEN": "sk-xxx",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4-5-20251001",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4-6",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-6"
  }
}

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

See docs/features/ for detailed descriptions of each feature. Contributions welcome.

VS Code Debugging

The TUI (REPL) mode requires a real terminal and cannot be launched directly via VS Code's launch config. Use attach mode:

Steps

  1. Start inspect server in terminal: bash bun run dev:inspect This outputs an address like ws://localhost:8888/xxxxxxxx.

  2. Attach debugger from VS Code:

  3. Set breakpoints in src/ files
  4. Press F5 → select "Attach to Bun (TUI debug)"

Documentation & Links

  • Online docs (Mintlify): ccb.agent-aura.top — source in docs/, PR contributions welcome
  • DeepWiki: https://deepwiki.com/claude-code-best/claude-code

Contributors

Star History

Star History Chart

License

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

Extension points exported contracts — how you extend this code

WebSearchAdapter (Interface)
(no doc) [11 implementers]
packages/builtin-tools/src/tools/WebSearchTool/adapters/types.ts
SSEWriter (Interface)
(no doc) [6 implementers]
packages/remote-control-server/src/transport/sse-writer.ts
Logger (Interface)
(no doc) [5 implementers]
packages/mcp-client/src/interfaces.ts
IParsedCommand (Interface)
(no doc) [4 implementers]
src/utils/bash/ParsedCommand.ts
BgEngine (Interface)
(no doc) [4 implementers]
src/cli/bg/engine.ts
Logger (Interface)
(no doc) [3 implementers]
packages/@ant/computer-use-mcp/src/types.ts
Query (Interface)
(no doc) [3 implementers]
src/entrypoints/sdk/runtimeTypes.ts
SSHAuthProxy (Interface)
(no doc) [3 implementers]
src/ssh/SSHAuthProxy.ts

Core symbols most depended-on inside this repo

push
called by 3316
src/services/acp/utils.ts
logForDebugging
called by 2753
src/utils/debug.ts
logEvent
called by 1208
src/services/analytics/index.ts
now
called by 1072
src/utils/profilerBase.ts
get
called by 1007
packages/cloud-artifacts/src/types.d.ts
has
called by 716
src/utils/fileStateCache.ts
set
called by 669
src/utils/fileStateCache.ts
logError
called by 633
src/utils/log.ts

Shape

Function 13,794
Method 1,606
Interface 557
Class 414
Enum 1

Languages

TypeScript100%
Python1%

Modules by API surface

src/bootstrap/state.ts208 symbols
src/utils/sessionStorage.ts158 symbols
packages/@ant/ink/src/core/yoga-layout/index.ts144 symbols
src/utils/messages.ts124 symbols
src/utils/Cursor.ts101 symbols
src/utils/bash/bashParser.ts84 symbols
packages/@ant/computer-use-mcp/src/toolCalls.ts80 symbols
src/utils/attachments.ts75 symbols
src/utils/auth.ts69 symbols
src/utils/hooks.ts68 symbols
src/services/mcp/client.ts68 symbols
src/utils/sandbox/sandbox-adapter.ts59 symbols

Dependencies from manifests, versioned

@agentclientprotocol/sdk0.19.0 · 1×
@ai-sdk/react3.0.170 · 1×
@alcalzone/ansi-tokenize0.3.0 · 1×
@ant/claude-for-chrome-mcpworkspace:* · 1×
@ant/computer-use-inputworkspace:* · 1×
@ant/computer-use-mcpworkspace:* · 1×
@ant/computer-use-swiftworkspace:* · 1×
@ant/model-providerworkspace:* · 1×
@anthropic-ai/bedrock-sdk0.29.0 · 1×
@anthropic-ai/claude-agent-sdk0.2.114 · 1×
@anthropic-ai/foundry-sdk0.2.3 · 1×
@anthropic-ai/mcpb2.1.2 · 1×

For agents

$ claude mcp add claude-code \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact