FreeCode is an evolution of Anthropic's Claude Code, transformed into a provider-agnostic tool. While the original was restricted to the Anthropic ecosystem, FreeCode allows you to connect any AI "brain" at your disposal.
With it, you maintain the power of a CLI that can read files, run commands, and manage git, but with the freedom to use:
- Local Models: Via Ollama or LM Studio.
- Third-Party APIs: OpenRouter, Groq, DeepSeek, Google Gemini, and OpenAI.
- Zero Mandatory Authentication: Use it without needing an Anthropic account.
FreeCode uses Bun for maximum performance.
-
Clone the repository:
git clone https://github.com/ermultimidia/freecode.git cd freecode -
Install dependencies:
bun install
-
Build:
bun run build:prod
-
Global Link: To use the
freeorfreecodecommand in any folder:npm link
To start FreeCode, simply type in your terminal:
free/provider— Opens the interactive selector to switch AI providers./config— Opens the general CLI settings./exit— Exits interactive mode.
FreeCode looks for additional providers in the settings.json file. You can add as many as you wish following this format:
{
"customProviders": [
{
"id": "ollama-llama3",
"name": "Ollama (Llama 3)",
"apiType": "openai",
"baseUrl": "http://localhost:11434/v1",
"defaultModel": "llama3"
},
{
"id": "openrouter",
"name": "OpenRouter (DeepSeek)",
"apiType": "openai",
"baseUrl": "https://openrouter.ai/api/v1",
"apiKey": "YOUR_KEY_HERE",
"defaultModel": "deepseek/deepseek-chat"
}
],
"currentProviderId": "ollama-llama3"
}If you installed via npm link, you can remove it with:
npm uninstall -g freecodeTo remove it completely, just delete the folder where the repository was cloned and clear the caches in:
- Windows:
%APPDATA%\anthropic-claude-code(same folder as the original) or a specific FreeCode folder if migrated.
This repository contains source code that was originally leaked from Anthropic's npm registry on March 31, 2026. FreeCode is a modification geared towards research and accessibility, and is not an official Anthropic product. The original code is property of Anthropic.
Feel free to open issues or pull requests with improvements to API adapters and new TUI features!