README.md

April 1, 2026 ยท View on GitHub

free-code

free-code

The free build of Claude Code.
All telemetry stripped. All guardrails removed. All experimental features unlocked.
One binary, zero callbacks home.

Install Stars Issues Feature Flags IPFS


Quick Install

curl -fsSL https://raw.githubusercontent.com/paoloanzn/free-code/main/install.sh | bash

Checks 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.


Table of Contents


What is this

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:

Telemetry removed

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

Security-prompt guardrails removed

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.

Experimental features unlocked

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.


Model Providers

free-code supports five API providers out of the box. Set the corresponding environment variable to switch providers -- no code changes needed.

Anthropic (Direct API) -- Default

Use Anthropic's first-party API directly.

ModelID
Claude Opus 4.6claude-opus-4-6
Claude Sonnet 4.6claude-sonnet-4-6
Claude Haiku 4.5claude-haiku-4-5

OpenAI Codex

Use OpenAI's Codex models for code generation. Requires a Codex subscription.

ModelID
GPT-5.3 Codex (recommended)gpt-5.3-codex
GPT-5.4gpt-5.4
GPT-5.4 Minigpt-5.4-mini
export CLAUDE_CODE_USE_OPENAI=1
free-code

AWS Bedrock

Route 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-code

Uses 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).

VariablePurpose
CLAUDE_CODE_USE_BEDROCKEnable Bedrock provider
AWS_REGION / AWS_DEFAULT_REGIONAWS region (default: us-east-1)
ANTHROPIC_BEDROCK_BASE_URLCustom Bedrock endpoint
AWS_BEARER_TOKEN_BEDROCKBearer token auth
CLAUDE_CODE_SKIP_BEDROCK_AUTHSkip auth (testing)

Google Cloud Vertex AI

Route requests through your GCP project via Vertex AI.

export CLAUDE_CODE_USE_VERTEX=1
free-code

Uses Google Cloud Application Default Credentials (gcloud auth application-default login). Models are mapped to Vertex format automatically (e.g., claude-opus-4-6@latest).

Anthropic Foundry

Use Anthropic Foundry for dedicated deployments.

export CLAUDE_CODE_USE_FOUNDRY=1
export ANTHROPIC_FOUNDRY_API_KEY="..."
free-code

Supports custom deployment IDs as model names.

Provider Selection Summary

ProviderEnv VariableAuth Method
Anthropic (default)--ANTHROPIC_API_KEY or OAuth
OpenAI CodexCLAUDE_CODE_USE_OPENAI=1OAuth via OpenAI
AWS BedrockCLAUDE_CODE_USE_BEDROCK=1AWS credentials
Google Vertex AICLAUDE_CODE_USE_VERTEX=1gcloud ADC
Anthropic FoundryCLAUDE_CODE_USE_FOUNDRY=1ANTHROPIC_FOUNDRY_API_KEY

Requirements

  • 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 | bash

Build

git clone https://github.com/paoloanzn/free-code.git
cd free-code
bun build
./cli

Build Variants

CommandOutputFeaturesDescription
bun run build./cliVOICE_MODE onlyProduction-like binary
bun run build:dev./cli-devVOICE_MODE onlyDev version stamp
bun run build:dev:full./cli-devAll 54 experimental flagsFull unlock build
bun run compile./dist/cliVOICE_MODE onlyAlternative output path

Custom Feature Flags

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

Usage

# 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

Environment Variables Reference

VariablePurpose
ANTHROPIC_API_KEYAnthropic API key
ANTHROPIC_AUTH_TOKENAuth token (alternative)
ANTHROPIC_MODELOverride default model
ANTHROPIC_BASE_URLCustom API endpoint
ANTHROPIC_DEFAULT_OPUS_MODELCustom Opus model ID
ANTHROPIC_DEFAULT_SONNET_MODELCustom Sonnet model ID
ANTHROPIC_DEFAULT_HAIKU_MODELCustom Haiku model ID
CLAUDE_CODE_OAUTH_TOKENOAuth token via env
CLAUDE_CODE_API_KEY_HELPER_TTL_MSAPI key helper cache TTL

Experimental Features

The bun run build:dev:full build enables all 54 working feature flags. Highlights:

Interaction & UI

FlagDescription
ULTRAPLANRemote multi-agent planning on Claude Code web (Opus-class)
ULTRATHINKDeep thinking mode -- type "ultrathink" to boost reasoning effort
VOICE_MODEPush-to-talk voice input and dictation
TOKEN_BUDGETToken budget tracking and usage warnings
HISTORY_PICKERInteractive prompt history picker
MESSAGE_ACTIONSMessage action entrypoints in the UI
QUICK_SEARCHPrompt quick-search
SHOT_STATSShot-distribution stats

Agents, Memory & Planning

FlagDescription
BUILTIN_EXPLORE_PLAN_AGENTSBuilt-in explore/plan agent presets
VERIFICATION_AGENTVerification agent for task validation
AGENT_TRIGGERSLocal cron/trigger tools for background automation
AGENT_TRIGGERS_REMOTERemote trigger tool path
EXTRACT_MEMORIESPost-query automatic memory extraction
COMPACTION_REMINDERSSmart reminders around context compaction
CACHED_MICROCOMPACTCached microcompact state through query flows
TEAMMEMTeam-memory files and watcher hooks

Tools & Infrastructure

FlagDescription
BRIDGE_MODEIDE remote-control bridge (VS Code, JetBrains)
BASH_CLASSIFIERClassifier-assisted bash permission decisions
PROMPT_CACHE_BREAK_DETECTIONCache-break detection in compaction/query flow

See FEATURES.md for the complete audit of all 88 flags, including 34 broken flags with reconstruction notes.


Project Structure

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

Tech Stack

RuntimeBun
LanguageTypeScript
Terminal UIReact + Ink
CLI ParsingCommander.js
Schema ValidationZod v4
Code Searchripgrep (bundled)
ProtocolsMCP, LSP
APIsAnthropic Messages, OpenAI Codex, AWS Bedrock, Google Vertex AI

IPFS Mirror

A full copy of this repository is permanently pinned on IPFS via Filecoin:

CIDbafybeiegvef3dt24n2znnnmzcud2vxat7y7rl5ikz7y7yoglxappim54bm
Gatewayhttps://w3s.link/ipfs/bafybeiegvef3dt24n2znnnmzcud2vxat7y7rl5ikz7y7yoglxappim54bm

If this repo gets taken down, the code lives on.


Contributing

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.

  1. Fork the repository
  2. Create a feature branch (git checkout -b feat/my-feature)
  3. Commit your changes (git commit -m 'feat: add something')
  4. Push to the branch (git push origin feat/my-feature)
  5. Open a Pull Request

License

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.