{"id":50608859,"url":"https://github.com/zhitrend/free-code","last_synced_at":"2026-06-06T01:30:44.976Z","repository":{"id":349537467,"uuid":"1202769886","full_name":"zhitrend/free-code","owner":"zhitrend","description":null,"archived":false,"fork":false,"pushed_at":"2026-04-06T11:36:23.000Z","size":12468,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-06T13:28:25.051Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zhitrend.png","metadata":{"files":{"readme":"README.md","changelog":"changes.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-06T11:33:48.000Z","updated_at":"2026-04-06T11:36:33.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/zhitrend/free-code","commit_stats":null,"previous_names":["zhitrend/free-code"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/zhitrend/free-code","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhitrend%2Ffree-code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhitrend%2Ffree-code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhitrend%2Ffree-code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhitrend%2Ffree-code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhitrend","download_url":"https://codeload.github.com/zhitrend/free-code/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhitrend%2Ffree-code/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33966639,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-05T02:00:06.157Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-06T01:30:43.990Z","updated_at":"2026-06-06T01:30:44.964Z","avatar_url":"https://github.com/zhitrend.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/screenshot.png\" alt=\"free-code\" width=\"720\" /\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003efree-code\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eThe free build of Claude Code.\u003c/strong\u003e\u003cbr\u003e\n  All telemetry stripped. All guardrails removed. All experimental features unlocked.\u003cbr\u003e\n  One binary, zero callbacks home.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#quick-install\"\u003e\u003cimg src=\"https://img.shields.io/badge/install-one--liner-blue?style=flat-square\" alt=\"Install\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/paoloanzn/free-code/stargazers\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/paoloanzn/free-code?style=flat-square\" alt=\"Stars\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/paoloanzn/free-code/issues\"\u003e\u003cimg src=\"https://img.shields.io/github/issues/paoloanzn/free-code?style=flat-square\" alt=\"Issues\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/paoloanzn/free-code/blob/main/FEATURES.md\"\u003e\u003cimg src=\"https://img.shields.io/badge/features-88%20flags-orange?style=flat-square\" alt=\"Feature Flags\" /\u003e\u003c/a\u003e\n  \u003ca href=\"#ipfs-mirror\"\u003e\u003cimg src=\"https://img.shields.io/badge/IPFS-mirrored-teal?style=flat-square\" alt=\"IPFS\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## Quick Install\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/paoloanzn/free-code/main/install.sh | bash\n```\n\nChecks your system, installs Bun if needed, clones the repo, builds with all experimental features enabled, and symlinks `free-code` on your PATH.\n\nThen run `free-code` and use the `/login` command to authenticate with your preferred model provider.\n\n---\n\n## Table of Contents\n\n- [What is this](#what-is-this)\n- [Model Providers](#model-providers)\n- [Quick Install](#quick-install)\n- [Requirements](#requirements)\n- [Build](#build)\n- [Usage](#usage)\n- [Experimental Features](#experimental-features)\n- [Project Structure](#project-structure)\n- [Tech Stack](#tech-stack)\n- [IPFS Mirror](#ipfs-mirror)\n- [Contributing](#contributing)\n- [License](#license)\n\n---\n\n## What is this\n\nA clean, buildable fork of Anthropic's [Claude Code](https://docs.anthropic.com/en/docs/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.\n\nThis fork applies three categories of changes on top of that snapshot:\n\n### Telemetry removed\n\nThe upstream binary phones home through OpenTelemetry/gRPC, GrowthBook analytics, Sentry error reporting, and custom event logging. In this build:\n\n- All outbound telemetry endpoints are dead-code-eliminated or stubbed\n- GrowthBook feature flag evaluation still works locally (needed for runtime feature gates) but does not report back\n- No crash reports, no usage analytics, no session fingerprinting\n\n### Security-prompt guardrails removed\n\nAnthropic 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.\n\nThis 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.\n\n### Experimental features unlocked\n\nClaude 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](#experimental-features) below, or refer to [FEATURES.md](FEATURES.md) for the full audit.\n\n---\n\n## Model Providers\n\nfree-code supports **five API providers** out of the box. Set the corresponding environment variable to switch providers -- no code changes needed.\n\n### Anthropic (Direct API) -- Default\n\nUse Anthropic's first-party API directly.\n\n| Model | ID |\n|---|---|\n| Claude Opus 4.6 | `claude-opus-4-6` |\n| Claude Sonnet 4.6 | `claude-sonnet-4-6` |\n| Claude Haiku 4.5 | `claude-haiku-4-5` |\n\n### OpenAI Codex\n\nUse OpenAI's Codex models for code generation. Requires a Codex subscription.\n\n| Model | ID |\n|---|---|\n| GPT-5.3 Codex (recommended) | `gpt-5.3-codex` |\n| GPT-5.4 | `gpt-5.4` |\n| GPT-5.4 Mini | `gpt-5.4-mini` |\n\n```bash\nexport CLAUDE_CODE_USE_OPENAI=1\nfree-code\n```\n\n### AWS Bedrock\n\nRoute requests through your AWS account via Amazon Bedrock.\n\n```bash\nexport CLAUDE_CODE_USE_BEDROCK=1\nexport AWS_REGION=\"us-east-1\"   # or AWS_DEFAULT_REGION\nfree-code\n```\n\nUses 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`).\n\n| Variable | Purpose |\n|---|---|\n| `CLAUDE_CODE_USE_BEDROCK` | Enable Bedrock provider |\n| `AWS_REGION` / `AWS_DEFAULT_REGION` | AWS region (default: `us-east-1`) |\n| `ANTHROPIC_BEDROCK_BASE_URL` | Custom Bedrock endpoint |\n| `AWS_BEARER_TOKEN_BEDROCK` | Bearer token auth |\n| `CLAUDE_CODE_SKIP_BEDROCK_AUTH` | Skip auth (testing) |\n\n### Google Cloud Vertex AI\n\nRoute requests through your GCP project via Vertex AI.\n\n```bash\nexport CLAUDE_CODE_USE_VERTEX=1\nfree-code\n```\n\nUses Google Cloud Application Default Credentials (`gcloud auth application-default login`). Models are mapped to Vertex format automatically (e.g., `claude-opus-4-6@latest`).\n\n### Anthropic Foundry\n\nUse Anthropic Foundry for dedicated deployments.\n\n```bash\nexport CLAUDE_CODE_USE_FOUNDRY=1\nexport ANTHROPIC_FOUNDRY_API_KEY=\"...\"\nfree-code\n```\n\nSupports custom deployment IDs as model names.\n\n### Provider Selection Summary\n\n| Provider | Env Variable | Auth Method |\n|---|---|---|\n| Anthropic (default) | -- | `ANTHROPIC_API_KEY` or OAuth |\n| OpenAI Codex | `CLAUDE_CODE_USE_OPENAI=1` | OAuth via OpenAI |\n| AWS Bedrock | `CLAUDE_CODE_USE_BEDROCK=1` | AWS credentials |\n| Google Vertex AI | `CLAUDE_CODE_USE_VERTEX=1` | `gcloud` ADC |\n| Anthropic Foundry | `CLAUDE_CODE_USE_FOUNDRY=1` | `ANTHROPIC_FOUNDRY_API_KEY` |\n\n---\n\n## Requirements\n\n- **Runtime**: [Bun](https://bun.sh) \u003e= 1.3.11\n- **OS**: macOS or Linux (Windows via WSL)\n- **Auth**: An API key or OAuth login for your chosen provider\n\n```bash\n# Install Bun if you don't have it\ncurl -fsSL https://bun.sh/install | bash\n```\n\n---\n\n## Build\n\n```bash\ngit clone https://github.com/paoloanzn/free-code.git\ncd free-code\nbun build\n./cli\n```\n\n### Build Variants\n\n| Command | Output | Features | Description |\n|---|---|---|---|\n| `bun run build` | `./cli` | `VOICE_MODE` only | Production-like binary |\n| `bun run build:dev` | `./cli-dev` | `VOICE_MODE` only | Dev version stamp |\n| `bun run build:dev:full` | `./cli-dev` | All 54 experimental flags | Full unlock build |\n| `bun run compile` | `./dist/cli` | `VOICE_MODE` only | Alternative output path |\n\n### Custom Feature Flags\n\nEnable specific flags without the full bundle:\n\n```bash\n# Enable just ultraplan and ultrathink\nbun run ./scripts/build.ts --feature=ULTRAPLAN --feature=ULTRATHINK\n\n# Add a flag on top of the dev build\nbun run ./scripts/build.ts --dev --feature=BRIDGE_MODE\n```\n\n---\n\n## Usage\n\n```bash\n# Interactive REPL (default)\n./cli\n\n# One-shot mode\n./cli -p \"what files are in this directory?\"\n\n# Specify a model\n./cli --model claude-opus-4-6\n\n# Run from source (slower startup)\nbun run dev\n\n# OAuth login\n./cli /login\n```\n\n### Environment Variables Reference\n\n| Variable | Purpose |\n|---|---|\n| `ANTHROPIC_API_KEY` | Anthropic API key |\n| `ANTHROPIC_AUTH_TOKEN` | Auth token (alternative) |\n| `ANTHROPIC_MODEL` | Override default model |\n| `ANTHROPIC_BASE_URL` | Custom API endpoint |\n| `ANTHROPIC_DEFAULT_OPUS_MODEL` | Custom Opus model ID |\n| `ANTHROPIC_DEFAULT_SONNET_MODEL` | Custom Sonnet model ID |\n| `ANTHROPIC_DEFAULT_HAIKU_MODEL` | Custom Haiku model ID |\n| `CLAUDE_CODE_OAUTH_TOKEN` | OAuth token via env |\n| `CLAUDE_CODE_API_KEY_HELPER_TTL_MS` | API key helper cache TTL |\n\n---\n\n## Experimental Features\n\nThe `bun run build:dev:full` build enables all 54 working feature flags. Highlights:\n\n### Interaction \u0026 UI\n\n| Flag | Description |\n|---|---|\n| `ULTRAPLAN` | Remote multi-agent planning on Claude Code web (Opus-class) |\n| `ULTRATHINK` | Deep thinking mode -- type \"ultrathink\" to boost reasoning effort |\n| `VOICE_MODE` | Push-to-talk voice input and dictation |\n| `TOKEN_BUDGET` | Token budget tracking and usage warnings |\n| `HISTORY_PICKER` | Interactive prompt history picker |\n| `MESSAGE_ACTIONS` | Message action entrypoints in the UI |\n| `QUICK_SEARCH` | Prompt quick-search |\n| `SHOT_STATS` | Shot-distribution stats |\n\n### Agents, Memory \u0026 Planning\n\n| Flag | Description |\n|---|---|\n| `BUILTIN_EXPLORE_PLAN_AGENTS` | Built-in explore/plan agent presets |\n| `VERIFICATION_AGENT` | Verification agent for task validation |\n| `AGENT_TRIGGERS` | Local cron/trigger tools for background automation |\n| `AGENT_TRIGGERS_REMOTE` | Remote trigger tool path |\n| `EXTRACT_MEMORIES` | Post-query automatic memory extraction |\n| `COMPACTION_REMINDERS` | Smart reminders around context compaction |\n| `CACHED_MICROCOMPACT` | Cached microcompact state through query flows |\n| `TEAMMEM` | Team-memory files and watcher hooks |\n\n### Tools \u0026 Infrastructure\n\n| Flag | Description |\n|---|---|\n| `BRIDGE_MODE` | IDE remote-control bridge (VS Code, JetBrains) |\n| `BASH_CLASSIFIER` | Classifier-assisted bash permission decisions |\n| `PROMPT_CACHE_BREAK_DETECTION` | Cache-break detection in compaction/query flow |\n\nSee [FEATURES.md](FEATURES.md) for the complete audit of all 88 flags, including 34 broken flags with reconstruction notes.\n\n---\n\n## Project Structure\n\n```\nscripts/\n  build.ts                # Build script with feature flag system\n\nsrc/\n  entrypoints/cli.tsx     # CLI entrypoint\n  commands.ts             # Command registry (slash commands)\n  tools.ts                # Tool registry (agent tools)\n  QueryEngine.ts          # LLM query engine\n  screens/REPL.tsx        # Main interactive UI (Ink/React)\n\n  commands/               # /slash command implementations\n  tools/                  # Agent tool implementations (Bash, Read, Edit, etc.)\n  components/             # Ink/React terminal UI components\n  hooks/                  # React hooks\n  services/               # API clients, MCP, OAuth, analytics\n    api/                  # API client + Codex fetch adapter\n    oauth/                # OAuth flows (Anthropic + OpenAI)\n  state/                  # App state store\n  utils/                  # Utilities\n    model/                # Model configs, providers, validation\n  skills/                 # Skill system\n  plugins/                # Plugin system\n  bridge/                 # IDE bridge\n  voice/                  # Voice input\n  tasks/                  # Background task management\n```\n\n---\n\n## Tech Stack\n\n| | |\n|---|---|\n| **Runtime** | [Bun](https://bun.sh) |\n| **Language** | TypeScript |\n| **Terminal UI** | React + [Ink](https://github.com/vadimdemedes/ink) |\n| **CLI Parsing** | [Commander.js](https://github.com/tj/commander.js) |\n| **Schema Validation** | Zod v4 |\n| **Code Search** | ripgrep (bundled) |\n| **Protocols** | MCP, LSP |\n| **APIs** | Anthropic Messages, OpenAI Codex, AWS Bedrock, Google Vertex AI |\n\n---\n\n## IPFS Mirror\n\nA full copy of this repository is permanently pinned on IPFS via Filecoin:\n\n| | |\n|---|---|\n| **CID** | `bafybeiegvef3dt24n2znnnmzcud2vxat7y7rl5ikz7y7yoglxappim54bm` |\n| **Gateway** | https://w3s.link/ipfs/bafybeiegvef3dt24n2znnnmzcud2vxat7y7rl5ikz7y7yoglxappim54bm |\n\nIf this repo gets taken down, the code lives on.\n\n---\n\n## Contributing\n\nContributions are welcome. If you're working on restoring one of the 34 broken feature flags, check the reconstruction notes in [FEATURES.md](FEATURES.md) first -- many are close to compiling and just need a small wrapper or missing asset.\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feat/my-feature`)\n3. Commit your changes (`git commit -m 'feat: add something'`)\n4. Push to the branch (`git push origin feat/my-feature`)\n5. Open a Pull Request\n\n---\n\n## License\n\nThe 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.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhitrend%2Ffree-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhitrend%2Ffree-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhitrend%2Ffree-code/lists"}