free-claude-code README

项目的 README,来自 github.com/Alishahryar1/free-claude-code。合并为一个 markdown 文件:README.md。

Free Claude Code

License: AGPL v3 Python 3.14 Package Manager: uv Testing: Pytest Type Checker: Pyrefly Formatter: Ruff Logging: Loguru

Quick Start · Providers · Integrations · API · Phone · Manage

Independent open-source project. Not affiliated with or endorsed by Anthropic. Claude and Claude Code are trademarks of Anthropic.

Features

Free-tier availability and limits are controlled by each provider and may change.

Claude Code running with Free Claude Code

Claude Code running with FCC.

Native Codex browser session in FCC, showing model controls and a repository exploration

A native Codex session in FCC's browser UI.

Quick Start

1. Install

macOS/Linux:

curl -fsSL "https://raw.githubusercontent.com/Alishahryar1/free-claude-code/main/scripts/install.sh" | sh

Windows PowerShell:

& ([scriptblock]::Create((irm "https://raw.githubusercontent.com/Alishahryar1/free-claude-code/main/scripts/install.ps1")))

When prompted, choose at least one coding agent and optionally enable RTK + Headroom token optimization for supported agents.

2. Start FCC

Windows

Open Free Claude Code from your desktop or Start menu.

macOS

Open Free Claude Code from your desktop or Applications folder.

Linux

Run:

fcc-server

FCC opens the Admin UI after starting. On Windows and macOS, use the tray or menu-bar icon to open Admin, restart, or quit. When using fcc-server, keep its terminal open.

3. Configure NVIDIA NIM

  1. Create an API key at build.nvidia.com/settings/api-keys.
  2. Open the Admin UI URL from the server log.
  3. Open NVIDIA NIM in Providers, click Add key, paste the key, and click Save.
  4. Leave MODEL on the default nvidia_nim/nvidia/nemotron-3-ultra-550b-a55b, or search the model dropdown and select another model.
  5. Click Apply to save your model selection.

To protect the local proxy with a bearer token, enable Proxy Authentication in Admin.

Free Claude Code Admin UI

4. Run Your Coding Agent

Claude Code:

fcc-claude

Codex:

fcc-codex

Pi:

fcc-pi

OpenCode 2:

fcc-opencode

Cline:

fcc-cline

Hermes:

fcc-hermes

DeepSeek Harness Web:

fcc-dsh

Grok Build:

fcc-grok

Muse Code:

fcc-muse

Aider:

fcc-aider

Antigravity CLI:

fcc-agy

Other clients and SDKs can call FCC directly. See Use The API Directly.

Claude Code model picker showing FCC models

Select an FCC model from Claude Code's native /model picker.

Choose A Provider

  1. Open a provider link below for its key, models, or setup instructions.
  2. In the Admin UI, configure the listed setting. For OpenAI / ChatGPT subscription access, use Providers → OAuth providers instead.
  3. Search the MODEL dropdown and select a model. If the provider cannot list models, enter <provider-id>/<exact-provider-model-id> manually.
  4. Click Apply.

Optional: add an ordered Fallback Models list under Model Config. It applies to every connected client. A failed request may reach and consume usage from more than one provider before succeeding.

Provider modals support numbered API keys. Use Add key, remove rows, or drag their handles to reorder them. FCC uses key 1.

For another API endpoint, open Providers → Custom providers → Add provider. Enter its API base URL, optional keys, and API format. Leave Model IDs empty to discover models automatically, or enter one upstream model ID per line. Save, then select a model in Model Config.

Provider catalog
Provider Admin UI setting Example MODEL
NVIDIA NIM NVIDIA_NIM_API_KEY nvidia_nim/nvidia/nemotron-3-ultra-550b-a55b
OpenRouter OPENROUTER_API_KEY open_router/openrouter/free
Groq GROQ_API_KEY groq/llama-3.3-70b-versatile
ClinePass CLINE_API_KEY cline_pass/cline-pass/kimi-k3
OpenAI / ChatGPT Connect ChatGPT in the Admin UI openai/<model-id>
OpenAI API OPENAI_API_KEY openai_api/gpt-5.6-sol
GitHub Copilot Connect GitHub Copilot in the Admin UI github_copilot/<model-id>
xAI (Grok) XAI_API_KEY xai/grok-4.5
Alibaba Cloud ALIBABA_CLOUD_API_KEY alibaba_cloud/<model-id>
QwenCloud Token Plan QWENCLOUD_API_KEY qwencloud/qwen3.7-plus
QwenCloud Coding Plan QWENCLOUD_CODING_API_KEY qwencloud_coding/qwen3.7-plus
Together AI TOGETHER_API_KEY together/zai-org/GLM-5.2
DeepInfra DEEPINFRA_API_KEY deepinfra/deepseek-ai/DeepSeek-V4-Flash
SiliconFlow SILICONFLOW_API_KEY siliconflow/Qwen/Qwen3-32B
Nebius Token Factory NEBIUS_API_KEY nebius/Qwen/Qwen3-30B-A3B
Chutes CHUTES_API_KEY chutes/Qwen/Qwen3-32B-TEE
Featherless AI FEATHERLESS_API_KEY featherless/Qwen/Qwen3-32B
Agnes AI AGNES_API_KEY agnes/agnes-2.0-flash
ZenMux ZENMUX_API_KEY zenmux/deepseek/deepseek-v4-flash-free
W&B Inference WANDB_API_KEY wandb/openai/gpt-oss-20b
Anthropic ANTHROPIC_API_KEY anthropic/<model-id>
Azure OpenAI AZURE_OPENAI_API_KEY and AZURE_OPENAI_BASE_URL azure_openai/<deployment-name>
Google AI Studio (Gemini) GEMINI_API_KEY gemini/models/gemini-3.1-flash-lite
Google Vertex AI VERTEX_PROJECT_ID + ADC vertex/google/gemini-3.5-flash
DeepSeek DEEPSEEK_API_KEY deepseek/deepseek-chat
Mistral La Plateforme MISTRAL_API_KEY mistral/devstral-small-latest
Mistral Codestral CODESTRAL_API_KEY mistral_codestral/codestral-latest
OpenCode Zen OPENCODE_API_KEY opencode_zen/gpt-5.3-codex
OpenCode Go OPENCODE_API_KEY opencode_go/minimax-m2.7
Vercel AI Gateway AI_GATEWAY_API_KEY vercel/openai/gpt-5.5
Amazon Bedrock AWS_BEARER_TOKEN_BEDROCK bedrock/openai.gpt-oss-120b
Hugging Face Inference Providers HUGGINGFACE_API_KEY huggingface/Qwen/Qwen3-Coder-480B-A35B-Instruct:fastest
Cohere COHERE_API_KEY cohere/command-a-plus-05-2026
Wafer WAFER_API_KEY wafer/DeepSeek-V4-Pro
Kimi API KIMI_API_KEY kimi/kimi-k2.5
Kimi Code KIMI_CODE_API_KEY kimi_code/k3
MiniMax MINIMAX_API_KEY minimax/MiniMax-M3
Cerebras Inference CEREBRAS_API_KEY cerebras/gpt-oss-120b
SambaNova SAMBANOVA_API_KEY sambanova/Meta-Llama-3.3-70B-Instruct
Kilo.ai KILO_API_KEY kilo/kilo-auto/free
Fireworks AI FIREWORKS_API_KEY fireworks/accounts/fireworks/models/llama-v3p3-70b-instruct
Novita AI NOVITA_API_KEY novita/deepseek/deepseek-v4-flash-0731
Cloudflare Workers AI CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID cloudflare/@cf/moonshotai/kimi-k2.6
Z.ai Coding Plan ZAI_API_KEY zai/glm-5.2
Z.ai API (pay as you go) ZAI_API_KEY zai_api/glm-4.7-flash
TokenRouter TOKENROUTER_API_KEY tokenrouter/moonshotai/kimi-k3-free
NaraRoute NARAROUTE_API_KEY nararoute/kimi-k3-free
Poolside AI POOLSIDE_API_KEY poolside/poolside/laguna-s-2.1
LLM7.io LLM7_API_KEY llm7/default
Scaleway SCW_SECRET_KEY scaleway/deepseek/deepseek-v4-flash
Lightning AI LIGHTNING_API_KEY lightning/lightning-ai/Qwen3.8-27B
Experiential Labs EXPLABS_API_KEY experiential/union-alpha
Cheaper Inference CHEAPER_INFERENCE_API_KEY cheaperinference/gpt-5.4-mini
OrcaRouter ORCAROUTER_API_KEY orcarouter/deepseek/deepseek-v4-flash-free
Atlas Cloud ATLASCLOUD_API_KEY atlascloud/deepseek-ai/deepseek-v4-flash
xKiro XKIRO_API_KEY xkiro/qwen/qwen3.7-flash:free
Opper OPPER_API_KEY opper/claude-sonnet-4-6
Ollama Cloud OLLAMA_API_KEY ollama_cloud/qwen3-coder:480b
LM Studio LM_STUDIO_BASE_URL lmstudio/<model-id>
llama.cpp LLAMACPP_BASE_URL llamacpp/<model-id>
Ollama OLLAMA_BASE_URL ollama/<model-tag>
Provider-specific setup
  • OpenAI / ChatGPT uses your ChatGPT subscription rather than an API key. Connect from Providers → OAuth providers → OpenAI / ChatGPT → Connect in the Admin UI and finish signing in through your browser. Restart an already-running agent after connecting.
  • Anthropic uses a separately billed API key. Add it under Providers → Cloud providers → Anthropic → Configure, then choose a discovered model. Multi-workspace keys also require ANTHROPIC_WORKSPACE_ID.
  • OpenAI API uses a separate Platform API key. Enter it under Providers → Cloud providers → OpenAI API → Configure. The model list may include IDs that cannot handle coding requests. Choose a text-generation model.
  • GitHub Copilot uses your signed-in GitHub account and subscription. Install Copilot CLI 1.0.83 on PATH, then choose Providers → OAuth providers → GitHub Copilot → Connect. Finish signing in, then select a github_copilot/<model-id> from the model picker. Available models and quotas depend on your subscription and organization policies. Restart an already-running agent after connecting.
  • Azure OpenAI uses the deployment names from your resource. Set AZURE_OPENAI_BASE_URL to its complete v1 endpoint, such as https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/, and select a deployment that supports Chat Completions. Enter the deployment name as a custom model slug if it does not appear in the model dropdown.
  • Mistral Codestral uses a separate key from Mistral La Plateforme.
  • Kimi Code subscription keys use kimi_code/. Kimi API credit keys use kimi/. Kimi Code plans are for personal interactive coding-agent use under Kimi's community guidelines.
  • Alibaba Cloud uses a Model Studio pay-as-you-go key and defaults to Singapore. For another region or workspace, set ALIBABA_CLOUD_BASE_URL to its OpenAI-compatible endpoint ending in /compatible-mode/v1. The key and endpoint must use the same region.
  • QwenCloud Coding Plan keys use qwencloud_coding/. QwenCloud Token Plan keys use qwencloud/. The keys and endpoints are not interchangeable. Coding Plan is for local, personal, interactive coding-agent use under the Coding Plan terms.
  • OpenCode Zen and OpenCode Go share OPENCODE_API_KEY but use the explicit opencode_zen/ and opencode_go/ model prefixes.
  • For Amazon Bedrock, set BEDROCK_BASE_URL to the URL for the same region as the API key and select one of the listed models.
  • Vertex AI uses Google Application Default Credentials instead of an API key. Locally, run gcloud auth application-default login once. Service-account files and attached service accounts also work. Set VERTEX_PROJECT_ID, and optionally change VERTEX_LOCATION from its global default.
  • Cloudflare requires both its API token and account ID.
  • For Ollama Cloud, use the exact model IDs shown in the model picker. Local Ollama uses the separate ollama/ prefix.
  • Prefer tool-capable models for coding agents. Local models also need enough context for the agent's system prompt and tool definitions.
Local provider setup

FCC automatically discovers models from running local servers at startup. If you start a server later, click Refresh models in Admin to add its models to the picker.

LM Studio

Start LM Studio's local server, load a tool-capable model, and use the model identifier shown by LM Studio with the lmstudio/ prefix. The default URL is http://localhost:1234/v1.

llama.cpp

Start llama-server with its OpenAI-compatible Chat Completions API and enough context for the model. Use the local model ID with the llamacpp/ prefix. LLAMACPP_BASE_URL defaults to http://localhost:8080/v1.

Ollama

ollama pull llama3.1
ollama serve

Use the tag shown by ollama list with the ollama/ prefix. OLLAMA_BASE_URL defaults to http://localhost:11434.

Provider cards show the checked endpoint and response time, with a useful message when a local server is unavailable. After starting the server or correcting its settings, click Test to refresh its models.

Optional model-tier routing

MODEL is the fallback for every request. Select a model for MODEL_FABLE, MODEL_OPUS, MODEL_SONNET, or MODEL_HAIKU to override an individual Claude Code tier. Select None to use MODEL.

In Admin UI → Model Config, add Fallback Models in the order FCC should try them if the selected model fails. Each fallback has its own reasoning effort: Inherit, Off, From client, Low, Medium, High, X-High, or Max.

Choose a model, effort, and API key number in the bottom row, then click +. Key 1, Key 2, and so on refer to the current numbered keys in that provider's settings. Edit the selections in place, drag the handle to change the order, or click the red trash button to remove a fallback.

Inherit keeps the original request's resolved reasoning setting. From client uses the effort or token budget sent by your coding agent, bypassing the global or tier setting. You can select the same model with another key number.

Reasoning control

Open Admin UI → Model Config → Model Routing and choose an effort beside each model. Default Effort starts at From client. Fable, Opus, Sonnet, and Haiku start at Inherit.

Selection Behavior
From client Use the effort sent by your coding agent. If none is sent, keep the provider default.
Off Request reasoning to be disabled.
Low, Medium, High, X-High, or Max Override the client with the selected reasoning level.
Inherit Tier overrides use Default Effort. Fallbacks keep the original request's resolved effort.

Integrations

FCC launchers automatically start the server.

For editor and app integrations, install the client, start FCC, then open Admin UI → Integrations and click Connect on its card.

Reload VS Code or restart the app/IDE after connecting. In Codex and Claude Desktop, select an FCC model from the model picker. Reload or restart the client when FCC reports updated settings. Use Disconnect on the same card to remove the integration.

To complete Claude Code onboarding separately, open Admin UI → Integrations → Claude Code onboarding and click Complete onboarding. Connecting Claude Code in VS Code also completes onboarding.

Run FCC on the same computer and in the same user environment as the client you are configuring.

Use The API Directly

Any client or SDK for these APIs can call FCC. Set the base URL to http://127.0.0.1:8082/v1 for OpenAI clients and http://127.0.0.1:8082 for Anthropic and Gemini clients. Every FCC model works on every endpoint. If Proxy Authentication is enabled, use its token as the client's API key, or add -H "Authorization: Bearer <token>" to each curl request. List the available models with curl "http://127.0.0.1:8082/v1/models?view=messages".

POST /v1/messages:

curl http://127.0.0.1:8082/v1/messages \
  -H "Content-Type: application/json" \
  -d '{
    "model": "nvidia_nim/nvidia/nemotron-3-ultra-550b-a55b",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

POST /v1/chat/completions:

curl http://127.0.0.1:8082/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "nvidia_nim/nvidia/nemotron-3-ultra-550b-a55b",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

POST /v1/responses:

curl http://127.0.0.1:8082/v1/responses \
  -H "Content-Type: application/json" \
  -d '{
    "model": "nvidia_nim/nvidia/nemotron-3-ultra-550b-a55b",
    "input": "Hello!"
  }'

POST /v1/models/{model}:generateContent:

curl http://127.0.0.1:8082/v1/models/nvidia_nim/nvidia/nemotron-3-ultra-550b-a55b:generateContent \
  -H "Content-Type: application/json" \
  -d '{"contents": [{"role": "user", "parts": [{"text": "Hello!"}]}]}'

Responses replies always stream. To stream Messages or Chat Completions replies, add "stream": true. For Gemini, call :streamGenerateContent?alt=sse instead of :generateContent.

Use From Your Phone

Run coding tasks from Discord or Telegram, and send voice notes. Configure them in Admin UI → Messaging, then click Apply.

Discord bot
  1. Create a bot in the Discord Developer Portal.
  2. Enable Message Content Intent and invite it with read, send, message-history, and Manage Messages permissions so /clear can remove user prompts.
  3. Set Messaging Platform to discord.
  4. Enter Discord Bot Token, Allowed Discord Channels, and an absolute Allowed Directory.
  5. Apply the settings and restart the server if requested.
Telegram bot
  1. Create a bot with @BotFather.
  2. Get your numeric user ID from @userinfobot. In groups, grant the bot permission to delete messages.
  3. Set Messaging Platform to telegram.
  4. Enter Telegram Bot Token, Allowed Telegram User ID, and an absolute Allowed Directory.
  5. Apply the settings and restart the server if requested.

Messaging commands

Usage Behavior
/stats Show session state.
Standalone /stop Cancel all work.
Reply with /stop Cancel only the selected request while other queued requests continue.
Standalone /clear Clear all FCC conversations and their messages in this chat.
Reply with /clear Delete the selected message and the chain of replies to it. Keep other conversations.
Voice notes

NVIDIA NIM transcription support is included in every installation. In Admin UI → Messaging → Voice, enable voice notes, select nvidia_nim, and choose a supported model. Configure your NVIDIA NIM API key on the Providers page.

For local Whisper on CPU or CUDA, re-run the installer with the local voice option:

macOS/Linux:

Local Whisper on CPU or CUDA:

curl -fsSL "https://raw.githubusercontent.com/Alishahryar1/free-claude-code/main/scripts/install.sh" | sh -s -- --voice-local

Local Whisper with CUDA 13.0:

curl -fsSL "https://raw.githubusercontent.com/Alishahryar1/free-claude-code/main/scripts/install.sh" | sh -s -- --voice-local --torch-backend cu130

Windows PowerShell:

Local Whisper on CPU or CUDA:

& ([scriptblock]::Create((irm "https://raw.githubusercontent.com/Alishahryar1/free-claude-code/main/scripts/install.ps1"))) -VoiceLocal

Local Whisper with CUDA 13.0:

& ([scriptblock]::Create((irm "https://raw.githubusercontent.com/Alishahryar1/free-claude-code/main/scripts/install.ps1"))) -VoiceLocal -TorchBackend cu130

After installing local support, restart fcc-server. In Admin UI → Messaging → Voice, enable voice notes, select cpu or cuda, and choose the Whisper model. Local gated models need HUGGINGFACE_API_KEY.

Manage Your Installation

Run fcc-server --version to check the installed version without starting FCC.

Update

Stop all running FCC commands, then run:

fcc-update

fcc-update installs the latest FCC release unless you already have it.

If fcc-update is unavailable or fails, try running the install command again.

To reinstall FCC or change optional components while already up to date, run the installer directly.

For local voice support, include --voice-local (macOS/Linux) or -VoiceLocal (Windows), plus your --torch-backend or -TorchBackend option if used.

Muse Code on native Windows

To install or update only Muse Code:

& ([scriptblock]::Create((irm "https://raw.githubusercontent.com/Alishahryar1/free-claude-code/main/scripts/install-muse.ps1")))

To remove the Muse Code copy installed by FCC, keeping its data:

& ([scriptblock]::Create((irm "https://raw.githubusercontent.com/Alishahryar1/free-claude-code/main/scripts/uninstall-muse.ps1")))

Uninstalling FCC leaves Muse Code installed.

Uninstall

Stop every running FCC command and quit connected desktop/editor apps before uninstalling.

Removes

Keeps

macOS/Linux:

curl -fsSL "https://raw.githubusercontent.com/Alishahryar1/free-claude-code/main/scripts/uninstall.sh" | sh

Windows PowerShell:

& ([scriptblock]::Create((irm "https://raw.githubusercontent.com/Alishahryar1/free-claude-code/main/scripts/uninstall.ps1")))

For a problem after installation, run the command below and paste its output into your bug report.

fcc-doctor

Maintainers

See MAINTAINERS.md for the project's maintainers and their areas of responsibility.

License

GNU Affero General Public License version 3 only (AGPL-3.0-only). See LICENSE for details.

free-claude-code (Alishahryar1/free-claude-code)

正在搜索数据库…

这是什么?FCC(Free Claude Code)能把 Claude Code、Codex、OpenCode 这类编程代理路由到 50 家对服务条款友好的服务商,每月为你提供超过 13 亿的免费 token。
这是托管服务,还是我自己在本地运行?由你自己运行:FCC 会安装一个带浏览器管理界面的本地代理,你的代理客户端指向这个本地代理,而不是直接指向服务商的 API。
安装 FCC 需要做哪些事?每个操作系统只需一条命令:macOS/Linux 用 install.sh,Windows PowerShell 用 install.ps1,随时可以重新运行来更新;安装时你至少选择一个编程代理,还可以选择安装 RTK。
我需要 Anthropic 账号或 API 密钥吗?不需要:快速入门会带你从 build.nvidia.com 获取一个 NVIDIA NIM 密钥;ChatGPT 和 GitHub Copilot 可以复用你现有的订阅,本地 Ollama 则完全不需要密钥。
那 13 亿免费 token 真的有保障吗?没有保障:每家服务商自己决定免费额度的可用性和上限,并且可以随时更改;而且一次失败的请求在成功之前,可能已经消耗了不止一家服务商的用量。
这个工具只能在终端里用吗?不是:除了终端,还有 Windows、macOS 和 Linux 的启动器,VS Code、Codex App 和 JetBrains 的 IDE 集成,手机上的 Discord 和 Telegram,以及原生浏览器会话。
我可以接入哪些编程代理?共十个:Claude Code、Codex、Pi、OpenCode、Cline、Hermes、DeepSeek Harness、Grok Build、Muse Code 和 Aider,每个都通过各自的 fcc-* 命令启动,并共享同一个模型目录。
如果我的服务商在任务进行到一半时挂了怎么办?重试次数用完后,FCC 会自动切换到你配置的下一个模型,且无需重启当前回合;这个回退机制对所有已连接的客户端都有效。
我能用它连接自己的本地模型吗?可以:Ollama、LM Studio 和 llama.cpp 服务器分别通过 ollama/、lmstudio/ 和 llamacpp/ 前缀接入;建议选用支持工具调用、且上下文足够容纳代理系统提示词和工具列表的模型。
安装器里那个可选的 RTK 是什么?它是一个配套的过滤器,能精简常见的终端命令输出,把终端输出 token 减少最多 90%;FCC 还内置了五项优化,无需调用服务商就能处理配额探测、标题、建议和文件路径。
大小
18.7 MB
星标
75.7K
时长
10个月
提交 · 90 天