本汉化版本没有更改任何原版 逻辑、Agent提示词
只是对可见字符进行了汉化处理
-
下载本仓库到你的电脑中
-
使用git指令
-
直接下载ZIP 并解压缩
-
-
安装环境
-
NodeJs环境安装(必须)
!后续安装自行百度或者无脑下一步即可
-
Python环境安装(推荐)
!后续安装自行百度或者无脑下一步即可
-
-
安装完成后使用以下命令安装bun
npm i bun -g
-
编译
进入到你保存本仓库的位置打开命令窗口
# 安装node_modules bun install # 编译 bun build
-
设置电脑环境
-
设置系统环境变量
右键我的电脑-> 属性 -> 高级系统设置 -> 环境变量 -> 系统变量框中找到变量Path -> 编辑 -> 新建 -> 粘贴直接编译好的cli.exe文件位置
-
-
使用CC-Switch一键配置
cc-switch 是一个便捷的工具,可以快速切换 Claude Code 的 API 配置。
-
手动配置
# Stpe1: 编辑或创建 Claude Code 的配置文件 # MacOS & Linux 为 `~/.claude/settings.json` # Windows 为`用户目录/.claude/settings.json` # `MINIMAX_API_KEY` 需替换为您的 MiniMax API Key # 环境变量 `ANTHROPIC_AUTH_TOKEN` 和 `ANTHROPIC_BASE_URL` 优先级高于配置文件 { "env": { "ANTHROPIC_BASE_URL": "https://api.minimaxi.com/anthropic", "ANTHROPIC_AUTH_TOKEN": "MINIMAX_API_KEY", "API_TIMEOUT_MS": "3000000", "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": 1, "ANTHROPIC_MODEL": "MiniMax-M2.7", "ANTHROPIC_SMALL_FAST_MODEL": "MiniMax-M2.7", "ANTHROPIC_DEFAULT_SONNET_MODEL": "MiniMax-M2.7", "ANTHROPIC_DEFAULT_OPUS_MODEL": "MiniMax-M2.7", "ANTHROPIC_DEFAULT_HAIKU_MODEL": "MiniMax-M2.7" } } # Step2: 编辑或新增 `.claude.json` 文件 # MacOS & Linux 为 `~/.claude.json` # Windows 为`用户目录/.claude.json` # 新增 `hasCompletedOnboarding` 参数 { "hasCompletedOnboarding": true }
The free build of Claude Code.
All telemetry stripped. All guardrails removed. All experimental features unlocked.
One binary, zero callbacks home.
curl -fsSL https://raw.githubusercontent.com/paoloanzn/free-code/main/install.sh | bashChecks your system, installs Bun if needed, clones the repo, builds with all experimental features enabled, and symlinks free-code on your PATH.
Then run free-code and use the /login command to authenticate with your preferred model provider.
- What is this
- Model Providers
- Quick Install
- Requirements
- Build
- Usage
- Experimental Features
- Project Structure
- Tech Stack
- IPFS Mirror
- Contributing
- License
A clean, buildable fork of Anthropic's Claude Code CLI -- the terminal-native AI coding agent. The upstream source became publicly available on March 31, 2026 through a source map exposure in the npm distribution.
This fork applies three categories of changes on top of that snapshot:
The upstream binary phones home through OpenTelemetry/gRPC, GrowthBook analytics, Sentry error reporting, and custom event logging. In this build:
- All outbound telemetry endpoints are dead-code-eliminated or stubbed
- GrowthBook feature flag evaluation still works locally (needed for runtime feature gates) but does not report back
- No crash reports, no usage analytics, no session fingerprinting
Anthropic injects system-level instructions into every conversation that constrain Claude's behavior beyond what the model itself enforces. These include hardcoded refusal patterns, injected "cyber risk" instruction blocks, and managed-settings security overlays pushed from Anthropic's servers.
This build strips those injections. The model's own safety training still applies -- this just removes the extra layer of prompt-level restrictions that the CLI wraps around it.
Claude Code ships with 88 feature flags gated behind bun:bundle compile-time switches. Most are disabled in the public npm release. This build unlocks all 54 flags that compile cleanly. See Experimental Features below, or refer to FEATURES.md for the full audit.
free-code supports five API providers out of the box. Set the corresponding environment variable to switch providers -- no code changes needed.
Use Anthropic's first-party API directly.
| Model | ID |
|---|---|
| Claude Opus 4.6 | claude-opus-4-6 |
| Claude Sonnet 4.6 | claude-sonnet-4-6 |
| Claude Haiku 4.5 | claude-haiku-4-5 |
Use OpenAI's Codex models for code generation. Requires a Codex subscription.
| Model | ID |
|---|---|
| GPT-5.3 Codex (recommended) | gpt-5.3-codex |
| GPT-5.4 | gpt-5.4 |
| GPT-5.4 Mini | gpt-5.4-mini |
export CLAUDE_CODE_USE_OPENAI=1
free-codeRoute requests through your AWS account via Amazon Bedrock.
export CLAUDE_CODE_USE_BEDROCK=1
export AWS_REGION="us-east-1" # or AWS_DEFAULT_REGION
free-codeUses your standard AWS credentials (environment variables, ~/.aws/config, or IAM role). Models are mapped to Bedrock ARN format automatically (e.g., us.anthropic.claude-opus-4-6-v1).
| Variable | Purpose |
|---|---|
CLAUDE_CODE_USE_BEDROCK |
Enable Bedrock provider |
AWS_REGION / AWS_DEFAULT_REGION |
AWS region (default: us-east-1) |
ANTHROPIC_BEDROCK_BASE_URL |
Custom Bedrock endpoint |
AWS_BEARER_TOKEN_BEDROCK |
Bearer token auth |
CLAUDE_CODE_SKIP_BEDROCK_AUTH |
Skip auth (testing) |
Route requests through your GCP project via Vertex AI.
export CLAUDE_CODE_USE_VERTEX=1
free-codeUses Google Cloud Application Default Credentials (gcloud auth application-default login). Models are mapped to Vertex format automatically (e.g., claude-opus-4-6@latest).
Use Anthropic Foundry for dedicated deployments.
export CLAUDE_CODE_USE_FOUNDRY=1
export ANTHROPIC_FOUNDRY_API_KEY="..."
free-codeSupports custom deployment IDs as model names.
| Provider | Env Variable | Auth Method |
|---|---|---|
| Anthropic (default) | -- | ANTHROPIC_API_KEY or OAuth |
| OpenAI Codex | CLAUDE_CODE_USE_OPENAI=1 |
OAuth via OpenAI |
| AWS Bedrock | CLAUDE_CODE_USE_BEDROCK=1 |
AWS credentials |
| Google Vertex AI | CLAUDE_CODE_USE_VERTEX=1 |
gcloud ADC |
| Anthropic Foundry | CLAUDE_CODE_USE_FOUNDRY=1 |
ANTHROPIC_FOUNDRY_API_KEY |
- Runtime: Bun >= 1.3.11
- OS: macOS or Linux (Windows via WSL)
- Auth: An API key or OAuth login for your chosen provider
# Install Bun if you don't have it
curl -fsSL https://bun.sh/install | bashgit clone https://github.com/paoloanzn/free-code.git
cd free-code
bun build
./cli| Command | Output | Features | Description |
|---|---|---|---|
bun run build |
./cli |
VOICE_MODE only |
Production-like binary |
bun run build:dev |
./cli-dev |
VOICE_MODE only |
Dev version stamp |
bun run build:dev:full |
./cli-dev |
All 54 experimental flags | Full unlock build |
bun run compile |
./dist/cli |
VOICE_MODE only |
Alternative output path |
Enable specific flags without the full bundle:
# Enable just ultraplan and ultrathink
bun run ./scripts/build.ts --feature=ULTRAPLAN --feature=ULTRATHINK
# Add a flag on top of the dev build
bun run ./scripts/build.ts --dev --feature=BRIDGE_MODE# Interactive REPL (default)
./cli
# One-shot mode
./cli -p "what files are in this directory?"
# Specify a model
./cli --model claude-opus-4-6
# Run from source (slower startup)
bun run dev
# OAuth login
./cli /login| Variable | Purpose |
|---|---|
ANTHROPIC_API_KEY |
Anthropic API key |
ANTHROPIC_AUTH_TOKEN |
Auth token (alternative) |
ANTHROPIC_MODEL |
Override default model |
ANTHROPIC_BASE_URL |
Custom API endpoint |
ANTHROPIC_DEFAULT_OPUS_MODEL |
Custom Opus model ID |
ANTHROPIC_DEFAULT_SONNET_MODEL |
Custom Sonnet model ID |
ANTHROPIC_DEFAULT_HAIKU_MODEL |
Custom Haiku model ID |
CLAUDE_CODE_OAUTH_TOKEN |
OAuth token via env |
CLAUDE_CODE_API_KEY_HELPER_TTL_MS |
API key helper cache TTL |
The bun run build:dev:full build enables all 54 working feature flags. Highlights:
| Flag | Description |
|---|---|
ULTRAPLAN |
Remote multi-agent planning on Claude Code web (Opus-class) |
ULTRATHINK |
Deep thinking mode -- type "ultrathink" to boost reasoning effort |
VOICE_MODE |
Push-to-talk voice input and dictation |
TOKEN_BUDGET |
Token budget tracking and usage warnings |
HISTORY_PICKER |
Interactive prompt history picker |
MESSAGE_ACTIONS |
Message action entrypoints in the UI |
QUICK_SEARCH |
Prompt quick-search |
SHOT_STATS |
Shot-distribution stats |
| Flag | Description |
|---|---|
BUILTIN_EXPLORE_PLAN_AGENTS |
Built-in explore/plan agent presets |
VERIFICATION_AGENT |
Verification agent for task validation |
AGENT_TRIGGERS |
Local cron/trigger tools for background automation |
AGENT_TRIGGERS_REMOTE |
Remote trigger tool path |
EXTRACT_MEMORIES |
Post-query automatic memory extraction |
COMPACTION_REMINDERS |
Smart reminders around context compaction |
CACHED_MICROCOMPACT |
Cached microcompact state through query flows |
TEAMMEM |
Team-memory files and watcher hooks |
| Flag | Description |
|---|---|
BRIDGE_MODE |
IDE remote-control bridge (VS Code, JetBrains) |
BASH_CLASSIFIER |
Classifier-assisted bash permission decisions |
PROMPT_CACHE_BREAK_DETECTION |
Cache-break detection in compaction/query flow |
See FEATURES.md for the complete audit of all 88 flags, including 34 broken flags with reconstruction notes.
scripts/
build.ts # Build script with feature flag system
src/
entrypoints/cli.tsx # CLI entrypoint
commands.ts # Command registry (slash commands)
tools.ts # Tool registry (agent tools)
QueryEngine.ts # LLM query engine
screens/REPL.tsx # Main interactive UI (Ink/React)
commands/ # /slash command implementations
tools/ # Agent tool implementations (Bash, Read, Edit, etc.)
components/ # Ink/React terminal UI components
hooks/ # React hooks
services/ # API clients, MCP, OAuth, analytics
api/ # API client + Codex fetch adapter
oauth/ # OAuth flows (Anthropic + OpenAI)
state/ # App state store
utils/ # Utilities
model/ # Model configs, providers, validation
skills/ # Skill system
plugins/ # Plugin system
bridge/ # IDE bridge
voice/ # Voice input
tasks/ # Background task management
| Runtime | Bun |
| Language | TypeScript |
| Terminal UI | React + Ink |
| CLI Parsing | Commander.js |
| Schema Validation | Zod v4 |
| Code Search | ripgrep (bundled) |
| Protocols | MCP, LSP |
| APIs | Anthropic Messages, OpenAI Codex, AWS Bedrock, Google Vertex AI |
A full copy of this repository is permanently pinned on IPFS via Filecoin:
| CID | bafybeiegvef3dt24n2znnnmzcud2vxat7y7rl5ikz7y7yoglxappim54bm |
| Gateway | https://w3s.link/ipfs/bafybeiegvef3dt24n2znnnmzcud2vxat7y7rl5ikz7y7yoglxappim54bm |
If this repo gets taken down, the code lives on.
Contributions are welcome. If you're working on restoring one of the 34 broken feature flags, check the reconstruction notes in FEATURES.md first -- many are close to compiling and just need a small wrapper or missing asset.
- Fork the repository
- Create a feature branch (
git checkout -b feat/my-feature) - Commit your changes (
git commit -m 'feat: add something') - Push to the branch (
git push origin feat/my-feature) - Open a Pull Request
The original Claude Code source is the property of Anthropic. This fork exists because the source was publicly exposed through their npm distribution. Use at your own discretion.
