FreeCode is a standalone AI coding agent built by Joseph Polanco, powered by opencode under the hood. It pre-configures opencode to route through free-tier AI providers so you get a fully capable coding agent at zero cost.
FreeCode is not a fork — it's a separate product that layers free provider rotation on top of opencode's infrastructure. Full credit to the opencode team at SST for the underlying engine.
OpenCode is a great tool but requires paid API keys out of the box. FreeCode adds pre-configured support for free-tier providers that rotate automatically when one hits a rate limit:
| Provider | Model | Free Limit |
|---|---|---|
| Groq | llama-3.3-70b | 14,400 req/day |
| Cerebras | llama-3.3-70b | Ultra-fast, generous free tier |
| SambaNova | llama-3.3-70b | 400 req/day |
| Google Gemini | gemini-2.0-flash | 1,500 req/day |
| OpenRouter | llama-3.3-70b:free | 20 RPM, no key required for some models |
| Together AI | llama-3.3-70b | Free credits on signup |
| Mistral | mistral-small | Free eval tier |
| Hugging Face | Various | Free inference API |
| NVIDIA NIM | Various | Free hosted credits |
| Ollama (local) | qwen2.5:7b | Unlimited — your machine |
# Install (coming soon to npm)
npm install -g freecode-ai
# Or run from source
git clone https://github.com/polancojoseph1/freecode
cd freecode
bun install
bun run devSet any combination of these env vars and FreeCode will use them automatically:
export GROQ_API_KEY=... # console.groq.com — free
export CEREBRAS_API_KEY=... # cloud.cerebras.ai — free
export SAMBANOVA_API_KEY=... # cloud.sambanova.ai — free
export GEMINI_API_KEY=... # aistudio.google.com — free
export OPENROUTER_API_KEY=... # openrouter.ai — free tier
export TOGETHER_API_KEY=... # api.together.ai — free credits
export MISTRAL_API_KEY=... # console.mistral.ai — free eval
export HF_API_KEY=... # huggingface.co — free
export NVIDIA_API_KEY=... # build.nvidia.com — free creditsFreeCode sits on top of opencode's provider infrastructure and adds a rotation layer. When a provider returns a 429 rate limit, FreeCode automatically switches to the next available provider. Ollama (local) is always the last fallback — unlimited and free.
FreeCode powers the Free Bot in BridgeBot — a Telegram AI assistant that stays online 24/7 at zero cost using FreeCode's provider rotation.
- FreeCode — created and maintained by Joseph Polanco
- opencode — the underlying AI coding agent engine by SST, MIT licensed. FreeCode would not exist without it.
MIT — see LICENSE.