内容摘录
<p align="center">
<img src="https://img.shields.io/npm/v/free-coding-models?color=76b900&label=npm&logo=npm" alt="npm version">
<img src="https://img.shields.io/node/v/free-coding-models?color=76b900&logo=node.js" alt="node version">
<img src="https://img.shields.io/npm/l/free-coding-models?color=76b900" alt="license">
<img src="https://img.shields.io/badge/models-134-76b900?logo=nvidia" alt="models count">
<img src="https://img.shields.io/badge/providers-17-blue" alt="providers count">
</p>
<h1 align="center">free-coding-models</h1>
<p align="center">
💬 <a href="https://discord.gg/5MbTnDC3Md">Let's talk about the project on Discord</a>
</p>
<p align="center">
</p>
<p align="center">
<strong>Find the fastest coding LLM models in seconds</strong><br>
<sub>Ping free coding models from 17 providers in real-time — pick the best one for OpenCode, OpenClaw, or any AI coding assistant</sub>
</p>
<p align="center">
<img src="demo.gif" alt="free-coding-models demo" width="100%">
</p>
<p align="center">
<a href="#-features">Features</a> •
<a href="#-requirements">Requirements</a> •
<a href="#-installation">Installation</a> •
<a href="#-usage">Usage</a> •
<a href="#-models">Models</a> •
<a href="#-opencode-integration">OpenCode</a> •
<a href="#-openclaw-integration">OpenClaw</a> •
<a href="#-how-it-works">How it works</a>
</p>
---
✨ Features
**🎯 Coding-focused** — Only LLM models optimized for code generation, not chat or vision
**🌐 Multi-provider** — 134 models from NVIDIA NIM, Groq, Cerebras, SambaNova, OpenRouter, Hugging Face Inference, Replicate, DeepInfra, Fireworks AI, Codestral, Hyperbolic, Scaleway, Google AI, SiliconFlow, Together AI, Cloudflare Workers AI, and Perplexity API
**⚙️ Settings screen** — Press P to manage provider API keys, enable/disable providers, test keys live, and manually check/install updates
**🚀 Parallel pings** — All models tested simultaneously via native fetch
**📊 Real-time animation** — Watch latency appear live in alternate screen buffer
**🏆 Smart ranking** — Top 3 fastest models highlighted with medals 🥇🥈🥉
**⏱ Continuous monitoring** — Pings all models every 2 seconds forever, never stops
**📈 Rolling averages** — Avg calculated from ALL successful pings since start
**📊 Uptime tracking** — Percentage of successful pings shown in real-time
**🔄 Auto-retry** — Timeout models keep getting retried, nothing is ever "given up on"
**🎮 Interactive selection** — Navigate with arrow keys directly in the table, press Enter to act
**🔀 Startup mode menu** — Choose between OpenCode and OpenClaw before the TUI launches
**💻 OpenCode integration** — Auto-detects NIM setup, sets model as default, launches OpenCode
**🦞 OpenClaw integration** — Sets selected model as default provider in ~/.openclaw/openclaw.json
**🎨 Clean output** — Zero scrollback pollution, interface stays open until Ctrl+C
**📶 Status indicators** — UP ✅ · No Key 🔑 · Timeout ⏳ · Overloaded 🔥 · Not Found 🚫
**🔍 Keyless latency** — Models are pinged even without an API key — a 🔑 NO KEY status confirms the server is reachable with real latency shown, so you can compare providers before committing to a key
**🏷 Tier filtering** — Filter models by tier letter (S, A, B, C) with --tier flag or dynamically with T key
**⭐ Persistent favorites** — Press F on a selected row to pin/unpin it; favorites stay at top with a dark orange background and a star before the model name
**📊 Privacy-first analytics (optional)** — anonymous PostHog events with explicit consent + opt-out
---
📋 Requirements
Before using free-coding-models, make sure you have:
**Node.js 18+** — Required for native fetch API
**At least one free API key** — pick any or all of:
**NVIDIA NIM** — build.nvidia.com → Profile → API Keys → Generate
**Groq** — console.groq.com/keys → Create API Key
**Cerebras** — cloud.cerebras.ai → API Keys → Create
**SambaNova** — sambanova.ai/developers → Developers portal → API key (dev tier generous)
**OpenRouter** — openrouter.ai/keys → Create key (50 req/day, 20/min on :free)
**Hugging Face Inference** — huggingface.co/settings/tokens → Access Tokens (free monthly credits)
**Replicate** — replicate.com/account/api-tokens → Create token (dev quota)
**DeepInfra** — deepinfra.com/login → Login → API key (free dev tier)
**Fireworks AI** — fireworks.ai → Settings → Access Tokens ($1 free credits)
**Mistral Codestral** — codestral.mistral.ai → API Keys (30 req/min, 2000/day — phone required)
**Hyperbolic** — app.hyperbolic.ai/settings → API Keys ($1 free trial)
**Scaleway** — console.scaleway.com/iam/api-keys → IAM → API Keys (1M free tokens)
**Google AI Studio** — aistudio.google.com/apikey → Get API key (free Gemma models, 14.4K req/day)
**SiliconFlow** — cloud.siliconflow.cn/account/ak → API Keys (free-model quotas vary by model)
**Together AI** — api.together.ai/settings/api-keys → API Keys (credits/promotions vary)
**Cloudflare Workers AI** — dash.cloudflare.com → Create API token + set CLOUDFLARE_ACCOUNT_ID (Free: 10k neurons/day)
**Perplexity API** — perplexity.ai/settings/api → API Key (tiered limits by spend)
**OpenCode** *(optional)* — Install OpenCode to use the OpenCode integration
**OpenClaw** *(optional)* — Install OpenClaw to use the OpenClaw integration
💡 **Tip:** You don't need all seventeen providers. One key is enough to get started. Add more later via the Settings screen (P key). Models without a key still show real latency (🔑 NO KEY) so you can evaluate providers before signing up.
---
📦 Installation
---
🚀 Usage
Startup mode menu
When you run free-coding-models without --opencode or --openclaw, you get an interactive startup menu:
Use ↑↓ arrows to select, Enter to confirm. Then the TUI launches with your chosen mode shown in the header badge.
**How it works:**
**Ping phase** — All enabled models are pinged in parallel (up to 134 across 17 providers)
**Continuous monitoring** — Models are re-pinged every 2 seconds forever
**Real-time updates** — Watch "Latest", "Avg", and "Up%" column…