斜杠中年斜杠中年AI × 沟通 × 商业 × 人生
AI Practical Guide

Use Claude Code for free in the terminal: Use Free Claude Code to easily connect any large models such as Gemini and DeepSeek

Teach you in detail how to run the official Claude Code CLI in a local terminal or VSCode for free or at low cost through the open source proxy tool Free Claude Code, which supports 17 mainstream large model backends.

2026-05-28Updated: 2026-05-288 min readWesley Chong
#Claude Code#Free Claude Code#Open source proxy#AI programming#Gemini#DeepSeek
Use Claude Code for free in the terminal: Use Free Claude Code to easily connect any large models such as Gemini and DeepSeek|AI Practical Guide 封面图

Summary

Claude Code is a powerful terminal AI programming assistant launched by Anthropic, but its official API is expensive. Through the open source Free Claude Code proxy, you can seamlessly forward all requests to the free Google Gemini, the extremely cost-effective DeepSeek, or locally run large models to experience unlimited AI-assisted programming.

one sentence answer

Free Claude Code is an open source API forwarding proxy that allows you to use the free Google Gemini API, the extremely cost-effective DeepSeek, local Ollama or the API provided by the NVIDIA NIM platform to run Anthropic's official Claude Code terminal programming tool for free and without restrictions**.


Why do you need Free Claude Code?

If you are a developer, you must have been amazed by Anthropic’s official terminal AI programming assistant Claude Code CLI. Its powerful project analysis, automatic code writing, terminal command execution and real-time debugging capabilities can greatly improve development efficiency.

However, the official Claude Code comes with the following limitations:

  1. Expensive: Frequent project context reads and multiple rounds of conversations will quickly drain your Anthropic API balance.
  2. Quota Limit: For high-frequency use or enterprise development, the official quota often reaches its peak very quickly.
  3. Single model: Unable to flexibly switch to other models (such as DeepSeek, which focuses on Chinese, or Gemini, which has strong reasoning capabilities).

Free Claude Code perfectly solves these pain points. It starts a lightweight proxy server locally, intercepts all requests made by Claude Code, and intelligently routes and translates them into other API formats. Not only can you use completely free Gemini, but you can also enjoy the absolute privacy of local private large models!


Core Function Highlights

  • Zero-threshold drop-in proxy: Just modify a few environment variables to make Claude Code "mistakenly think" that it is calling the official interface.
  • 17 major backend service providers supported: including Google AI Studio (Gemini), DeepSeek, NVIDIA NIM, OpenRouter, Mistral AI, Groq, Ollama, LM Studio, etc.
  • Intelligent hierarchical routing: Different backend large models can be configured for Opus, Sonnet and Haiku respectively, perfectly retaining Claude Code's native /model switching experience.
  • Perfectly compatible with core protocols: Supports streaming response (Streaming), function and tool call (Tool Use), and even inference block output of thinking chain models such as DeepSeek R1.
  • Comes with a wealth of peripherals: It comes with a beautiful and easy-to-use local Admin control panel (Admin UI), and also supports Discord/Telegram robot remote access, VSCode plug-in integration, and Whisper voice recognition.

Quick Start Tutorial: Just 4 Steps

Step One: One-Click Installation

Make sure your system has git, uv and the Python environment installed. Then run the following command to install:

macOS/Linux systems:

curl -fsSL "https://github.com/Alishahryar1/free-claude-code/blob/main/scripts/install.sh?raw=1" | sh

Windows (PowerShell):

irm "https://github.com/Alishahryar1/free-claude-code/blob/main/scripts/install.ps1?raw=1" | iex

Tip: The installation script will automatically check the Python 3.14 environment, globally install the fcc-server agent and the accompanying command line shortcuts.


Step 2: Start the proxy server

Enter the following command in the terminal to start the service:

fcc-server

After starting, you will see the following terminal output, which will run on the local 8082 port and print out the management backend address:

INFO:     Admin UI: http://127.0.0.1:8082/admin (local-only)

Open this link with a browser and you can enter the visual configuration interface.


Step 3: Configure your model in the Admin UI

Take the most recommended Google AI Studio (Gemini) and DeepSeek as examples:

  1. Configuring Google Gemini (free limit is huge):

    • Visit Google AI Studio to get a free API Key.
    • In the Admin interface of Free Claude Code, find GEMINI_API_KEY and paste your Key.
    • Click Validate below to verify and save.
    • Set the main model MODEL to gemini/gemini-2.5-flash or gemini/gemini-3.1-flash-lite.
  2. Configuring DeepSeek (Extreme Price/Performance):

    • Visit DeepSeek Open Platform to obtain the API Key.
    • Find DEEPSEEK_API_KEY on the Admin page and fill it in.
    • Just set the main model MODEL to deepseek/deepseek-chat.

Step 4: Start your Free Claude Code!

After configuration, you don't need to run the official claude command directly. Instead, in your project directory, type:

fcc-claude

fcc-claude is a convenient package provided by Free Claude Code. It will automatically read the port and security token of the current proxy, automatically set the following environment variables in the background, and start the real official Claude Code:

  • ANTHROPIC_BASE_URL points to the local proxy.
  • Automatically set 190k auto-compression window size, explosion-proof context.

At this point, all commands you enter in the terminal will be forwarded to your Gemini or DeepSeek model! Go and ask it questions, or let it help you refactor and review the code under the current project!


Common service provider recommendations and configuration comparison

| Recommended backend services | Obtain key address | Typical model identifier (MODEL) | Features/applicable scenarios | | :--- | :--- | :--- | :--- | | Google AI Studio | aistudio.google.com | gemini/gemini-2.5-flash | The free quota is friendly, the speed is fast, and it is suitable for most daily tasks. | | DeepSeek API | platform.deepseek.com | deepseek/deepseek-chat | Low price, Chinese programming and logical expression are extremely smooth. | | NVIDIA NIM | build.nvidia.com | nvidia_nim/nvidia/nemotron-3-super-120b-a12b | Enjoy the massive free NIM models provided by NVIDIA, including many mainstream large models at home and abroad. | | OpenRouter | openrouter.ai | open_router/stepfun/step-3.5-flash:free | Aggregates APIs from major manufacturers, and has a rich free model library for direct free use. | | Ollama (local running) | Local Ollama client | ollama/qwen2.5-coder:7b | 100% local running, no need to worry about commercial secrets and code data leakage. |


Advanced Technique: Per-model Routing

Claude Code will automatically select different model levels (Opus, Sonnet or Haiku) based on different programming tasks. In Free Claude Code, you can use fine-grained environment variables to assign different models to these three levels:

MODEL_OPUS = deepseek/deepseek-reasoner          # 遇到复杂推理任务,自动调用 DeepSeek R1 满血版
MODEL_SONNET = gemini/gemini-2.5-flash          # 核心代码编写与分析,使用速度快的 Gemini 2.5
MODEL_HAIKU = open_router/google/gemini-2-flash-thinking-exp:free  # 轻量询问或 fallback,走免费的 thinking 实验模型

You only need to configure these variables in the Admin UI to maximize the advantages of various large models while saving costs.


Frequently Asked Questions and Answers (FAQ)

1. Why is it prompted that the API format is incompatible when running?

Please make sure that the model you are using supports Tool Use (i.e. function call/tool ​​execution). Claude Code highly relies on the agent's ability to execute commands on the terminal and read and write files. If the large model does not support Tool Use, the agents will not work together properly. It is strongly recommended to use Gemini 2.5 series, DeepSeek official API, or specially fine-tuned code models (such as Qwen-2.5-Coder, etc.).

2. Will my code be leaked to third parties?

The Free Claude Code service itself runs completely locally. Whether the code is leaked depends on the "backend large model" you configure. If you have extremely high privacy requirements, it is recommended to run Ollama locally and configure Free Claude Code to connect to the local ollama/qwen2.5-coder or ollama/llama3 model.

3. How to use it in VSCode plug-in?

The proxy provides standard compliant endpoints. Just set the Base URL of the custom API to http://127.0.0.1:8082/v1 in VSCode's AI programming plug-in (such as Continue, etc.).


Conclusion

Free Claude Code uses an extremely clever proxy forwarding idea to break the high price barrier of official Claude Code. It not only allows individual developers to experience the speed of terminal Agent programming for free, but also provides an excellent path for enterprise teams to explore localized, low-cost large model programming. Hurry to Star's GitHub project repository and start your free terminal AI programming journey!

FAQs

What is Free Claude Code?

It is an open source reverse proxy service that intercepts Anthropic API traffic from Claude Code CLI and converts it into a format supported by other models (such as Gemini, DeepSeek, NVIDIA NIM), allowing free or low-cost use.

Will using Free Claude Code affect the tool calling function of Claude Code?

Won't. Free Claude Code is perfectly adapted to Claude Code's client protocol and supports streaming, Tool Use (tool invocation) and thought chain/reasoning block processing.

Is there a fee required?

Totally free. You can configure the free API of Google AI Studio (Gemini), or use free credits from NVIDIA NIM, or even run a completely free model locally using Ollama/LM Studio.

分享这篇文章 / Share Article
Wesley Chong

Author

Wesley Chong

Software developer, digital consultant, and Toastmasters speaker from Kluang, Malaysia.

Focusing on helping ordinary people upgrade communication, expression, business, and life with AI.

Related Reading