docs: preserve upstream English README
This commit is contained in:
+431
@@ -0,0 +1,431 @@
|
||||
<div align="center">
|
||||
|
||||
# 🤖 Free Claude Code
|
||||
|
||||
Use Claude Code, Codex, Pi, editor extensions, or chat bots through your own provider-backed proxy.
|
||||
|
||||
[](https://opensource.org/licenses/MIT)
|
||||
[](https://www.python.org/downloads/)
|
||||
[](https://github.com/astral-sh/uv)
|
||||
[](https://github.com/Alishahryar1/free-claude-code/actions/workflows/tests.yml)
|
||||
[](https://pypi.org/project/ty/)
|
||||
[](https://github.com/astral-sh/ruff)
|
||||
[](https://github.com/Delgan/loguru)
|
||||
|
||||
Run your coding agents with free, paid, or local models. Choose and validate providers from one local Admin UI.
|
||||
|
||||
[Quick Start](#quick-start) · [Providers](#choose-a-provider) · [Clients](#connect-your-client) · [Integrations](#optional-integrations) · [Manage](#manage-your-installation)
|
||||
|
||||
</div>
|
||||
|
||||
<div align="center">
|
||||
<img src="assets/pic.png" alt="Free Claude Code in action" width="700">
|
||||
<p><em>Claude Code running through the Free Claude Code proxy.</em></p>
|
||||
</div>
|
||||
|
||||
<div align="center">
|
||||
<img src="assets/codex.png" alt="Codex CLI in action through Free Claude Code" width="700">
|
||||
<p><em>Codex CLI using the local FCC Responses provider.</em></p>
|
||||
</div>
|
||||
|
||||
<a id="model-picker"></a>
|
||||
|
||||
<div align="center">
|
||||
<img src="assets/cc-model-picker.png" alt="Claude Code model picker showing gateway models" width="700">
|
||||
<p><em>Claude Code native <code>/model</code> picker with FCC gateway models.</em></p>
|
||||
</div>
|
||||
|
||||
<div align="center">
|
||||
<img src="assets/codex-model-picker.png" alt="Codex model picker showing generated FCC model catalog" width="700">
|
||||
<p><em>Codex native <code>/model</code> picker with the generated FCC catalog.</em></p>
|
||||
</div>
|
||||
|
||||
## Star History
|
||||
|
||||
<div align="center">
|
||||
<a href="https://star-history.com/#Alishahryar1/free-claude-code&Date">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=Alishahryar1/free-claude-code&type=Date&theme=dark">
|
||||
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=Alishahryar1/free-claude-code&type=Date">
|
||||
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=Alishahryar1/free-claude-code&type=Date" width="700">
|
||||
</picture>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
## What You Get
|
||||
|
||||
- Launch Claude Code with `fcc-claude`, Codex with `fcc-codex`, or Pi with `fcc-pi`.
|
||||
- Switch among 24 cloud and local providers from the Admin UI.
|
||||
- Use each coding agent's native model picker.
|
||||
- Route Opus, Sonnet, Haiku, and fallback traffic to different models.
|
||||
- Keep streaming, tool use, and reasoning support across compatible models.
|
||||
- Connect Claude Code and Codex in VS Code or Claude Code through JetBrains ACP.
|
||||
- Optionally run Claude Code sessions through Discord or Telegram with voice-note transcription.
|
||||
- Protect the local proxy with optional token authentication.
|
||||
|
||||
## Quick Start
|
||||
|
||||
<a id="install"></a>
|
||||
|
||||
### 1. Install Or Update
|
||||
|
||||
macOS/Linux:
|
||||
|
||||
```bash
|
||||
curl -fsSL "https://raw.githubusercontent.com/Alishahryar1/free-claude-code/main/scripts/install.sh" | sh
|
||||
```
|
||||
|
||||
Windows PowerShell:
|
||||
|
||||
```powershell
|
||||
& ([scriptblock]::Create((irm "https://raw.githubusercontent.com/Alishahryar1/free-claude-code/main/scripts/install.ps1")))
|
||||
```
|
||||
|
||||
Re-run the same command whenever you want to update. You can review the installers before running them: [install.sh](scripts/install.sh) and [install.ps1](scripts/install.ps1).
|
||||
|
||||
### 2. Start The Server
|
||||
|
||||
```bash
|
||||
fcc-server
|
||||
```
|
||||
|
||||
To print the installed Free Claude Code version without starting the server,
|
||||
run `fcc-server --version`.
|
||||
|
||||
Keep this process running. The startup log shows the Admin UI address:
|
||||
|
||||
```text
|
||||
INFO: Admin UI: http://127.0.0.1:8082/admin (local-only)
|
||||
```
|
||||
|
||||
Use the port shown in your terminal if it differs from `8082`.
|
||||
|
||||
<a id="nvidia-nim-provider"></a>
|
||||
|
||||
### 3. Configure NVIDIA NIM
|
||||
|
||||
1. Create an API key at [build.nvidia.com/settings/api-keys](https://build.nvidia.com/settings/api-keys).
|
||||
2. Open the Admin UI URL from the server log.
|
||||
3. Paste the key into `NVIDIA_NIM_API_KEY`.
|
||||
4. Leave `MODEL` on the default `nvidia_nim/nvidia/nemotron-3-super-120b-a12b`, or select another model.
|
||||
5. Click **Validate**, then **Apply**.
|
||||
|
||||
<div align="center">
|
||||
<img src="assets/admin-page.png" alt="Local admin UI for proxy settings" width="700">
|
||||
</div>
|
||||
|
||||
### 4. Run Your Coding Agent
|
||||
|
||||
Claude Code:
|
||||
|
||||
```bash
|
||||
fcc-claude
|
||||
```
|
||||
|
||||
Codex:
|
||||
|
||||
```bash
|
||||
fcc-codex
|
||||
```
|
||||
|
||||
Pi:
|
||||
|
||||
```bash
|
||||
fcc-pi
|
||||
```
|
||||
|
||||
All three launchers use the current Admin UI settings. Use the agent's model picker to choose from the models FCC exposes. Normal CLI arguments still work, for example:
|
||||
|
||||
```bash
|
||||
fcc-codex exec "hello"
|
||||
```
|
||||
|
||||
`fcc-pi` registers FCC only for that Pi process; your existing Pi settings, sessions, credentials, and extensions remain unchanged.
|
||||
|
||||
## Choose A Provider
|
||||
|
||||
Enter the listed setting in the Admin UI, set `MODEL` to a provider-prefixed model ID, then click **Validate** and **Apply**. Provider names link to their key, model, or setup pages.
|
||||
|
||||
| Provider | Admin UI setting | Example `MODEL` |
|
||||
| --- | --- | --- |
|
||||
| [NVIDIA NIM](https://build.nvidia.com/settings/api-keys) | `NVIDIA_NIM_API_KEY` | `nvidia_nim/nvidia/nemotron-3-super-120b-a12b` |
|
||||
| [OpenRouter](https://openrouter.ai/keys) | `OPENROUTER_API_KEY` | `open_router/openrouter/free` |
|
||||
| [Google AI Studio (Gemini)](https://aistudio.google.com/apikey) | `GEMINI_API_KEY` | `gemini/models/gemini-3.1-flash-lite` |
|
||||
| [DeepSeek](https://platform.deepseek.com/api_keys) | `DEEPSEEK_API_KEY` | `deepseek/deepseek-chat` |
|
||||
| [Mistral La Plateforme](https://console.mistral.ai/) | `MISTRAL_API_KEY` | `mistral/devstral-small-latest` |
|
||||
| [Mistral Codestral](https://console.mistral.ai/) | `CODESTRAL_API_KEY` | `mistral_codestral/codestral-latest` |
|
||||
| [OpenCode Zen](https://opencode.ai/auth) | `OPENCODE_API_KEY` | `opencode/gpt-5.3-codex` |
|
||||
| [OpenCode Go](https://opencode.ai/auth) | `OPENCODE_API_KEY` | `opencode_go/minimax-m2.7` |
|
||||
| [Vercel AI Gateway](https://vercel.com/docs/ai-gateway/models-and-providers) | `AI_GATEWAY_API_KEY` | `vercel/openai/gpt-5.5` |
|
||||
| [Hugging Face Inference Providers](https://huggingface.co/settings/tokens) | `HUGGINGFACE_API_KEY` | `huggingface/Qwen/Qwen3-Coder-480B-A35B-Instruct:fastest` |
|
||||
| [Cohere](https://dashboard.cohere.com/api-keys) | `COHERE_API_KEY` | `cohere/command-a-plus-05-2026` |
|
||||
| [GitHub Models](https://github.com/marketplace?type=models) | `GITHUB_MODELS_TOKEN` | `github_models/openai/gpt-4.1` |
|
||||
| [Wafer](https://wafer.ai/) | `WAFER_API_KEY` | `wafer/DeepSeek-V4-Pro` |
|
||||
| [Kimi](https://platform.moonshot.ai/console/api-keys) | `KIMI_API_KEY` | `kimi/kimi-k2.5` |
|
||||
| [MiniMax](https://platform.minimax.io/user-center/basic-information/interface-key) | `MINIMAX_API_KEY` | `minimax/MiniMax-M3` |
|
||||
| [Cerebras Inference](https://cloud.cerebras.ai/) | `CEREBRAS_API_KEY` | `cerebras/gpt-oss-120b` |
|
||||
| [Groq](https://console.groq.com/keys) | `GROQ_API_KEY` | `groq/llama-3.3-70b-versatile` |
|
||||
| [SambaNova](https://cloud.sambanova.ai/apis) | `SAMBANOVA_API_KEY` | `sambanova/Meta-Llama-3.3-70B-Instruct` |
|
||||
| [Fireworks AI](https://fireworks.ai/account/api-keys) | `FIREWORKS_API_KEY` | `fireworks/accounts/fireworks/models/llama-v3p3-70b-instruct` |
|
||||
| [Cloudflare Workers AI](https://developers.cloudflare.com/workers-ai/) | `CLOUDFLARE_API_TOKEN` and `CLOUDFLARE_ACCOUNT_ID` | `cloudflare/@cf/moonshotai/kimi-k2.6` |
|
||||
| [Z.ai](https://z.ai/manage-apikey/apikey-list) | `ZAI_API_KEY` | `zai/glm-5.2` |
|
||||
| [LM Studio](https://lmstudio.ai/) | `LM_STUDIO_BASE_URL` | `lmstudio/<model-id>` |
|
||||
| [llama.cpp](https://github.com/ggml-org/llama.cpp) | `LLAMACPP_BASE_URL` | `llamacpp/<model-id>` |
|
||||
| [Ollama](https://ollama.com/) | `OLLAMA_BASE_URL` | `ollama/<model-tag>` |
|
||||
|
||||
Important provider notes:
|
||||
|
||||
- Mistral Codestral uses a separate key from Mistral La Plateforme.
|
||||
- OpenCode Zen and OpenCode Go share `OPENCODE_API_KEY` but use different model prefixes.
|
||||
- Cloudflare requires both its API token and account ID.
|
||||
- Prefer tool-capable models for coding agents. Local models also need enough context for the agent's system prompt and tool definitions.
|
||||
|
||||
<details>
|
||||
<summary><strong>Local provider setup</strong></summary>
|
||||
|
||||
### 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`; FCC accepts either the server root or an explicit `/v1` suffix.
|
||||
|
||||
### Ollama
|
||||
|
||||
```bash
|
||||
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`; FCC accepts either the root URL or an explicit `/v1` suffix.
|
||||
|
||||
</details>
|
||||
|
||||
### Optional Model-Tier Routing
|
||||
|
||||
`MODEL` is the fallback for every request. Set `MODEL_OPUS`, `MODEL_SONNET`, or `MODEL_HAIKU` to override individual Claude Code tiers; leave a tier blank to inherit `MODEL`.
|
||||
|
||||
For example, route Opus to `nvidia_nim/moonshotai/kimi-k2.6`, Sonnet to `open_router/openrouter/free`, Haiku to `lmstudio/qwen3.5-coder`, and keep `MODEL` on `zai/glm-5.2`.
|
||||
|
||||
<a id="connect-your-client"></a>
|
||||
|
||||
## Connect Your Client
|
||||
|
||||
For terminal use, start `fcc-server`, then run `fcc-claude`, `fcc-codex`, or `fcc-pi`. Use the guides below for editor integrations.
|
||||
|
||||
<details>
|
||||
<summary><strong>Claude Code in VS Code</strong></summary>
|
||||
|
||||
Install the [Claude Code extension](https://marketplace.visualstudio.com/items?itemName=anthropic.claude-code). Open VS Code's user settings as JSON and add:
|
||||
|
||||
```json
|
||||
"claudeCode.disableLoginPrompt": true,
|
||||
"claudeCode.environmentVariables": [
|
||||
{ "name": "ANTHROPIC_BASE_URL", "value": "http://localhost:8082" },
|
||||
{ "name": "ANTHROPIC_AUTH_TOKEN", "value": "freecc" },
|
||||
{ "name": "CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY", "value": "1" },
|
||||
{ "name": "CLAUDE_CODE_AUTO_COMPACT_WINDOW", "value": "190000" },
|
||||
{ "name": "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC", "value": "1" }
|
||||
]
|
||||
```
|
||||
|
||||
Match the port and authentication token to the Admin UI, then reload the extension.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Codex in VS Code</strong></summary>
|
||||
|
||||
Install the [Codex extension](https://marketplace.visualstudio.com/items?itemName=openai.chatgpt). Create or edit `~/.codex/config.toml` (`%USERPROFILE%\.codex\config.toml` on Windows):
|
||||
|
||||
```toml
|
||||
model_provider = "fcc"
|
||||
model = "nvidia_nim/nvidia/nemotron-3-super-120b-a12b"
|
||||
|
||||
[model_providers.fcc]
|
||||
name = "Free Claude Code"
|
||||
base_url = "http://127.0.0.1:8082/v1"
|
||||
env_key = "FCC_CODEX_API_KEY"
|
||||
wire_api = "responses"
|
||||
```
|
||||
|
||||
Store the Admin UI authentication token in `~/.codex/auth.json` or its Windows equivalent:
|
||||
|
||||
```json
|
||||
{
|
||||
"FCC_CODEX_API_KEY": "freecc"
|
||||
}
|
||||
```
|
||||
|
||||
Match `model`, the port, and the token to the Admin UI, then restart VS Code. For WSL-backed Codex, edit the files inside WSL.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Claude Code in JetBrains ACP</strong></summary>
|
||||
|
||||
Edit the installed Claude ACP configuration:
|
||||
|
||||
- Windows: `C:\Users\%USERNAME%\AppData\Roaming\JetBrains\acp-agents\installed.json`
|
||||
- Linux/macOS: `~/.jetbrains/acp.json`
|
||||
|
||||
Set the environment for `acp.registry.claude-acp`:
|
||||
|
||||
```json
|
||||
"env": {
|
||||
"ANTHROPIC_BASE_URL": "http://localhost:8082",
|
||||
"ANTHROPIC_AUTH_TOKEN": "freecc",
|
||||
"CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY": "1",
|
||||
"CLAUDE_CODE_AUTO_COMPACT_WINDOW": "190000",
|
||||
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
|
||||
}
|
||||
```
|
||||
|
||||
Match the port and token to the Admin UI, then restart the IDE.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Claude Code still asks you to log in</strong></summary>
|
||||
|
||||
If Claude Code asks you to log in after you configure the FCC URL and token, open its state file:
|
||||
|
||||
- Windows: `%USERPROFILE%\.claude.json`
|
||||
- macOS/Linux/WSL: `~/.claude.json`
|
||||
|
||||
Merge this property into the existing JSON without removing its other fields:
|
||||
|
||||
```json
|
||||
"hasCompletedOnboarding": true
|
||||
```
|
||||
|
||||
If the file does not exist, create it with a complete JSON object:
|
||||
|
||||
```json
|
||||
{
|
||||
"hasCompletedOnboarding": true
|
||||
}
|
||||
```
|
||||
|
||||
Restart Claude Code or the IDE after saving the file.
|
||||
|
||||
</details>
|
||||
|
||||
<a id="optional-integrations"></a>
|
||||
|
||||
## Optional Integrations
|
||||
|
||||
Configure integrations from **Admin UI → Messaging**, then click **Validate** and **Apply**.
|
||||
|
||||
<div align="center">
|
||||
<img src="assets/admin-messaging.png" alt="Admin UI Messaging view with bot and voice settings" width="700">
|
||||
</div>
|
||||
|
||||
<details>
|
||||
<summary><strong>Discord bot</strong></summary>
|
||||
|
||||
1. Create a bot in the [Discord Developer Portal](https://discord.com/developers/applications).
|
||||
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.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Telegram bot</strong></summary>
|
||||
|
||||
1. Create a bot with [@BotFather](https://t.me/BotFather).
|
||||
2. Get your numeric user ID from [@userinfobot](https://t.me/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.
|
||||
|
||||
</details>
|
||||
|
||||
### 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` | Reset all FCC state and remove every tracked message in that chat, including user prompts, voice notes, FCC replies, Telegram's online notice, and the clear command itself. |
|
||||
| Reply with `/clear` | Delete the selected message and its literal platform reply subtree while preserving its ancestors and siblings. |
|
||||
|
||||
<details>
|
||||
<summary><strong>Voice notes</strong></summary>
|
||||
|
||||
Re-run the installer with the voice backend you need.
|
||||
|
||||
macOS/Linux:
|
||||
|
||||
```bash
|
||||
# NVIDIA NIM transcription
|
||||
curl -fsSL "https://raw.githubusercontent.com/Alishahryar1/free-claude-code/main/scripts/install.sh" | sh -s -- --voice-nim
|
||||
|
||||
# Local Whisper on CPU or CUDA
|
||||
curl -fsSL "https://raw.githubusercontent.com/Alishahryar1/free-claude-code/main/scripts/install.sh" | sh -s -- --voice-local
|
||||
|
||||
# Both backends
|
||||
curl -fsSL "https://raw.githubusercontent.com/Alishahryar1/free-claude-code/main/scripts/install.sh" | sh -s -- --voice-all
|
||||
|
||||
# Local Whisper with the CUDA 13.0 PyTorch backend
|
||||
curl -fsSL "https://raw.githubusercontent.com/Alishahryar1/free-claude-code/main/scripts/install.sh" | sh -s -- --voice-local --torch-backend cu130
|
||||
```
|
||||
|
||||
Windows PowerShell:
|
||||
|
||||
```powershell
|
||||
# NVIDIA NIM transcription
|
||||
& ([scriptblock]::Create((irm "https://raw.githubusercontent.com/Alishahryar1/free-claude-code/main/scripts/install.ps1"))) -VoiceNim
|
||||
|
||||
# Local Whisper on CPU or CUDA
|
||||
& ([scriptblock]::Create((irm "https://raw.githubusercontent.com/Alishahryar1/free-claude-code/main/scripts/install.ps1"))) -VoiceLocal
|
||||
|
||||
# Both backends
|
||||
& ([scriptblock]::Create((irm "https://raw.githubusercontent.com/Alishahryar1/free-claude-code/main/scripts/install.ps1"))) -VoiceAll
|
||||
|
||||
# Local Whisper with the CUDA 13.0 PyTorch backend
|
||||
& ([scriptblock]::Create((irm "https://raw.githubusercontent.com/Alishahryar1/free-claude-code/main/scripts/install.ps1"))) -VoiceLocal -TorchBackend cu130
|
||||
```
|
||||
|
||||
Restart `fcc-server`. In **Admin UI → Messaging → Voice**, enable voice notes, select `cpu`, `cuda`, or `nvidia_nim`, and choose the Whisper model. Local gated models need `HUGGINGFACE_API_KEY`; NVIDIA NIM transcription needs `NVIDIA_NIM_API_KEY`.
|
||||
|
||||
</details>
|
||||
|
||||
## Manage Your Installation
|
||||
|
||||
### Update
|
||||
|
||||
Re-run the matching command from [Install Or Update](#install).
|
||||
|
||||
### Uninstall
|
||||
|
||||
Stop every running FCC command first. The uninstaller removes the FCC uv tool, verifies every FCC command is gone, and then deletes `~/.fcc/`. It leaves uv, Python, Claude Code, Codex, Pi, and shared PATH entries intact.
|
||||
|
||||
macOS/Linux:
|
||||
|
||||
```bash
|
||||
curl -fsSL "https://raw.githubusercontent.com/Alishahryar1/free-claude-code/main/scripts/uninstall.sh" | sh
|
||||
```
|
||||
|
||||
Windows PowerShell:
|
||||
|
||||
```powershell
|
||||
& ([scriptblock]::Create((irm "https://raw.githubusercontent.com/Alishahryar1/free-claude-code/main/scripts/uninstall.ps1")))
|
||||
```
|
||||
|
||||
## Project Links
|
||||
|
||||
- [Report bugs or request features](https://github.com/Alishahryar1/free-claude-code/issues)
|
||||
- [Architecture and extension guide](ARCHITECTURE.md)
|
||||
- [Contributing guide](CONTRIBUTING.md)
|
||||
|
||||
## License
|
||||
|
||||
MIT License. See [LICENSE](LICENSE) for details.
|
||||
Reference in New Issue
Block a user