free-coding-models 0.5.65 → 0.5.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/README.md +550 -604
  2. package/changelog/v0.5.66.md +55 -0
  3. package/package.json +3 -3
  4. package/web/dist/assets/{index-C9i10FT8.js → index-BhjFwk1y.js} +2 -2
  5. package/web/dist/favicon.ico +0 -0
  6. package/web/dist/favicons/apple-touch-icon.png +0 -0
  7. package/web/dist/favicons/favicon-16x16.png +0 -0
  8. package/web/dist/favicons/favicon-192x192.png +0 -0
  9. package/web/dist/favicons/favicon-32x32.png +0 -0
  10. package/web/dist/favicons/favicon-48x48.png +0 -0
  11. package/web/dist/favicons/favicon-512x512.png +0 -0
  12. package/web/dist/favicons/favicon-96x96.png +0 -0
  13. package/web/dist/favicons/favicon.ico +0 -0
  14. package/web/dist/favicons/mstile-150x150.png +0 -0
  15. package/web/dist/favicons/mstile-310x150.png +0 -0
  16. package/web/dist/favicons/mstile-310x310.png +0 -0
  17. package/web/dist/favicons/mstile-512x512.png +0 -0
  18. package/web/dist/favicons/mstile-70x70.png +0 -0
  19. package/web/dist/index.html +1 -1
  20. package/web/public/favicon.ico +0 -0
  21. package/web/public/favicons/apple-touch-icon.png +0 -0
  22. package/web/public/favicons/favicon-16x16.png +0 -0
  23. package/web/public/favicons/favicon-192x192.png +0 -0
  24. package/web/public/favicons/favicon-32x32.png +0 -0
  25. package/web/public/favicons/favicon-48x48.png +0 -0
  26. package/web/public/favicons/favicon-512x512.png +0 -0
  27. package/web/public/favicons/favicon-96x96.png +0 -0
  28. package/web/public/favicons/favicon.ico +0 -0
  29. package/web/public/favicons/mstile-150x150.png +0 -0
  30. package/web/public/favicons/mstile-310x150.png +0 -0
  31. package/web/public/favicons/mstile-310x310.png +0 -0
  32. package/web/public/favicons/mstile-512x512.png +0 -0
  33. package/web/public/favicons/mstile-70x70.png +0 -0
package/README.md CHANGED
@@ -6,10 +6,9 @@
6
6
 
7
7
  <p align="center">
8
8
  <strong>Find the fastest free coding model in seconds</strong><br>
9
- Track ~222 models across 20 trusted free or free-limited AI providers in real time<br><br>
10
- <strong>Install Free API endpoints to your favorite AI coding tools:</strong><br>
11
- OpenCode CLI / Desktop / WebUI, OpenClaw, Crush, Goose, Aider, Kilo CLI, Qwen Code, OpenHands, Amp, Hermes, Continue, Cline, Xcode, Pi, ZCode and more...<br><br>
12
- <strong>Use Kimi K2, DeepSeek V3, GPT-OSS, Qwen3, MiniMax M3, GLM, Llama 4, Gemma 4, Devstral and more — for free</strong>
9
+ Track ~222 models across 20 trusted free or free-limited AI providers in real time, then install the one you pick straight into your favorite coding tool.<br><br>
10
+ <strong>Works with:</strong> OpenCode CLI / Desktop / WebUI, OpenClaw, Crush, Goose, Aider, Kilo CLI, Qwen Code, OpenHands, Amp, Hermes, Continue, Cline, Xcode, Pi, ZCode, ForgeCode, Copilot and more.<br><br>
11
+ <strong>Use Kimi K2, DeepSeek V3/V4, GPT-OSS, Qwen3, MiniMax M3, GLM, Llama 4, Gemma 4, Devstral and more for free</strong>
13
12
  </p>
14
13
 
15
14
  <p align="center">
@@ -26,21 +25,23 @@ free-coding-models
26
25
  ```
27
26
 
28
27
  <p align="center">
29
- create a free account on one of the <a href="#-list-of-free-ai-providers">providers</a>
28
+ <sub>Then create a free account on one of the <a href="#-free-ai-providers">20 providers</a> to grab an API key.</sub>
30
29
  </p>
31
30
 
32
31
  <p align="center">
33
32
  <a href="#-why-this-tool">💡 Why</a> •
34
33
  <a href="#-quick-start">⚡ Quick Start</a> •
35
- <a href="#-list-of-free-ai-providers">🟢 Providers</a> •
36
- <a href="#-usage">🚀 Usage</a> •
37
- <a href="#-tui-keys">⌨️ TUI Keys</a> •
38
- <a href="#-features">✨ Features</a> •
34
+ <a href="#-free-ai-providers">🟢 Providers</a> •
35
+ <a href="#-the-terminal-ui-tui">🎛️ TUI</a> •
36
+ <a href="#-the-web-dashboard">🌐 Web</a> •
37
+ <a href="#-agent-extensions">🔌 Extensions</a> •
38
+ <a href="#-the-smart-model-router">🔀 Router</a> •
39
+ <a href="#-reference">📖 Reference</a> •
39
40
  <a href="#-contributing">📋 Contributing</a> •
40
41
  <a href="#️-model-licensing--commercial-use">⚖️ Licensing</a> •
41
42
  <a href="#-telemetry">📊 Telemetry</a> •
42
43
  <a href="#️-security--trust">🛡️ Security</a> •
43
- <a href="#-other-free-ai-resources">🆓 Other Free AI Resources</a>
44
+ <a href="#-other-free-ai-resources">🆓 More resources</a>
44
45
  </p>
45
46
 
46
47
  <p align="center">
@@ -59,21 +60,112 @@ free-coding-models
59
60
 
60
61
  ## 💡 Why this tool?
61
62
 
62
- There are **~222 cataloged free or free-limited coding models** across 20 vetted providers. Which one is fastest right now? Which one is actually stable versus just lucky on the last ping?
63
+ There are **~222 cataloged free or free-limited coding models** across 20 vetted providers. Which one is fastest *right now*? Which one is actually stable, versus just lucky on the last ping?
63
64
 
64
- This CLI pings them all in parallel, shows live latency, and calculates a **live Stability Score (0-100)**. Average latency alone is misleading if a model randomly spikes to 6 seconds; the stability score measures true reliability by combining **p95 latency** (30%), **jitter/variance** (30%), **spike rate** (20%), and **uptime** (20%).
65
+ `free-coding-models` (FCM) answers that by pinging every model in parallel, showing live latency, and computing a **live Stability Score (0100)**. Average latency alone is misleading a model that randomly spikes to 6 seconds isn't reliable. The stability score combines **p95 latency** (30%), **jitter/variance** (30%), **spike rate** (20%), and **uptime** (20%) to measure true reliability.
65
66
 
66
- It then writes the model you pick directly into your coding tool's config — so you go from "which model?" to "coding" in under 10 seconds.
67
+ Once you've picked a model, FCM writes it directly into your coding tool's config — so you go from *"which model?"* to *"coding"* in under 10 seconds.
68
+
69
+ **FCM ships as four surfaces**, all powered by the same engine:
70
+
71
+ | Surface | What it is | When to use it |
72
+ |---|---|---|
73
+ | 🎛️ **TUI** | The interactive terminal dashboard | The default. Live ranking, pick + launch a model. |
74
+ | 🌐 **Web Dashboard** | A browser control center | Browse from your browser, share filtered views, run headless in Docker. |
75
+ | 🔌 **Extensions** | OpenCode & Pi agent plugins | Hot-swap models mid-session without leaving your agent. |
76
+ | 🔀 **Router** | A local OpenAI-compatible daemon | One localhost endpoint that auto-fails-over between free models. |
77
+
78
+ > The TUI and Web Dashboard are the **core** of the product — that's where most users live. Extensions and the Router build on top of the same engine and are covered later in this doc.
67
79
 
68
80
  ---
69
81
 
70
82
  ## ⚡ Quick Start
71
83
 
72
- ### 🟢 List of Free AI Providers
84
+ From zero to "coding with a free model" in about 2 minutes — then a fast tour of the coolest features. Each step links to the full section when you want to go deeper.
85
+
86
+ ### ① Install
87
+
88
+ ```bash
89
+ npm install -g free-coding-models
90
+ free-coding-models --help # sanity check — prints every flag
91
+ ```
92
+
93
+ Requires **Node.js 18+**. That's the only prerequisite — FCM has a single runtime dependency (`chalk`), no native build step, and never needs `sudo`. Update later at any time with `npm install -g free-coding-models@latest` (or `Shift+U` inside the app).
94
+
95
+ ### ② Grab one free API key
96
+
97
+ FCM tracks ~222 models across 20 providers, but you only need **one key** to start. The fastest sign-ups (no credit card, instant key):
98
+
99
+ - **Groq** → [console.groq.com/keys](https://console.groq.com/keys) — Llama 4, GPT-OSS, blazing fast
100
+ - **Cerebras** → [cloud.cerebras.ai](https://cloud.cerebras.ai) — the lowest latency in the whole catalog
101
+ - **NVIDIA NIM** → [build.nvidia.com](https://build.nvidia.com) — 27 models, the biggest free variety
102
+
103
+ 👉 See the full [**provider table**](#-free-ai-providers) for limits, tiers, and env vars. You can add more keys at any time from inside the app (**`P`** → Settings) — one is enough to begin.
104
+
105
+ ### ③ Launch & paste your key
106
+
107
+ ```bash
108
+ free-coding-models
109
+ ```
110
+
111
+ On first run FCM prompts you for API keys. **Paste yours** (or press `Enter` to skip — you'll still see keyless latency rows marked 🔑 NO KEY, and can add keys later with **`P`**). Models start pinging in parallel; rows light up green ✅ as they respond. The default view shows only the providers you have keys for, so the table is calm, not overwhelming.
112
+
113
+ ### ④ Pick a model & launch your tool
114
+
115
+ ```
116
+ ↑↓ navigate the live table → Enter to launch
117
+ ```
118
+
119
+ The model you land on is written straight into your tool's config **and the tool opens immediately** — that's the whole trick, start to finish in seconds. The default target is **OpenCode CLI**; pre-target another tool from the command line or cycle it live with **`Z`**:
73
120
 
74
- Create a free account on one provider below to get started. A few providers (`Kilo`, `LLM7`, OVHcloud sandbox) can also answer without a key, with tighter shared limits.
121
+ ```bash
122
+ free-coding-models --goose --tier S # Goose, pre-filtered to S-tier only
123
+ free-coding-models --crush --origin groq # Crush, Groq models only
124
+ free-coding-models --aider # Aider
125
+ free-coding-models --opencode --premium # OpenCode, elite-focused preset
126
+ ```
127
+
128
+ > 💡 **Missing tool?** If the target CLI isn't installed, FCM catches it, offers a one-line install prompt, installs the official global binary, then resumes the exact same launch automatically.
129
+ >
130
+ > 💡 **Headless?** Skip the TUI entirely: `free-coding-models --tier S --json | jq -r '.[0].modelId'` prints the fastest S-tier model ID for scripts. Or `free-coding-models --fiable` waits 10s and prints the single most reliable model right now.
131
+
132
+ → Full keybindings & workflows: [The Terminal UI (TUI)](#-the-terminal-ui-tui)
133
+
134
+ ### ⑤ The 30-second cool tour 👇
135
+
136
+ You're in. Try these next — they're the features that make FCM feel good:
137
+
138
+ | Press | What happens | Go deeper |
139
+ |---|---|---|
140
+ | **`Ctrl+P`** | Open the ⚡️ **Command Palette** — fuzzy-search every filter, sort, and action in the app | [TUI](#-the-terminal-ui-tui) |
141
+ | **`Q`** | **Smart Recommend** — answer 3 questions, get your Top 3 models picked for you | [TUI](#-the-terminal-ui-tui) |
142
+ | **`Ctrl+A`** / **`Ctrl+U`** | Run a real **AI Speed Test** on one model / all visible models (splits into Latency + TPS) | [TUI](#-the-terminal-ui-tui) |
143
+ | **`F`** then **`Y`** | **Favorite** a model, then **pin** your favorites to the top so they never scroll away | [TUI](#-the-terminal-ui-tui) |
144
+ | **`Z`** | **Cycle tool** (OpenCode → OpenClaw → Crush → Goose → …) without restarting | [TUI](#-the-terminal-ui-tui) |
145
+ | **`G`** | **Cycle theme** (Auto → Dark → Light) if your terminal fights the colors | [TUI](#-the-terminal-ui-tui) |
146
+ | **`;`** | Open the **Playground** — chat with the router right inside the TUI | [Router](#-the-smart-model-router) |
147
+
148
+ <p align="center">
149
+ <img src="https://img.shields.io/badge/USE_%E2%9A%A1%EF%B8%8F%20COMMAND%20PALETTE-CTRL%2BP-22c55e?style=for-the-badge" alt="Use ⚡️ Command Palette with Ctrl+P">
150
+ </p>
75
151
 
76
- **~222 coding models** across 20 active providers, ranked by practical free-tier usefulness.
152
+ ### Go further
153
+
154
+ Once the TUI feels familiar, FCM has three more surfaces — pick the one that matches how you work:
155
+
156
+ - 🌐 **Prefer a browser?** → `free-coding-models web` opens the realtime [**Web Dashboard**](#-the-web-dashboard) on `localhost:3333` (or run it headless in [Docker](#-the-web-dashboard)).
157
+ - 🔀 **Want one endpoint that never dies?** → `free-coding-models --daemon-bg` starts the [**Smart Model Router**](#-the-smart-model-router); point any tool at `http://localhost:19280/v1` with model `fcm` and let it auto-fail-over between free models.
158
+ - 🤖 **Live inside an agent?** → install the [**OpenCode plugin**](#-agent-extensions) or the [**Pi extension**](#-agent-extensions) to hot-swap models mid-session with a single `/fcm`.
159
+
160
+ <p align="center">
161
+ <img src="demo2.gif" alt="free-coding-models TUI demo" width="100%">
162
+ </p>
163
+
164
+ ---
165
+
166
+ ## 🟢 Free AI Providers
167
+
168
+ **~222 coding models** across 20 active providers, ranked by practical free-tier usefulness. Sign up on any one of them to get a key — you only need one to start.
77
169
 
78
170
  | # | Provider | Models | Tier range | Free tier | Env var |
79
171
  |---|----------|--------|-----------|-----------|--------|
@@ -98,25 +190,12 @@ Create a free account on one provider below to get started. A few providers (`Ki
98
190
  | 19 | [Novita AI](https://novita.ai) | 4 | S+ → S | Only zero-price live chat models included | `NOVITA_API_KEY` |
99
191
  | 20 | [Ollama Cloud](https://ollama.com/pricing) | 17 | S+ → A | Free cloud usage with session/weekly limits | `OLLAMA_API_KEY` |
100
192
 
101
- > 💡 One key is enough. Add more at any time with **`P`** inside the TUI.
102
-
103
- > 🧹 Audit cleanup: `iFlow` was removed because it shut down on April 17, 2026. `Together AI`, `Perplexity API`, `DeepInfra`, `Replicate`, `Fireworks`, `Hyperbolic`, `Hugging Face`, `SiliconFlow`, `Chutes AI` were removed from the active free catalog because they are paid, trial-credit only, too tiny to be useful, unclear as a stable free API, or tool-specific rather than a generally usable free provider. `Rovo` and `Gemini CLI` were also wiped out as tool integrations (CLI-only, not generally usable free providers).
104
-
105
- ### ⚠️ Health checks consume provider quota
106
-
107
- > FCM continuously health-probes every model in the catalog so you see live latency, status, and verdict. When you've configured a provider's API key (e.g. `OPENROUTER_API_KEY`), **those probes are authenticated and count against that provider's daily quota**. Rate-limited providers like **OpenRouter** (50 req/day free, 1000 req/day at $10 spend) are particularly sensitive: a single overloaded model can burn your quota in minutes if it's re-pinged every second.
108
-
109
- > As of v0.3.83 (issue #146), FCM now:
110
- > - **Auto-pauses** a provider when its probe gets a `429` response (respects `Retry-After` header + the "try again N seconds later" message body).
111
- > - **Backs off exponentially** on per-model failures (30s → 1m → 2m → 5m) instead of re-pinging a broken model every cycle.
112
- > - **Surfaces a footer chip** like `⏸ openrouter 14h` so you can see which providers are resting.
113
-
114
- > **If you don't need authenticated probes for a provider**, just leave its key empty — anonymous probes still work for liveness checks on most providers, and they won't burn your personal quota.
115
-
116
- ---
193
+ > 💡 One key is enough to start. Add more at any time by pressing **`P`** inside the TUI (or via the Web Dashboard **Settings** page). A few providers (`Kilo`, `LLM7`, OVHcloud sandbox) can even answer without a key, with tighter shared limits.
117
194
 
118
195
  ### Tier scale
119
196
 
197
+ Every model is tiered by its **SWE-bench Verified** score — the industry-standard benchmark for real coding tasks.
198
+
120
199
  | Tier | SWE-bench | Best for |
121
200
  |------|-----------|----------|
122
201
  | **S+** | ≥ 70% | Complex refactors, real-world GitHub issues |
@@ -125,114 +204,196 @@ Create a free account on one provider below to get started. A few providers (`Ki
125
204
  | **A-/B+** | 30–40% | Smaller tasks, constrained infra |
126
205
  | **B/C** | < 30% | Code completion, edge/minimal setups |
127
206
 
128
- **① Install and run:**
207
+ Press **`T`** in the TUI to cycle the tier filter (All → S+ → S → … → C → All).
129
208
 
130
- ```bash
131
- npm install -g free-coding-models
132
- free-coding-models
133
- ```
209
+ ### ⚠️ Health checks consume provider quota
134
210
 
135
- On first run, you'll be prompted to enter your API key(s). You can skip providers and add more later with **`P`**.
211
+ FCM continuously health-probes every model so you see live latency, status, and verdict. When you've configured a provider's API key, **those probes are authenticated and count against that provider's daily quota**. Rate-limited providers like **OpenRouter** (50 req/day free) are the most sensitive: one overloaded model re-pinged every second can burn your quota in minutes.
136
212
 
137
- Use ⚡️ Command Palette! with **Ctrl+P**.
213
+ To protect you, FCM:
138
214
 
139
- <p align="center">
140
- <img src="https://img.shields.io/badge/USE_%E2%9A%A1%EF%B8%8F%20COMMAND%20PALETTE-CTRL%2BP-22c55e?style=for-the-badge" alt="Use ⚡️ Command Palette with Ctrl+P">
141
- </p>
215
+ - **Auto-pauses** a provider the moment its probe gets a `429` (it honors the `Retry-After` header).
216
+ - **Backs off exponentially** per failing model (30s → 1m → 2m → 5m) instead of re-pinging it every cycle.
217
+ - **Surfaces a footer chip** like `⏸ openrouter 14h` so you can see which providers are resting.
218
+
219
+ > If you don't need authenticated probes for a provider, just leave its key empty — anonymous probes still work for liveness checks on most providers, and they won't burn your personal quota.
220
+
221
+ <details>
222
+ <summary><strong>🧹 Providers removed from the catalog (and why)</strong></summary>
223
+
224
+ `iFlow` shut down on April 17, 2026. `Together AI`, `Perplexity API`, `DeepInfra`, `Replicate`, `Fireworks`, `Hyperbolic`, `Hugging Face`, `SiliconFlow`, `Chutes AI` were removed because they are paid, trial-credit only, too tiny to be useful, unclear as a stable free API, or tool-specific rather than a generally usable free provider. `Rovo` and `Gemini CLI` were removed as tool integrations (CLI-only, not generally usable free providers). The full list of free-tier providers kept *outside* the core catalog lives in [Other Free AI Resources](#-other-free-ai-resources).
225
+
226
+ </details>
142
227
 
143
228
  ---
144
229
 
145
- ## 🐳 Docker
230
+ ## 🎛️ The Terminal UI (TUI)
146
231
 
147
- Run FCM without installing Node.js using the official Docker image:
232
+ The TUI is the heart of FCM. Launch it with `free-coding-models` and you get a live, sortable table of every model — real latency, stability, verdict, and a one-key launch into your coding tool.
148
233
 
149
- > **Note:** GHCR requires authentication even for public images. Login once with:
150
- > ```bash
151
- > echo $GITHUB_TOKEN | docker login ghcr.io -u YOUR_GITHUB_USERNAME --password-stdin
152
- > ```
153
- > Or use a [personal access token](https://github.com/settings/tokens) with `read:packages` scope.
234
+ <p align="center"><video src="website/public/videos/tui-first-launch.mp4" alt="First launch ~222 models ping in parallel" autoplay muted loop playsinline width="100%"></video></p>
154
235
 
155
- ```bash
156
- # Quick start (daemon + web UI on port 19280)
157
- docker run -p 19280:19280 ghcr.io/vava-nessa/free-coding-models:latest
236
+ ### First-run flow
158
237
 
159
- # With an API key
160
- docker run -p 19280:19280 -e OPENROUTER_API_KEY=your_key ghcr.io/vava-nessa/free-coding-models:latest
238
+ 1. `free-coding-models` opens the TUI and prompts for API keys. Paste one (or skip).
239
+ 2. Models start pinging in parallel. Rows turn green ✅ as they respond.
240
+ 3. Navigate with **`↑↓`**, press **`Enter`** on the model you want — FCM writes it into your tool's config and launches the tool.
241
+
242
+ ### Common workflows
243
+
244
+ **"Give me the fastest model that actually works"**
245
+ Sort by stability with **`B`** (or **`V`** for verdict) — the top rows with 🥇🥈🥉 medals are your best bets. Models in `NO KEY` or `AUTH FAIL` are faded to 80% opacity so you instantly see what you can't use.
246
+
247
+ **"Configure OpenCode with Groq's fastest model"**
248
+ ```bash
249
+ free-coding-models --opencode --origin groq
250
+ # → navigate, press Enter. opencode.json is written and the CLI opens.
161
251
  ```
162
252
 
163
- Access the daemon web dashboard at `http://localhost:19280/` and configure your coding tool to use `http://localhost:19280/v1` with model `fcm`.
253
+ <p align="center"><video src="website/public/videos/tui-pick-and-launch.mp4" alt="Pick a model & launch — Enter writes the model and opens the tool" autoplay muted loop playsinline width="100%"></video></p>
254
+
255
+ **"Benchmark before I commit to a model"**
256
+ - **`Ctrl+A`** runs an AI Speed Test on the selected model (a real completion request — not just a ping). Results split into **AI Latency** + **TPS**.
257
+ - **`Ctrl+U`** runs the global benchmark across all visible models.
258
+ - Enable **Startup AI Speed Scan** in Settings (`P`) to run the global benchmark automatically after launch.
259
+
260
+ <p align="center"><video src="website/public/videos/tui-speed-test.mp4" alt="AI Speed Test — Ctrl+A benchmarks the selected model" autoplay muted loop playsinline width="100%"></video></p>
261
+
262
+ **"I don't know which model to pick — pick for me"**
263
+ Press **`Q`** to open **Smart Recommend**, a 3-question wizard (task type, priorities…) that returns Top 3 shared-score recommendations.
264
+
265
+ **"Keep my go-to models pinned"**
266
+ Star a model with **`F`** — favorites persist across sessions (shared with the Web Dashboard via `~/.free-coding-models.json`). Press **`Y`** to toggle **Pinned mode**: favorites stay pinned at the top and never scroll off-screen.
164
267
 
165
- For the full TUI-style catalog dashboard from an npm install, run:
268
+ **"Switch tools without restarting"**
269
+ Press **`Z`** to cycle the target tool (OpenCode → OpenClaw → Crush → Goose → …). Models incompatible with the active tool get a dark-red row background so you instantly see what works.
270
+
271
+ **"My terminal theme fights the TUI colors"**
272
+ Press **`G`** to cycle **Auto → Dark → Light**. Recolors the full interface live (table, Settings, Help, overlays).
273
+
274
+ ### Keyboard reference
275
+
276
+ | Key | Action |
277
+ |-----|--------|
278
+ | `↑↓` | Navigate models |
279
+ | `Enter` | Launch the selected model in the active tool |
280
+ | `Z` | Cycle target tool |
281
+ | `T` | Cycle tier filter (All → S+ → S → … → C) |
282
+ | `D` | Cycle provider filter |
283
+ | `E` | Cycle visibility filter (`Active only → Configured only → Usable only`) |
284
+ | `X` | Clear the active custom text filter |
285
+ | `F` | Favorite / unfavorite a model |
286
+ | `Y` | Toggle favorites mode (`Normal` ↔ `Pinned + always visible`) |
287
+ | `G` | Cycle global theme (`Auto → Dark → Light`) |
288
+ | **`Ctrl+P`** | Open the ⚡️ **Command Palette** (fuzzy action launcher) |
289
+ | **`;`** | Open the **Playground** chat overlay (chat with the FCM router) |
290
+ | **`Ctrl+A`** | Run an AI Speed Test for the selected model |
291
+ | **`Ctrl+U`** | Run the Global AI Speed Test (real provider requests) |
292
+ | `R/S/C/M/O/L/A/H/V/B/U` | Sort by Rank / SWE / ContexT / Model / Origin / Last ping / Avg ping / Health / Verdict / staBility / Uptime |
293
+ | `W` | Sort by real-world score (`Real` column — see [Runtime telemetry](#-runtime-telemetry-real-world-scores)) |
294
+ | `Shift+W` | Open the Runtime Report overlay (per-model breakdown + recent calls) |
295
+ | `Shift+B` | Toggle visibility of broken models (footer shows `⚡ N cached · 🔴 M broken`) |
296
+ | `Shift+U` | Update to the latest version (when an update is available) |
297
+ | `P` | Settings (API keys, providers, updates, theme, Startup Speed Scan) |
298
+ | `Q` | Smart Recommend overlay |
299
+ | `N` | Changelog |
300
+ | `I` | Feedback / bug report |
301
+ | `K` | Help overlay |
302
+ | `Ctrl+C` | Exit |
303
+
304
+ ### Mouse reference
305
+
306
+ | Action | Result |
307
+ |--------|--------|
308
+ | **Click column header** | Sort by that column |
309
+ | **Click Tier header** | Cycle tier filter |
310
+ | **Click CLI Tools header** | Cycle tool mode |
311
+ | **Click model row** | Move cursor to model |
312
+ | **Double-click model row** | Select and launch model |
313
+ | **Right-click model row** | Toggle favorite |
314
+ | **Scroll wheel** | Navigate table / overlays / palette |
315
+ | **Click footer hotkey** | Trigger that action |
316
+ | **Click update banner** | Install latest version and relaunch |
317
+ | **Click outside modal** | Close the command palette |
318
+
319
+ → **Stability score & full column reference:** [`docs/stability.md`](./docs/stability.md)
320
+
321
+ ---
322
+
323
+ ## 🌐 The Web Dashboard
324
+
325
+ The Web Dashboard is a real-time, browser-based control center for the same catalog — full parity with the TUI for everything that's safe to port. It's the best surface for browsing at a glance, sharing filtered views, or running FCM headless in Docker.
326
+
327
+ ### Start it
166
328
 
167
329
  ```bash
330
+ # Catalog-only dashboard on http://localhost:3333 (override with FCM_WEB_PORT)
168
331
  free-coding-models web
332
+
333
+ # Full dashboard + Smart Model Router on http://localhost:19280
334
+ free-coding-models --daemon
169
335
  ```
170
336
 
171
- This starts the realtime Web Dashboard locally, opens it in your browser, and uses `http://localhost:3333/` by default. Override the port with `FCM_WEB_PORT=3334 free-coding-models web`.
337
+ | Mode | Port | What you get |
338
+ |------|------|--------------|
339
+ | `web` (or `--web` / `--gui`) | `3333` (`FCM_WEB_PORT`) | The realtime catalog dashboard only — browse, filter, benchmark. |
340
+ | `--daemon` | `19280` (`FCM_PORT`) | Dashboard **+** the Smart Model Router API (`/v1/...`) on the same port. |
341
+ | `--daemon-bg` | `19280` | Same as `--daemon`, but detached so it keeps running after the TUI closes. |
342
+
343
+ > 💡 Open the dashboard with `open http://localhost:3333` (or `19280`), or drive it headless with `chrome-devtools`.
172
344
 
173
- #### Web Dashboard features (M4 parity with TUI)
345
+ ### What's in the dashboard
174
346
 
175
- The local Web Dashboard is a real-time control center for the model catalog
176
- — not just a static table. The header holds every navigation entry, the
177
- model table uses **100% of the viewport width** (no left rail, no right rail),
178
- and every TUI capability that's safe to port ships behind a button or chip.
347
+ The model table uses **100% of the viewport width** (no rails) under a sticky header + filter bar, and every TUI capability ships behind a button or chip.
179
348
 
180
- | Area | What's there |
349
+ | Area | Highlights |
181
350
  |---|---|
182
- | **Header** | Logo + version · primary nav (Dashboard, Settings, Analytics, Recommend, Router) · kebab menu (Help, Changelog, Install Endpoints, Installed Models) · endpoint target picker · `⌘K` command palette · AI Latency · theme · export |
183
- | **Model table** | Full-bleed (no left/right border, no margin) under the sticky header + filter bar · 17 columns, resizable widths persisted in localStorage, ⭐ star per row, 🔌 install-endpoint button per row, medal borders for top-3, dark-red row class for tool-incompatible models, click AI Lat. cell to run a per-row benchmark · table header row stays sticky while scrolling |
184
- | **Filter bar** | Sticky right below the header (always visible) · Tier / Status / Verdict / Health chip rows · Visibility dropdown (Normal / Configured only / Usable only) · Provider select · custom text filter chip with `X` clear · Reset button (TUI `N`) · ping mode (Speed / Normal / Slow / Forced) · "next ping in Xs" countdown (TUI style, always shown) |
185
- | **Stats bar** | Removed in M1 (users found it noisy; the table + chips carry the same info at a glance) |
186
- | **Detail panel** | Slide-in from the right on row click · endpoint target indicator + install-endpoint button · per-row benchmark button (TUI `Ctrl+A`) · favorite toggle (TUI `F`) + up/down reorder (TUI `Shift+↑↓`) · latency trend chart · all stats |
187
- | **Command palette** | `⌘K` / `Ctrl+P` (the only global keyboard shortcut) · fuzzy search across views, theme, ping mode, reset, export, **and the full TUI command registry** (every filter / sort / tool / page entry from `src/tui/command-palette.js`) |
188
- | **Keyboard** | `Esc` closes any modal · `Cmd+K` toggles the palette that's it. Everything else is mouse-first. |
189
- | **URL deep-linking** | `?tier=S+&sort=verdict&origin=groq&toolMode=goose&q=…` hydrates the dashboard on load **and** every filter / sort / view / endpoint target change is reflected back in the URL (debounced 80ms, `history.replaceState`). CLI flags become shareable links. |
190
- | **Favorites** | Shared with the TUI through `~/.free-coding-models.json` a star in the Web is a star in the TUI. Includes pinned+sticky display mode (TUI `Y`). |
191
- | **Help modal** | Header overflow menu → "Help" opens a full-screen modal with all the TUI's keyboard shortcuts, filter behavior, and parity notes. Live search bar. |
192
- | **Changelog modal** | Header overflow menu "Changelog" or Settings "Open Changelog" link. Two-phase (index of versions + per-version release notes). Deep-linkable to a specific version. |
193
- | **Update flow** | Header `⬆ vX.Y.Z` chip + popover with "Update now" + "What's new" (jumps to the new version's changelog entry). Polls every 5 min. |
194
- | **Settings parity** | Full Settings page: theme (auto/dark/light), favorites pinned mode, startup AI Speed Scan, shell env export, legacy proxy cleanup, per-provider **Test** key button (TUI `T` key), update row. All settings persisted to the same `~/.free-coding-models.json` the TUI uses. |
195
- | **Theme** | Tri-state `auto / dark / light` cycle (TUI `G`) — auto follows the OS preference. |
196
- | **Smart Recommend** | Header "Recommend" opens the 3-question wizard, runs the 10s analysis phase, then returns the Top 3 shared-score recommendations with Pin + install-endpoint actions. |
197
- | **Endpoint installs** | The Web never starts external tools. It writes the selected provider/model endpoint into the chosen tool config (`/api/install-endpoint`), then users start their tool themselves. |
198
- | **Router Dashboard** | Header "Router" opens a full modal with daemon start/stop, model health table with circuit breaker badges, request log, probe mode selector, quick-setup card (copy base URL + model to clipboard), **"Probe all" AI Latency/TPS benchmarking**, and a **"Test Router" mini playground** to live-route chats through the fallback chain. |
199
- | **Token Usage** | Integrated inside Analytics: today + all-time summary cards, 7-day usage bar chart, top models and top providers breakdown. |
200
- | **Installed Models** | Header overflow → "Installed Models" opens a modal that scans all tool configs (Goose, Crush, Aider, Kilo, Qwen, Pi, OpenHands, Amp) and shows configured models with soft-delete (backup saved). |
201
- | **Install Endpoints wizard** | Header overflow → "Install Endpoints" opens a 4-step wizard: pick provider → pick tool → select models → install. Writes managed provider catalogs into tool configs using the same engine as the TUI. |
202
-
203
- Roadmap items:
204
- - **M5** — Polish, accessibility, mobile hamburger nav, Lighthouse a11y ≥ 95.
205
-
206
- ### Available Image Tags
207
-
208
- | Tag | Description |
209
- |-----|-------------|
210
- | `latest` | Most recent release |
211
- | `v{major}.{minor}.{patch}` | Specific version (e.g., `v0.3.70`) |
212
- | `v{major}.{minor}` | Minor version (e.g., `v0.3`) |
213
- | `v{major}` | Major version (e.g., `v0`) |
214
-
215
- ### Environment Variables
216
-
217
- | Variable | Default | Description |
218
- |----------|---------|-------------|
219
- | `FCM_HOST` | `0.0.0.0` | Host to bind to (set `127.0.0.1` for localhost-only) |
220
- | `FCM_PORT` | `19280` | Port to listen on |
221
- | `FREE_CODING_MODELS_TELEMETRY` | `0` | Disable telemetry |
351
+ | **Header** | Logo + version · nav (Dashboard, Settings, Analytics, Recommend, Router) · kebab menu (Help, Changelog, Install Endpoints, Installed Models) · endpoint target picker · `⌘K` palette · AI Latency toggle · theme · export |
352
+ | **Model table** | 17 resizable columns (widths saved in localStorage), ⭐ star + 🔌 install per row, medal borders for top-3, dark-red rows for tool-incompatible models, click an AI Latency cell to run a per-row benchmark, sticky header |
353
+ | **Filter bar** | Tier / Status / Verdict / Health chip rows · Visibility (Normal / Configured only / Usable only) · Provider select · text filter with `X` clear · Reset (TUI `N`) · ping mode (Speed / Normal / Slow / Forced) · "next ping in Xs" countdown |
354
+ | **Detail panel** | Slide-in on row click · install-endpoint + per-row benchmark · favorite toggle + reorder (TUI `Shift+↑↓`) · latency trend chart · all stats |
355
+ | **Command palette** | `⌘K` / `Ctrl+P` the only global shortcut. Fuzzy search across views, theme, ping mode, reset, export, **and the full TUI command registry** |
356
+ | **Smart Recommend** | The 3-question wizard Top 3 shared-score recommendations with Pin + install actions |
357
+ | **Router Dashboard** | Daemon start/stop, model health table with circuit-breaker badges, request log, probe-mode selector, "Probe all" benchmark, and a **Test Router** mini-playground |
358
+ | **Token Usage** | (inside Analytics) today + all-time summary, 7-day bar chart, top models & providers breakdown |
359
+ | **Settings parity** | Theme (auto/dark/light), favorites pinned mode, Startup AI Speed Scan, shell-env export, per-provider **Test key** button all persisted to the same `~/.free-coding-models.json` the TUI uses |
360
+
361
+ **Keyboard:** `Esc` closes any modal · `Cmd+K` toggles the palette. Everything else is mouse-first.
362
+
363
+ **URL deep-linking:** `?tier=S+&sort=verdict&origin=groq&toolMode=goose&q=…` hydrates the dashboard on load **and** every filter/sort/view change is reflected back into the URL (debounced). CLI flags become shareable links favorites are shared with the TUI through the same config file.
364
+
365
+ <p align="center"><video src="website/public/videos/web-url-deep-linking.mp4" alt="URL deep-linking filter the dashboard, share the URL" autoplay muted loop playsinline width="100%"></video></p>
222
366
 
223
- Provider API keys (all optional):
367
+ ### Run it in Docker
368
+
369
+ Run FCM without installing Node.js using the official image:
370
+
371
+ > **Note:** GHCR requires authentication even for public images. Login once with:
372
+ > ```bash
373
+ > echo $GITHUB_TOKEN | docker login ghcr.io -u YOUR_GITHUB_USERNAME --password-stdin
374
+ > ```
375
+ > Or use a [personal access token](https://github.com/settings/tokens) with `read:packages` scope.
224
376
 
225
377
  ```bash
226
- docker run -p 19280:19280 \
227
- -e NVIDIA_API_KEY=your_key \
228
- -e GROQ_API_KEY=your_key \
229
- -e OPENROUTER_API_KEY=your_key \
230
- ghcr.io/vava-nessa/free-coding-models:latest
378
+ # Quick start — daemon + web UI on port 19280
379
+ docker run -p 19280:19280 ghcr.io/vava-nessa/free-coding-models:latest
380
+
381
+ # With an API key
382
+ docker run -p 19280:19280 -e OPENROUTER_API_KEY=your_key ghcr.io/vava-nessa/free-coding-models:latest
231
383
  ```
232
384
 
233
- ### Docker Compose
385
+ Point your coding tool at `http://localhost:19280/v1` with model `fcm` and key `fcm-local`. See the [Smart Model Router](#-the-smart-model-router) section for routing details.
234
386
 
235
- Create a `docker-compose.yml`:
387
+ **Available image tags:** `latest` · `v{major}.{minor}.{patch}` (e.g. `v0.3.70`) · `v{major}.{minor}` (e.g. `v0.3`) · `v{major}` (e.g. `v0`)
388
+
389
+ | Env var | Default | Description |
390
+ |---------|---------|-------------|
391
+ | `FCM_HOST` | `0.0.0.0` | Bind host (`127.0.0.1` for localhost-only) |
392
+ | `FCM_PORT` | `19280` | Port to listen on |
393
+ | `FREE_CODING_MODELS_TELEMETRY` | `0` | `0` disables telemetry |
394
+
395
+ <details>
396
+ <summary><strong>Docker Compose + troubleshooting</strong></summary>
236
397
 
237
398
  ```yaml
238
399
  version: '3.8'
@@ -253,83 +414,112 @@ volumes:
253
414
  fcm-data:
254
415
  ```
255
416
 
256
- Run with `docker-compose up -d`. API keys can be passed via a `.env` file or environment variables.
417
+ **Troubleshooting:**
418
+ - **Won't start** — `docker logs fcm`, and check port 19280 isn't in use (`docker ps | grep 19280`).
419
+ - **Health check fails** — wait ~30s for the first probe cycle; verify keys with `docker exec fcm curl http://localhost:19280/health`.
420
+ - **Can't connect from host** — ensure `FCM_HOST=0.0.0.0` (default) and the firewall allows localhost.
421
+ - **Reset data** — config lives in the `fcm-data` volume; wipe it with `docker-compose down -v`.
257
422
 
258
- ### Troubleshooting
423
+ </details>
259
424
 
260
- **Container won't start:**
261
- - Check logs: `docker logs fcm`
262
- - Verify port 19280 is not in use: `docker ps | grep 19280`
425
+ ---
263
426
 
264
- **Health check fails:**
265
- - Wait 30s for initial probe cycle
266
- - Verify API keys are valid: `docker exec fcm curl http://localhost:19280/health`
427
+ ## 🔌 Agent Extensions
267
428
 
268
- **Cannot connect from host:**
269
- - Ensure `FCM_HOST=0.0.0.0` (default)
270
- - Check firewall allows localhost connections
429
+ FCM ships two **agent extensions** that bring the scanner/ranker directly into your coding agent — so you can hot-swap models mid-session without leaving the terminal. Both share one core (`fcm-agent-core`), so a scan done in one benefits the other.
271
430
 
272
- **Data persistence:**
273
- - Config is stored in Docker volume `fcm-data`
274
- - Recreate the volume with `docker-compose down -v` to reset
431
+ ### OpenCode Plugin — `fcm-opencode` ⚠️ BETA
275
432
 
276
- ---
433
+ The OpenCode adapter for the FCM scanner. Startup is intentionally light: fresh cache first, daemon second, **no direct scan** unless you run `/fcm`.
434
+
435
+ ```bash
436
+ # Local install (symlink the adapter into OpenCode's plugins dir)
437
+ mkdir -p ~/.config/opencode/plugins
438
+ ln -sf /Users/<you>/Documents/GitHub/free-coding-models/packages/fcm-opencode/index.js \
439
+ ~/.config/opencode/plugins/fcm-opencode.js
440
+ ```
277
441
 
278
- Need to fix contrast because your terminal theme is fighting the TUI? Press **`G`** at any time to cycle **Auto → Dark → Light**. The switch recolors the full interface live: table, Settings, Help, Smart Recommend, Feedback, and Changelog.
442
+ > (`opencode-plugin/` at the repo root is kept as a thin compat wrapper, so existing symlinks keep working.)
279
443
 
280
- **② Pick a model and launch your tool:**
444
+ | Command | Description |
445
+ |---------|-------------|
446
+ | `/fcm` | Run an explicit scan and list ranked choices (no switch) |
447
+ | `/fcm 1` | Switch OpenCode config to ranked model #1 |
448
+ | `/fcm best` | Switch OpenCode config to the best ranked model |
449
+ | `/fcm rescan` | Force a fresh scan |
450
+ | `/fcm status` / `/fcm-status` | Show plugin diagnostics |
451
+ | `/fcm router` / `/fcm-router` | Switch OpenCode config to the local FCM Smart Router daemon |
281
452
 
282
- ```
283
- ↑↓ navigate → Enter to launch
284
- ```
453
+ → Full details: [`packages/fcm-opencode/README.md`](./packages/fcm-opencode/README.md)
285
454
 
286
- The model you select is automatically written into your tool's config (📦 OpenCode, 🦞 OpenClaw, 💘 Crush, etc.) and the tool opens immediately. Done.
455
+ ### Pi Extension `FCM-Pi` ⚠️ BETA
287
456
 
288
- If the active CLI tool is missing, FCM now catches it before launch, offers a tiny Yes/No install prompt, installs the tool with its official global command, then resumes the same model launch automatically.
457
+ A native [Pi coding agent](https://pi.dev) extension. It stays **silent by default** no scan, no footer noise, no automatic model switch on boot or `/resume`. It only acts when you ask.
289
458
 
290
- > 💡 You can also run `free-coding-models --goose --tier S` to pre-filter to S-tier models for Goose before the TUI even opens.
459
+ **Install** add the extension path to `~/.pi/agent/settings.json` (not yet on npm local path only):
291
460
 
292
- <p align="center">
293
- <img src="demo2.gif" alt="free-coding-models TUI demo" width="100%">
294
- </p>
461
+ ```json
462
+ {
463
+ "packages": [
464
+ "/Users/<you>/Documents/GitHub/free-coding-models/pi-extension"
465
+ ]
466
+ }
467
+ ```
295
468
 
296
- ## 🚀 Usage
469
+ Then restart Pi. The extension loads automatically. Requires Pi + `free-coding-models` installed and configured with at least one API key.
297
470
 
298
- ### Common scenarios
471
+ | Feature | What it does |
472
+ |---------|--------------|
473
+ | **Silent startup** | No scan, no footer noise, no auto-switch on boot or `/resume` |
474
+ | **Manual scan** | `/fcm` pings ~30 candidates in parallel, then waits for your explicit pick |
475
+ | **Live progress** | The Pi status bar shows `⠸ Probing: Kimi K2.6 [Nvidia]…` only while probing, then hides |
476
+ | **10-min disk cache** | Results cached to `~/.pi/agent/fcm-cache.json` for fast diagnostics |
477
+ | **Error-triggered picker** | If a request fails (HTTP 4xx/5xx), FCM reopens the picker and marks the failed model `🔴 BUGGED` |
478
+ | **Daemon integration** | If the router daemon is running (`--daemon-bg`), scan results are fetched instantly from its cache |
299
479
 
300
- ```bash
301
- # "I want the local web dashboard"
302
- free-coding-models --daemon
480
+ | Command | Description |
481
+ |---------|-------------|
482
+ | `/fcm` | Re-scan and pick a model interactively from the top 10 |
483
+ | `/fcm-list` | Ranked table of top 20 models (SWE / Latency / TPS / Provider) |
484
+ | `/fcm-router` | Connect Pi to the local FCM Smart Router daemon |
485
+ | `/fcm-status` | Diagnostics: active model, last scan source, daemon state |
303
486
 
304
- # "I want one local endpoint that fails over between free models"
305
- free-coding-models --daemon-bg
306
- free-coding-models --daemon-status
487
+ **Composite ranking** SWE-bench (60%) + Latency (20%) + TPS (10%) + Stability (10%). Tiny-context Cerebras models (~8k total tokens) are hidden from Pi/OpenCode pickers since they pass a `hi` probe but fail real agent prompts.
307
488
 
308
- # "Start with an elite-focused preset, then adjust filters live"
309
- free-coding-models --premium
489
+ Full architecture: [`packages/fcm-pi/README.md`](./packages/fcm-pi/README.md)
310
490
 
311
- # "I want to script this — give me JSON"
312
- free-coding-models --tier S --json | jq -r '.[0].modelId'
491
+ ### Shared agent architecture
313
492
 
314
- # "I want to configure OpenClaw with Groq's fastest model"
315
- free-coding-models --openclaw --origin groq
493
+ ```
494
+ packages/
495
+ ├── fcm-agent-core/ ← shared core (scan, rank, cache, daemon, keys, providers; no rendering)
496
+ ├── fcm-pi/ ← Pi adapter (hooks, commands, status-bar renderer, ~/.pi/agent disk writer)
497
+ └── fcm-opencode/ ← OpenCode adapter (config mutation, commands, toasts, shell.env)
316
498
  ```
317
499
 
318
- When launching the daemon (with `--daemon`), the web dashboard and router API are served from the same port. Configure tools with:
500
+ - The core emits **structured progress events**; each adapter renders them its own way (Pi status bar, OpenCode toast).
501
+ - API keys are never inlined into OpenCode config — referenced via `{env:FCM_<PROVIDER>_API_KEY}`.
502
+ - A **cross-tool cache** means a scan done in Pi benefits OpenCode (and vice-versa).
319
503
 
320
- | Field | Value |
321
- |-------|-------|
322
- | Router Base URL | `http://localhost:19280/v1` |
323
- | Dashboard URL | `http://localhost:19280/` |
324
- | Model | `fcm` |
325
- | API key | `fcm-local` |
504
+ > One-time self-link so `free-coding-models` resolves by name during local-path use:
505
+ > ```bash
506
+ > cd packages && mkdir -p node_modules && ln -s ../../ node_modules/free-coding-models
507
+ > ```
508
+
509
+ Public API & rationale: [`packages/fcm-agent-core/README.md`](./packages/fcm-agent-core/README.md)
326
510
 
327
- ### Smart Model Router
511
+ ---
328
512
 
329
- The **FCM Router** is a local OpenAI-compatible daemon that keeps running after the TUI closes. Point your coding tool at one localhost endpoint and let FCM route each request to the best available model in your active set.
513
+ ## 🔀 The Smart Model Router
514
+
515
+ The **FCM Router** is a local OpenAI-compatible daemon. Point any coding tool at a single localhost endpoint and let FCM route each request to the best available model in your active set — with automatic failover when a model 429s or 5xxs.
516
+
517
+ > This is the most advanced surface. Most users start with the TUI or Web Dashboard and only reach for the router once they want *one endpoint that never goes down*.
518
+
519
+ ### Quick start
330
520
 
331
521
  ```bash
332
- # Start the router in the background
522
+ # Start the router in the background (keeps running after the TUI closes)
333
523
  free-coding-models --daemon-bg
334
524
 
335
525
  # Check the active port, set, model count, uptime, and request totals
@@ -337,13 +527,9 @@ free-coding-models --daemon-status
337
527
 
338
528
  # Stop it cleanly
339
529
  free-coding-models --daemon-stop
340
-
341
- # Auto-discover and live-probe models into a named set
342
- free-coding-models --sync-set
343
- free-coding-models --sync-set my-coding-set
344
530
  ```
345
531
 
346
- Configure tools with:
532
+ Point your coding tool at:
347
533
 
348
534
  | Field | Value |
349
535
  |-------|-------|
@@ -351,30 +537,46 @@ Configure tools with:
351
537
  | Model | `fcm` |
352
538
  | API key | `fcm-local` |
353
539
 
354
- The daemon auto-creates a `fast-coding` set from your configured providers on first start. It stores router settings in `~/.free-coding-models.json`, writes lifecycle logs to `~/.free-coding-models-daemon.log`, and tracks token metadata in `~/.free-coding-models-tokens.json`.
540
+ On first start the daemon auto-creates a `fast-coding` set from your configured providers. It stores router settings in `~/.free-coding-models.json`, writes lifecycle logs to `~/.free-coding-models-daemon.log`, and tracks token metadata in `~/.free-coding-models-tokens.json`.
541
+
542
+ ### How it works
543
+
544
+ **1. Probe mechanism (adaptive cadence)** — the daemon sends a 1-token chat-completion ping to every model in the active set. It measures latency **+ status code**, not just reachability, so a wrong API key is caught and the circuit breaker opens. Probe modes:
545
+
546
+ | Mode | Interval | Use when |
547
+ |------|----------|----------|
548
+ | `eco` | 120s | You want to save quota |
549
+ | `balanced` *(default)* | 30s | Everyday use |
550
+ | `aggressive` | 10s | You're actively debugging routing |
551
+
552
+ **2. Circuit breaker (per-model state)** — each model flips between states:
553
+
554
+ | State | Meaning |
555
+ |-------|---------|
556
+ | 🟢 **Healthy** | Last probe returned 2xx — route here freely |
557
+ | 🔴 **Down** | Last 3 probes failed — skip until cooldown |
558
+ | 🟡 **Recovering** | Cooldown expired — retrying with 1 request |
559
+ | 🟠 **Auth error** | 401/403 — your API key is wrong for this model |
560
+ | ⚪ **Deprecated** | Removed from the catalog — will be replaced |
561
+
562
+ **3. Failover order** — models are tried in priority order; a `Recovering` / `Down` / `Auth error` model is skipped and the request goes to the next healthy one. If *all* fail, you get a `503` with a `models_tried` list in the body for debugging.
563
+
564
+ **4. Auto-heal (on by default)** — at daemon start, any model in `Auth error` or `Deprecated` is swapped for a working alternative (same provider first, then cross-provider). The first time you manually add/remove/reorder a model, auto-heal switches off and your choices are preserved — so a new user with a half-broken key set lands on a usable default set by the time the dashboard renders.
355
565
 
356
566
  ### Playground — chat with the router
357
567
 
358
- Every chat that goes through the FCM router starts with a configurable **pre-prompt** that introduces the assistant as the free-coding-models routing agent. The Playground is the fastest way to try the router without configuring a coding tool.
568
+ The fastest way to try the router without configuring a tool. Every chat starts with a configurable **pre-prompt** that introduces the assistant as the FCM routing agent.
359
569
 
360
570
  ```bash
361
- # 1. Start the router (if it isn't already)
362
- free-coding-models --daemon-bg
363
-
364
- # 2. Open the Playground in the TUI
365
- free-coding-models --playground
366
- # ... or just press ; inside the TUI
367
- # ... or click "Playground" in the web dashboard header
571
+ free-coding-models --daemon-bg # 1. start the router (if not running)
572
+ free-coding-models --playground # 2. open the Playground in the TUI
573
+ # …or press ; inside the TUI
574
+ # …or click "Playground" in the Web Dashboard header
368
575
  ```
369
576
 
370
- The Playground:
371
-
372
- - Streams responses token-by-token (SSE).
373
- - Shows the routed-via provider/model + latency + tokens on every reply.
374
- - Lets you pin a specific model (`fcm` = auto-router, or `groq/<id>` / `cerebras/<id>` / etc.) for manual A/B testing.
375
- - Lets you toggle the pre-prompt per session, so you can see what the model answers *with* and *without* the FCM persona.
577
+ <p align="center"><video src="website/public/videos/router-playground.mp4" alt="Playground — chat with the router and see the routed provider/model" autoplay muted loop playsinline width="100%"></video></p>
376
578
 
377
- The pre-prompt lives in the router config under `router.prePrompt` and can be edited from any surface (the daemon reloads it on its 10s config-refresh tick):
579
+ The Playground streams responses token-by-token (SSE), shows the routed-via provider/model + latency + tokens on every reply, lets you pin a specific model (`fcm` = auto, or `groq/<id>` / `cerebras/<id>` / …) for A/B testing, and lets you toggle the pre-prompt per session. The pre-prompt lives in `router.prePrompt` and is editable from any surface (the daemon reloads it on its 10s config-refresh tick):
378
580
 
379
581
  ```json
380
582
  {
@@ -387,72 +589,113 @@ The pre-prompt lives in the router config under `router.prePrompt` and can be ed
387
589
  }
388
590
  ```
389
591
 
390
- Router endpoints:
592
+ ### Routing behavior details
593
+
594
+ - Priority order works immediately on cold start, then probes refine health over time.
595
+ - **Transient failures** (`429`, `500`, `502`, `503`, timeouts) fail over to the next model.
596
+ - **Auth problems** (`401`, `403`, missing keys) are marked separately so bad credentials never poison the circuit breaker; after one provider returns an auth error, the router skips the rest of that provider for the current request.
597
+ - Upstream HTML maintenance pages and malformed "successful" JSON are treated as retryable provider failures instead of being forwarded to your tool.
598
+ - Quota/rate-limit failures include retry headers in the final router `503` payload when providers expose them.
599
+ - If a coding tool disconnects mid-request, the daemon aborts the upstream request **without** counting it as a provider failure.
600
+ - Streaming requests retry before the first byte; after partial output starts, the daemon records the failure and lets the current stream finish as safely as possible.
601
+
602
+ ### Auto-discover the best set — `--sync-set`
603
+
604
+ `--sync-set [name]` auto-discovers, live-probes, and populates a named router set with the best currently-available coding models — perfect for scheduled refreshes so your set stays current without manual picking.
605
+
606
+ ```bash
607
+ free-coding-models --sync-set # create/refresh the default "auto" set
608
+ free-coding-models --sync-set my-coding-set # named set
609
+ free-coding-models --daemon-bg # then run the daemon with it
610
+ ```
611
+
612
+ Each candidate is probed twice (plain text must return exactly `OK`, and a tool-call must produce a valid `tool_calls` array), so models that work reliably with function-calling tools get in. Run it on a cron to keep the set fresh:
613
+
614
+ ```bash
615
+ # crontab — refresh every 4 hours
616
+ 0 */4 * * * /usr/local/bin/free-coding-models --sync-set >> ~/.free-coding-models-sync.log 2>&1
617
+ ```
618
+
619
+ → Full pipeline, output shape, and failure modes: [`docs/sync-set.md`](./docs/sync-set.md)
620
+
621
+ ### REST API
622
+
623
+ **Router endpoints** (`/v1/...`):
391
624
 
392
625
  | Endpoint | Purpose |
393
626
  |----------|---------|
394
627
  | `POST /v1/chat/completions` | Route through the active set |
395
628
  | `POST /v1/sets/:name/chat/completions` | Route through a named set |
396
- | `GET /v1/models` | Return virtual models (`fcm`, `fcm:set-name`) |
629
+ | `GET /v1/models` | Virtual models (`fcm`, `fcm:set-name`) |
397
630
  | `GET /health` | Daemon status JSON |
398
- | `GET /stats` | Routing, health, request log, and token stats |
631
+ | `GET /stats` | Routing, health, request log, token + probe-cache + quota + runtime stats |
399
632
  | `GET /stream/events` | Live SSE events for router updates |
400
- | `POST /daemon/probe-mode` | Set probe mode with `{ "probeMode": "eco" | "balanced" | "aggressive" }` |
633
+ | `POST /daemon/probe-mode` | Set probe mode `{ "probeMode": "eco" \| "balanced" \| "aggressive" }` |
401
634
 
402
- **Web Dashboard endpoints** (served from the same port in `--daemon` mode):
635
+ **Web Dashboard endpoints** (same port in `--daemon` mode):
403
636
 
404
637
  | Endpoint | Purpose |
405
638
  |----------|---------|
406
639
  | `GET /` | Web dashboard HTML |
407
640
  | `GET /api/models` | All model data with latency stats |
408
641
  | `GET /api/config` | Provider config (keys masked) |
409
- | `GET /api/events` | Live SSE events for dashboard |
410
- | `GET /api/key/:provider` | Reveal full API key for provider |
642
+ | `GET /api/events` | Live SSE events for the dashboard |
643
+ | `GET /api/key/:provider` | Reveal the full API key for a provider |
411
644
  | `POST /api/settings` | Save API keys and provider toggles |
412
645
 
413
- Routing behavior:
646
+ Full router guide: [`docs/README_ROUTER.md`](./docs/README_ROUTER.md)
414
647
 
415
- - Priority order works immediately on cold start, then probes refine health scores over time.
416
- - Transient failures (`429`, `500`, `502`, `503`, timeouts) fail over to the next model.
417
- - Authentication problems (`401`, `403`, missing keys) are marked separately so bad credentials do not poison the circuit breaker; after one provider returns an auth error, the router skips the rest of that provider for the current request.
418
- - Upstream HTML maintenance pages and malformed successful JSON are treated as retryable provider failures instead of being forwarded to your coding tool.
419
- - Quota and rate-limit failures include retry headers in the final router `503` payload when providers expose them.
420
- - If a coding tool disconnects mid-request, the daemon aborts the upstream request without counting it as a provider failure.
421
- - Streaming requests retry before the first byte; after partial output starts, the daemon records the failure and lets the current stream finish as safely as possible.
422
-
423
- ### Tool launcher flags
424
-
425
- | Flag | Launches |
426
- |------|----------|
427
- | `--opencode` | 📦 OpenCode CLI |
428
- | `--opencode-desktop` | 📦 OpenCode Desktop |
429
- | `--opencode-web` | 📦 OpenCode WebUI |
430
- | `--openclaw` | 🦞 OpenClaw |
431
- | `--crush` | 💘 Crush |
432
- | `--goose` | 🪿 Goose |
433
- | `--aider` | 🛠 Aider |
434
- | `--kilo` | ⚡️ Kilo CLI |
435
- | `--qwen` | 🐉 Qwen Code |
436
- | `--openhands` | 🤲 OpenHands |
437
- | `--amp` | ⚡ Amp |
438
- | `--hermes` | 🔮 Hermes |
439
- | `--continue` | ▶️ Continue CLI |
440
- | `--cline` | 🧠 Cline |
441
- | `--xcode` | 🛠️ Xcode Intelligence |
442
- | `--pi` | π Pi |
443
- | `--copilot` | 🤖 Copilot CLI |
444
- | `--forgecode` | 🔥 ForgeCode |
445
- | `--zcode` | 🧊 ZCode |
648
+ ---
446
649
 
447
- Press **`Z`** in the TUI to cycle between tools without restarting.
650
+ ## 📖 Reference
448
651
 
449
- ### CLI-Only Tools
652
+ The internals below power every surface. They're gathered here so they don't interrupt the core workflow above.
450
653
 
451
- **Note:** When launching these tools via `Z` key or command palette, if the current mode doesn't match the tool, you'll see a confirmation alert asking to switch to the correct tool before launching.
654
+ ### CLI flags
452
655
 
453
- ### OpenCode Zen Free Models
656
+ Flags combine freely in any order. Run `free-coding-models --help` to print the full list in-app.
454
657
 
455
- [OpenCode Zen](https://opencode.ai/zen) is a hosted AI gateway offering **5 free coding models** exclusively through OpenCode CLI and OpenCode Desktop. These models are **not** available through other tools.
658
+ | Flag | Effect |
659
+ |------|--------|
660
+ | `--best` | Show only top tiers (A+, S, S+) |
661
+ | `--premium` | Start with an S-tier filter + verdict sort (resettable in-app) |
662
+ | `--tier <S\|A\|B\|C>` | Filter by tier family (`S` = S+/S, `A` = A+/A/A-, …) |
663
+ | `--origin <provider>` | Filter by provider (e.g. `nvidia`, `groq`, `cerebras`) |
664
+ | `--sort <column>` | Sort by `rank, tier, origin, model, ping, avg, swe, ctx, condition, verdict, uptime, stability, aiLatency, tps` |
665
+ | `--asc` / `--desc` | Sort direction |
666
+ | `--json` | Skip the TUI — print all results as JSON and exit (great for `jq`) |
667
+ | `--fiable` | Wait 10s, pick the most reliable model, print `provider/model_id` and exit |
668
+ | `--recommend` | Open Smart Recommend immediately on startup |
669
+ | `--hide-unconfigured` / `--show-unconfigured` | Control whether models without a key are shown |
670
+ | `--ping-interval <ms>` | Override the ping interval |
671
+ | `--reprobe` / `--no-cache` | Rebuild the persistent probe-cache this run |
672
+ | `--probe-ttl <ms>` | Override the probe-cache TTL (default 24h) |
673
+ | `--show-broken` | Don't auto-hide broken models this run |
674
+ | `--check-drift` | Diff `sources.js` against `models.dev`; exit 1 on mismatch |
675
+ | `--no-telemetry` | Disable anonymous telemetry for this run |
676
+
677
+ **Tool launchers** — start the TUI pre-configured for a tool, then `Enter` writes the model into that tool's config and launches it:
678
+
679
+ | Flag | Tool | Flag | Tool |
680
+ |------|------|------|------|
681
+ | `--opencode` | 📦 OpenCode CLI | `--openhands` | 🤲 OpenHands |
682
+ | `--opencode-desktop` | 📦 OpenCode Desktop | `--amp` | ⚡ Amp |
683
+ | `--opencode-web` | 📦 OpenCode WebUI | `--hermes` | 🔮 Hermes |
684
+ | `--openclaw` | 🦞 OpenClaw | `--continue` | ▶️ Continue CLI |
685
+ | `--crush` | 💘 Crush | `--cline` | 🧠 Cline |
686
+ | `--goose` | 🪿 Goose | `--xcode` | 🛠️ Xcode Intelligence |
687
+ | `--aider` | 🛠 Aider | `--pi` | π Pi |
688
+ | `--kilo` | ⚡️ Kilo CLI | `--copilot` | 🤖 Copilot CLI |
689
+ | `--qwen` | 🐉 Qwen Code | `--forgecode` | 🔥 ForgeCode |
690
+ | | | `--zcode` | 🧊 ZCode |
691
+
692
+ > Default (no tool flag) = OpenCode CLI. Press **`Z`** in the TUI to cycle tools without restarting. Incompatible models get a dark-red row background when a tool mode is active.
693
+
694
+ → Full flag reference: [`docs/flags.md`](./docs/flags.md) · Tool → config mapping: [`docs/integrations.md`](./docs/integrations.md)
695
+
696
+ ### OpenCode Zen — free models exclusive to OpenCode
697
+
698
+ [OpenCode Zen](https://opencode.ai/zen) is a hosted AI gateway offering **5 free coding models** exclusively through OpenCode CLI/Desktop (OpenAI-compatible endpoint, so other tools can use them too):
456
699
 
457
700
  | Model | Tier | SWE-bench | Context |
458
701
  |-------|------|-----------|---------|
@@ -462,351 +705,82 @@ Press **`Z`** in the TUI to cycle between tools without restarting.
462
705
  | Nemotron 3 Super Free | A+ | 52.0% | 200k |
463
706
  | MiniMax M3 Free | S+ | 59.0% | 1M |
464
707
 
465
- To use Zen models: sign up at [opencode.ai/auth](https://opencode.ai/auth) and enter your Zen API key via `P` (Settings). Zen models appear in the main table and auto-switch to OpenCode CLI on launch.
466
-
467
- ### Tool Compatibility
468
-
469
- When a tool mode is active (via `Z`), models incompatible with that tool are highlighted with a dark red background so you can instantly see which models work with your current tool.
470
-
471
- | Model Type | Compatible Tools |
472
- |------------|-----------------|
473
- | Regular (NVIDIA, Groq, etc.) | All tools |
474
- | OpenCode Zen | All tools (OpenAI-compatible endpoint) |
475
-
476
- → **[Full flags reference](./docs/flags.md)**
477
-
478
- ---
708
+ Sign up at [opencode.ai/auth](https://opencode.ai/auth), enter your Zen key via `P`, and Zen models appear in the main table (auto-switching to OpenCode CLI on launch).
479
709
 
480
- ## 🧠 Persistent probe cache
710
+ ### 🧠 Persistent probe cache
481
711
 
482
- Every health probe result is cached to `~/.free-coding-models/probe-cache.json` for **24 hours** and **shared across all surfaces** (CLI TUI, Web Dashboard / daemon, Tauri Desktop).
712
+ Every health-probe result is cached to `~/.free-coding-models/probe-cache.json` for **24 hours** and **shared across all surfaces** (CLI TUI, Web Dashboard / daemon, Tauri Desktop).
483
713
 
484
- - **Warm start** renders the full ranking in <500ms using the cached results, then re-pings only the models that are due (broken or past TTL).
485
- - **Broken models** are auto-hidden across sessions — a model that 401s today stays out of tomorrow's default view. Recovery is automatic: if it comes back `ok`, it un-hides on the next probe.
486
- - **Cross-process safe**: a debounced flush + atomic rename + read-merge-write means the CLI and the daemon can share the file without clobbering each other.
714
+ - **Warm start** renders the full ranking in <500ms using cached results, then re-pings only models that are due (broken or past TTL).
715
+ - **Broken models** are auto-hidden across sessions — a model that 401s today stays out of tomorrow's default view, and recovers automatically when it returns `ok`.
716
+ - **Cross-process safe** debounced flush + atomic rename + read-merge-write, so the CLI and the daemon share the file without clobbering each other.
487
717
 
488
- ### Where the cache lives
489
-
490
- | Env / OS | Path |
491
- |----------|------|
492
- | `XDG_CACHE_HOME` set | `$XDG_CACHE_HOME/free-coding-models/probe-cache.json` |
493
- | Default (macOS / Linux) | `~/.free-coding-models/probe-cache.json` |
494
- | Windows | `%USERPROFILE%\.free-coding-models\probe-cache.json` |
495
-
496
- Inspect or wipe it manually any time — it's plain JSON with `0600` perms.
497
-
498
- ### CLI flags
499
-
500
- | Flag | Effect |
501
- |------|--------|
502
- | `--reprobe` / `--no-cache` | Nuke the cache before this run; ping everything fresh |
718
+ | Flag / key | Effect |
719
+ |------------|--------|
720
+ | `--reprobe` / `--no-cache` | Nuke the cache; ping everything fresh |
503
721
  | `--probe-ttl <ms>` | Override the 24h TTL (e.g. `--probe-ttl 3600000` for 1h) |
504
- | `--show-broken` | Don't auto-hide broken models this run (one-shot override) |
505
-
506
- ### TUI keys
507
-
508
- | Key | Effect |
509
- |-----|--------|
510
- | **Shift+B** | Toggle visibility of broken models (footer chip shows `⚡ N cached · 🔴 M broken`) |
511
-
512
- ### Daemon `/stats` shape
722
+ | `--show-broken` | Don't auto-hide broken models this run |
723
+ | `Shift+B` (TUI) | Toggle broken-model visibility (footer: `⚡ N cached · 🔴 M broken`) |
513
724
 
514
- ```json
515
- {
516
- "probeCache": {
517
- "total": 222,
518
- "ok": 178,
519
- "broken": 13,
520
- "freshCount": 165,
521
- "staleCount": 13,
522
- "dueCount": 26,
523
- "hiddenCount": 13,
524
- "providers": 9
525
- }
526
- }
527
- ```
528
-
529
- ---
725
+ **Cache location:** `$XDG_CACHE_HOME/free-coding-models/probe-cache.json` if set, else `~/.free-coding-models/probe-cache.json` (Windows: `%USERPROFILE%\.free-coding-models\probe-cache.json`). Plain JSON, `0600` perms — inspect or wipe it any time.
530
726
 
531
- ## 📊 Live quota from response headers
727
+ ### 📊 Live quota from response headers
532
728
 
533
729
  Every chat-completion response carries rate-limit headers (`x-ratelimit-remaining-requests`, etc.). The daemon parses them passively on every routed request — **zero extra network requests, zero quota waste**.
534
730
 
535
- - **8 header variants** supported: SambaNova, Mistral, generic `x-ratelimit-*`, the `ratelimit-*` (no-`x-`) variant some proxies use, and 3 daily / token / token-minute variants for Cerebras-style providers.
536
- - **Pre-warmed by pings**: even health-check pings return headers, so quota is visible in the CLI before you ever route a real request through the daemon.
537
- - **5-minute staleness**: snapshots older than 5 minutes are excluded, with the active `/api/v1/key` fetcher as fallback for idle providers.
538
- - **Case-insensitive**: some proxies vary casing; we handle all of them.
539
- - **Garbage-safe**: `limit: 0`, non-numeric values, or missing pairs return `null` (no crash).
540
-
541
- ### Where it shows up
731
+ - **8 header variants** supported (SambaNova, Mistral, generic `x-ratelimit-*`, no-`x-` proxy variant, + 3 daily/token/token-minute Cerebras-style variants).
732
+ - **Pre-warmed by pings** even health pings return headers, so quota is visible before you ever route a real request.
733
+ - **5-minute staleness** snapshots older than 5 min are excluded, with the active `/api/v1/key` fetcher as fallback for idle providers.
542
734
 
543
735
  | Surface | What you'll see |
544
736
  |---------|-----------------|
545
- | TUI footer | `📊 groq 78% · sambanova 41%` chip (top 5 most-depleted first) |
546
- | Web Dashboard | New `Provider Quota` section with animated progress bars per provider |
547
- | `/api/router/stats` | `quota: { providerKey: { remaining, limit, percent, source, lastUpdated, windowType } }` |
548
-
549
- ### Daemon `/stats.quota` shape
550
-
551
- ```json
552
- {
553
- "quota": {
554
- "groq": { "remaining": 14, "limit": 30, "percent": 47, "windowType": "requests", "source": "header", "lastUpdated": 1753478400000 },
555
- "sambanova": { "remaining": 1500, "limit": 14400, "percent": 10, "windowType": "day", "source": "header", "lastUpdated": 1753478400000 }
556
- }
557
- }
558
- ```
559
-
560
- The `source` field is `"header"` when the value came from a passive response header, `"endpoint"` when it came from the active `/api/v1/key` fetcher. Use it in devtools to debug why a provider shows the value it does.
561
-
562
- ---
737
+ | TUI footer | `📊 groq 78% · sambanova 41%` (top 5 most-depleted first) |
738
+ | Web Dashboard | `Provider Quota` section with animated progress bars |
739
+ | `/stats.quota` | `{ providerKey: { remaining, limit, percent, source, lastUpdated, windowType } }` |
563
740
 
564
- ## 📈 Runtime telemetry: real-world scores
741
+ The `source` field is `"header"` (passive) or `"endpoint"` (active fetcher) — handy in devtools to debug why a provider shows the value it does.
565
742
 
566
- Every routed request through the daemon feeds a persistent per-model telemetry file (`~/.free-coding-models/runtime-telemetry.json`) — the **honesty layer** that complements SWE-bench with what models actually do on free tiers.
743
+ ### 📈 Runtime telemetry: real-world scores
567
744
 
568
- - **Real success rate**`(successCalls / totalCalls)` updated on every routed request (success and failure paths alike).
569
- - **Real throughput** — `avgTokensPerSecond` derived from completion tokens / total latency, so you see what your code actually streams at.
570
- - **Recent calls (last 50)** — for debugging "why did this just 500?" without rebuilding state.
571
- - **Composite `Real` score** — `successRate × 0.6 + sigmoid01(tok/s) × 0.25 + recency × 0.15`. Null when below `MIN_CALLS_FOR_SCORE = 5` (no penalty for new models).
745
+ Every routed request through the daemon feeds a persistent per-model telemetry file (`~/.free-coding-models/runtime-telemetry.json`)the **honesty layer** that complements SWE-bench with what models *actually* do on free tiers.
572
746
 
573
- ### Where it shows up
747
+ - **Real success rate** = `successCalls / totalCalls` (updated on every request, success and failure alike).
748
+ - **Real throughput** = `avgTokensPerSecond` from completion tokens / total latency.
749
+ - **Recent calls (last 50)** — for "why did this just 500?" without rebuilding state.
750
+ - **Composite `Real` score** = `successRate × 0.6 + sigmoid01(tok/s) × 0.25 + recency × 0.15` (null below 5 calls — no penalty for new models).
574
751
 
575
752
  | Surface | What you'll see |
576
753
  |---------|-----------------|
577
- | TUI `Real` column | Inline composite score per row, `–` when insufficient data |
578
- | TUI `W` sort key | Sort by real-world score descending |
579
- | TUI `Shift+W` | Runtime Report overlay — per-model breakdown + recent calls |
754
+ | TUI `Real` column | Inline composite per row (`–` when insufficient) |
755
+ | TUI `W` / `Shift+W` | Sort by real-world score / Runtime Report overlay |
580
756
  | Web Dashboard | "Runtime Telemetry" cards with animated success-rate bars |
581
- | `/api/router/stats.runtime` | `{ stats: { modelsTracked, totalCalls, modelsWithSignal }, models: { ... } }` |
582
-
583
- ### Privacy
584
-
585
- The telemetry file lives **locally only** (`~/.free-coding-models/runtime-telemetry.json`, `0600` perms). Nothing is sent upstream unless you opt in to a future aggregate leaderboard. The file holds **metadata only** — success, latency, tokens, error reason. No prompts, no responses, no content.
586
-
587
- ### CLI flag
588
-
589
- - `--clear-runtime` — wipe the file before launching (reset the baseline).
590
-
591
- ---
592
-
593
- ## π Pi Extension — FCM-Pi ⚠️ BETA
594
-
595
- **FCM-Pi** is a native [Pi coding agent](https://pi.dev) extension that integrates `free-coding-models` directly into your Pi session. It stays silent by default, scans only when you run `/fcm`, and lets you explicitly hot-swap models mid-session.
596
-
597
- > **BETA** — The extension is under active development and not yet published to npm. Install via local path only.
598
- >
599
- > **Requires**: Pi coding agent (pi.dev) + free-coding-models installed and configured with at least one API key.
600
-
601
- ### Installation
602
-
603
- Add the extension path to `~/.pi/agent/settings.json` (the extension is **not yet on npm** — local path only for now):
604
-
605
- ```json
606
- {
607
- "packages": [
608
- "/Users/yourname/Documents/GitHub/free-coding-models/pi-extension"
609
- ]
610
- }
611
- ```
612
-
613
- Then restart Pi. The extension loads automatically.
614
-
615
- ### What it does
616
-
617
- | Feature | Description |
618
- |---------|-------------|
619
- | **Silent startup** | No scan, no footer noise, and no automatic model switch on Pi boot or `/resume` |
620
- | **Manual scan** | `/fcm` pings ~30 candidate models in parallel and waits for your explicit selection |
621
- | **Temporary progress scan** | The Pi status bar shows live scan progress only while probing/benchmarking, then hides again |
622
- | **10-minute disk cache** | Results are cached to `~/.pi/agent/fcm-cache.json` for faster diagnostics and lists |
623
- | **Error-triggered picker** | If a request fails (HTTP 4xx/5xx), FCM reopens the picker and marks the failed model `🔴 BUGGED` |
624
- | **Daemon integration** | If the FCM router daemon is running (`free-coding-models --daemon-bg`), scan results are fetched instantly from its cache |
625
-
626
- ### Scan progress display
627
-
628
- During `/fcm`, the Pi footer status shows:
629
-
630
- ```
631
- ⠸ Probing: Kimi K2.6 [Nvidia], Step 3.5 Flash [Stepfun] — 47% (14/30)
632
- ⠼ Benchmarking: GLM 4.7 [Cerebras] — 60% (3/5)
633
- ```
757
+ | `/stats.runtime` | `{ stats: { modelsTracked, totalCalls, modelsWithSignal }, models: {} }` |
634
758
 
635
- - **Spinner** — 10-frame Braille animation at 80ms
636
- - **Phase label** — `Probing` (ping phase) or `Benchmarking` (AI latency phase)
637
- - **Live model name + provider** — shows the last 2 models being probed, scrolling as results come in
638
- - **Progress %** and counter always visible
759
+ **Privacy** — the file is **local only** (`0600` perms) and holds metadata only: success, latency, tokens, error reason. No prompts, no responses, no content. Wipe the baseline with `--clear-runtime`.
639
760
 
640
- ### Commands
761
+ ### Features at a glance
641
762
 
642
- | Command | Description |
643
- |---------|-------------|
644
- | `/fcm` | Re-scan and pick a model interactively from the top 10 ranked |
645
- | `/fcm-list` | Display a ranked table of top 20 available models (SWE / Latency / TPS / Provider) |
646
- | `/fcm-router` | Explicitly connect Pi to the local FCM Smart Router daemon |
647
- | `/fcm-status` | Show diagnostics: active model, last scan source, daemon state |
648
-
649
- ### Composite ranking
650
-
651
- Models are ranked using a composite score:
652
-
653
- | Weight | Metric | Description |
654
- |--------|--------|-------------|
655
- | **60%** | SWE-bench score | Coding capability |
656
- | **20%** | Latency | Network round-trip response time |
657
- | **10%** | TPS | Token throughput speed |
658
- | **10%** | Stability | Uptime + success rate |
659
-
660
- ### Context window limits
661
-
662
- Cerebras free-tier API has a strict **~8k total token limit** (prompt + tools + completion). Tiny-context models can pass a `hi` probe but fail real agent prompts, so FCM hides 8k Cerebras models from Pi/OpenCode pickers.
663
-
664
- ### Full documentation
665
-
666
- The adapter lives in [`packages/fcm-pi`](./packages/fcm-pi); `pi-extension/` is kept as a thin compat wrapper so existing local-path installs keep loading. See [`packages/fcm-pi/README.md`](./packages/fcm-pi/README.md) for the complete architecture, config format, and the one-time `packages/` self-link setup.
667
-
668
- ---
669
-
670
- ## OpenCode Plugin — fcm-opencode ⚠️ BETA
671
-
672
- `fcm-opencode` is the OpenCode adapter for the same FCM scanner/ranker used by FCM-Pi.
673
-
674
- ### Local install
675
-
676
- ```bash
677
- mkdir -p ~/.config/opencode/plugins
678
- ln -sf /Users/vava/Documents/GitHub/free-coding-models/packages/fcm-opencode/index.js \
679
- ~/.config/opencode/plugins/fcm-opencode.js
680
- ```
681
-
682
- (`opencode-plugin/` at the repo root is kept as a thin compat wrapper, so existing symlinks keep working.)
683
-
684
- ### Commands
685
-
686
- | Command | Description |
687
- |---------|-------------|
688
- | `/fcm` | Run an explicit scan and list ranked choices without switching |
689
- | `/fcm 1` | Switch OpenCode config to ranked model #1 |
690
- | `/fcm best` | Switch OpenCode config to the best ranked model |
691
- | `/fcm rescan` | Force a fresh scan |
692
- | `/fcm status` or `/fcm-status` | Show plugin diagnostics |
693
- | `/fcm router` or `/fcm-router` | Switch OpenCode config to the local FCM Smart Router daemon |
694
-
695
- Startup is intentionally light: fresh cache first, daemon second, **no direct scan** unless you run `/fcm`.
696
-
697
- See [`packages/fcm-opencode/README.md`](./packages/fcm-opencode/README.md) for details and limitations.
698
-
699
- ---
700
-
701
- ## 🧩 Agent extensions architecture
702
-
703
- Both adapters share one core so scan/rank/cache/daemon/API-key/provider logic lives in exactly one place:
704
-
705
- ```
706
- packages/
707
- ├── fcm-agent-core/ ← shared core (scan, rank, cache, daemon, keys, provider descriptors; no rendering)
708
- ├── fcm-pi/ ← Pi adapter (hooks, commands, status-bar renderer, ~/.pi/agent disk writer)
709
- └── fcm-opencode/ ← OpenCode adapter (config mutation, commands, toasts, shell.env)
710
- ```
711
-
712
- - The core emits **structured progress events**; each adapter renders them its own way (Pi status bar, OpenCode toast).
713
- - API keys are never inlined into OpenCode config — they are referenced via `{env:FCM_<PROVIDER>_API_KEY}`.
714
- - The cross-tool cache means a scan done in Pi benefits OpenCode (and vice-versa).
715
-
716
- > The `packages/` tree needs a one-time self-link so `free-coding-models` resolves by name during local-path use:
717
- > ```bash
718
- > cd packages && mkdir -p node_modules && ln -s ../../ node_modules/free-coding-models
719
- > ```
720
-
721
- See [`packages/fcm-agent-core/README.md`](./packages/fcm-agent-core/README.md) for the public API and rationale. Tracked in [`.kandown/tasks/t2.md`](./.kandown/tasks/t2.md).
722
-
723
- ---
724
-
725
- ## ⌨️ TUI Keys
726
-
727
- ### Keyboard
728
-
729
- | Key | Action |
730
- |-----|--------|
731
- | `↑↓` | Navigate models |
732
- | `Enter` | Launch selected model in active tool |
733
- | `Z` | Cycle target tool |
734
- | `T` | Cycle tier filter |
735
- | `D` | Cycle provider filter |
736
- | `E` | Cycle visibility filter (`Active only → Configured only → Usable only`) |
737
- | `F` | Favorite / unfavorite model |
738
- | `Y` | Toggle favorites mode (`Normal filter/sort` default ↔ `Pinned + always visible`) |
739
- | `X` | Clear active custom text filter |
740
- | `G` | Cycle global theme (`Auto → Dark → Light`) |
741
- | `Ctrl+P` | Open ⚡️ command palette (search + run actions) |
742
- | `;` | Open the Playground chat overlay (chat with the FCM router) |
743
- | `Ctrl+A` | Run AI Speed Test for the selected model |
744
- | `Ctrl+U` | Run Global AI Speed Test (uses real provider requests) |
745
- | `R/S/C/M/O/L/A/H/V/B/U` | Sort columns |
746
- | `Shift+U` | Update to latest version (when update available) |
747
- | `P` | Settings (API keys, providers, updates, theme) |
748
- | `Q` | Smart Recommend overlay |
749
- | `N` | Changelog |
750
- | `W` | Cycle ping cadence |
751
- | `I` | Feedback / bug report |
752
- | `K` | Help overlay |
753
- | `Ctrl+C` | Exit |
754
-
755
- ### Mouse
756
-
757
- | Action | Result |
758
- |--------|--------|
759
- | **Click column header** | Sort by that column |
760
- | **Click Tier header** | Cycle tier filter |
761
- | **Click CLI Tools header** | Cycle tool mode |
762
- | **Click model row** | Move cursor to model |
763
- | **Double-click model row** | Select and launch model |
764
- | **Right-click model row** | Toggle favorite |
765
- | **Scroll wheel** | Navigate table / overlays / palette |
766
- | **Click footer hotkey** | Trigger that action |
767
- | **Click update banner** | Install latest version and relaunch |
768
- | **Click command palette item** | Select item (double-click to confirm) |
769
- | **Click recommend option** | Select option (double-click to confirm) |
770
- | **Click outside modal** | Close command palette |
771
-
772
- → **[Stability score & column reference](./docs/stability.md)**
773
-
774
- ---
775
-
776
- ## ✨ Features
777
-
778
- - **Parallel pings** — all ~222 API/Zen-callable models tested simultaneously via native `fetch`
779
- - **AI benchmark columns** — `Ctrl+A` benchmarks the selected model, `Ctrl+U` benchmarks visible models, and results split cleanly into **AI Latency** plus **TPS**. Settings includes an opt-in **Startup AI Speed Scan** toggle to run the global benchmark automatically after launch.
780
- - **Tiny verdict indicator** — the first `❔` column mirrors the full Verdict as a compact emoji (`🟩`, `🟢`, `🟡`, `🟠`, etc.) and sorts by the same verdict order.
763
+ - **Parallel pings** all ~222 models tested simultaneously via native `fetch`
764
+ - **AI benchmark columns** — `Ctrl+A` / `Ctrl+U` split into AI Latency + TPS; optional Startup AI Speed Scan
781
765
  - **Adaptive monitoring** — 2s burst for 60s → 10s normal → 30s idle
782
- - **Stability score** — composite 0–100 (p95 latency, jitter, spike rate, uptime)
766
+ - **Stability score** — composite 0–100 (p95, jitter, spike rate, uptime)
783
767
  - **Smart ranking** — top 3 highlighted 🥇🥈🥉
784
- - **Favorites** — star models with `F`, persisted across sessions, default to normal rows, and switch display mode with `Y` (pinned+sticky vs normal rows)
785
- - **Configured-only default** — only shows providers you have keys for
786
- - **Keyless latency** — models ping even without an API key (show 🔑 NO KEY)
787
- - **Unusable row fade** — rows in `NO KEY` or `AUTH FAIL` state are rendered at 80% opacity (20% less opaque) on every surface (TUI + Web + Desktop), so the user can scan the table and instantly see which models they cannot actually use. Composes cleanly with the favorite/recommended/incompatible background tints.
768
+ - **Configured-only default** — shows only providers you have keys for; keyless models still ping (🔑 NO KEY)
788
769
  - **Smart Recommend** — questionnaire picks the best model for your task type
789
- - **Smart Model Router** — local OpenAI-compatible daemon with model sets, failover, circuit breakers, health probes, and token stats
790
- - **Playground chat** — multi-turn chat with the router on every surface (TUI `;` / Web Playground nav / `free-coding-models --playground`). Streams responses and shows the routed-via provider/model on every reply.
791
- - **Auto-heal on startup** — the daemon replaces broken models in the active set (`AUTH_ERROR` / `STALE`) with working alternatives from the same provider first, then cross-provider. The first manual edit disables auto-heal so user choices are preserved. A new user with a half-broken key set lands on a usable default set by the time the dashboard renders.
792
- - **Web router set manager** — add, remove, drag-and-drop, and probe-sync the active router set from inside the Web Dashboard. The "Sync best models" button re-pings every candidate with the user's actual API keys and rebuilds the set with only models that return 2xx, so a new user lands on a working default set instead of a hardcoded one that 401s.
793
- - **Router pre-prompt** — a configurable first-class system message injected by the daemon on every `/v1/chat/completions` request it proxies. Default persona introduces the assistant as the FCM routing agent; editable from any surface.
794
- - **⚡️ Command Palette** — `Ctrl+P` opens a searchable action launcher for filters, sorting, overlays, and quick toggles
795
- - **Install Endpoints** — push a full provider catalog into any tool's config (from Settings `P` or ⚡️ Command Palette)
796
- - **Missing tool bootstrap** — detect absent CLIs, offer one-click install, then continue the selected launch automatically
797
- - **Tool compatibility matrix** — incompatible rows highlighted in dark red when a tool mode is active
798
- - **OpenCode Zen models** — 8 free models exclusive to OpenCode CLI/Desktop, powered by the Zen AI gateway
799
- - **Width guardrail** — shows a warning instead of a broken table in narrow terminals
800
- - **Readable everywhere** — semantic theme palette keeps table rows, overlays, badges, and help screens legible in dark and light terminals
801
- - **Global theme switch** — `G` cycles `auto`, `dark`, + `light` live without restarting
802
- - **Auto-retry** timeout models keep getting retried
803
- - **Mandatory self-update policy** — startup checks npm for a newer FCM and installs it automatically without a prompt. If the install fails twice in a row (offline, proxy, or permissions), FCM still starts but shows a red outdated-version warning until the user retries with `Shift+U` or runs the displayed install command.
804
- - **Last release timestamp** — light pink footer shows `Last release: Mar 27, 2026, 09:42 PM` from npm so users know how fresh the data is
805
- - **Persistent probe-cache (t1)** — every health probe result is cached to `~/.free-coding-models/probe-cache.json` for 24h. Warm starts render the full ranking in <500ms, only re-ping the models that are due (broken or TTL-expired). Broken models are auto-hidden across sessions — toggle visibility with **Shift+B**. See [Persistent probe cache](#-persistent-probe-cache) below for `--reprobe`, `--probe-ttl`, `--show-broken`.
806
- - **Live quota from response headers (t2)** — every routed chat-completion response already carries `x-ratelimit-*` headers. The daemon parses them in 8 variants and exposes live per-provider quota on the TUI footer (`📊 groq 78% · sambanova 41%`) and in the Web Dashboard (`Provider Quota` section with animated progress bars). Zero extra network requests, zero quota waste. See [Live quota from headers](#-live-quota-from-response-headers) below.
807
- - **Runtime telemetry: real-world scores (t3)** — every routed request through the daemon feeds a persistent per-model telemetry file (`~/.free-coding-models/runtime-telemetry.json`) with real success rate, throughput, and recent calls. The `Real` column + `W` sort key in the TUI rank models by what *actually* works on free tiers, not what they claim on SWE-bench. See [Runtime telemetry](#-runtime-telemetry-real-world-scores) below.
808
- - **Extended benchmark catalog (t4)** — `src/data/benchmarks.json` (49 well-known models committed, refreshed at every release via `pnpm update:benchmarks`) layers **Coding Index, Math Index, Agentic Index, Reasoning Index, MMLU-Pro, GPQA, HLE** on top of `sources.js` with a lazy `Proxy` load + prefix-indexed O(key length) lookup. Surfaced on the TUI footer as `📊 bench 49 (2026-07-25)`. Curated SWE-bench scores are never overwritten — the overlay is additive.
809
- - **Live `models.dev` enrichment + drift detection (t5)** — the community-maintained `models.dev` catalog is fetched in the background (5 min in-process cache, 3 retries × 250 ms backoff) and overlaid onto every merged model with `metaSource` provenance. The footer chip shows `📡 102 live · 62 curated` so you see at a glance which values came from upstream. `--check-drift` prints a human-readable drift report vs `sources.js`; a weekly CI job opens a `catalog-drift` issue if anything changed.
770
+ - **Smart Model Router** — local OpenAI-compatible daemon with model sets, failover, circuit breakers, health probes, token stats
771
+ - **Playground chat** — multi-turn chat with the router on every surface
772
+ - **⚡️ Command Palette** — `Ctrl+P` fuzzy action launcher
773
+ - **Install Endpoints** — push a full provider catalog into any tool's config
774
+ - **Missing-tool bootstrap** — detect absent CLIs, offer one-click install, resume the launch
775
+ - **Tool compatibility matrix** — incompatible rows highlighted in dark red
776
+ - **Width guardrail** — warning instead of a broken table in narrow terminals
777
+ - **Mandatory self-update** — checks npm on startup and auto-installs; falls back to a red warning if install fails twice
778
+ - **Extended benchmark catalog** — `src/data/benchmarks.json` layers Coding/Math/Agentic/Reasoning/MMLU-Pro/GPQA/HLE on top of `sources.js` (footer: `📊 bench 49 (2026-07-25)`)
779
+ - **Live `models.dev` enrichment + drift detection** — community catalog overlaid in the background (footer: `📡 102 live · 62 curated`); `--check-drift` prints a drift report
780
+
781
+ ### Configuration file
782
+
783
+ `~/.free-coding-models.json` (created on first run, `0600` perms) holds API keys, provider toggles, favorites, settings, and the router config. The TUI reads env vars first; the daemon reads config first then falls back to env vars (background services may not inherit your shell). → [`docs/config.md`](./docs/config.md)
810
784
 
811
785
  ---
812
786
 
@@ -814,25 +788,19 @@ See [`packages/fcm-agent-core/README.md`](./packages/fcm-agent-core/README.md) f
814
788
 
815
789
  We welcome contributions — issues, PRs, new provider integrations.
816
790
 
817
- **Q:** How accurate are the latency numbers?
818
- **A:** Real round-trip times measured by your machine. Results depend on your network and provider load at that moment.
791
+ **Q: How accurate are the latency numbers?**
792
+ A: Real round-trip times measured by your machine. Results depend on your network and provider load at that moment.
819
793
 
820
- **Q:** Can I add a new provider?
821
- **A:** Yes — see [`sources.js`](./sources.js) for the model catalog format.
794
+ **Q: Can I add a new provider?**
795
+ A: Yes — see [`sources.js`](./sources.js) for the model catalog format.
822
796
 
823
- **[Development guide](./docs/development.md)** · **[Config reference](./docs/config.md)** · **[Tool integrations](./docs/integrations.md)**
797
+ → [Development guide](./docs/development.md) · [Config reference](./docs/config.md) · [Tool integrations](./docs/integrations.md) · [Stability & columns](./docs/stability.md) · [Sync-set](./docs/sync-set.md)
824
798
 
825
799
  ---
826
800
 
827
801
  ## ⚖️ Model Licensing & Commercial Use
828
802
 
829
- **Short answer:** The ~170 cataloged models are API/CLI-served models where generated-output ownership is generally granted by the provider/model terms. Always verify current provider terms for high-stakes commercial use.
830
-
831
- ### Output Ownership
832
-
833
- For every model in this tool, **you own the generated output** — code, text, or otherwise — and can use it commercially. The licenses below govern the *model weights themselves*, not your generated content.
834
-
835
- ### License Breakdown by Model Family
803
+ **Short answer:** the ~222 cataloged models are API/CLI-served models where generated-output ownership is generally granted by the provider/model terms. **You own the generated output** code, text, or otherwise — and can use it commercially. The licenses below govern the *model weights themselves*, not your generated content.
836
804
 
837
805
  | License | Models | Commercial Output |
838
806
  |---------|--------|:-----------------:|
@@ -842,34 +810,24 @@ For every model in this tool, **you own the generated output** — code, text, o
842
810
  | **Llama Community License** | Llama 3.3 70B, Llama 4 Scout/Maverick | ✅ Attribution required. >700M MAU → separate Meta license |
843
811
  | **DeepSeek License** | DeepSeek V3/V3.1/V3.2/V4 family | ✅ Use restrictions on model (no military, no harm) — output is yours |
844
812
  | **NVIDIA Nemotron License** | Nemotron Super/Ultra/Nano | ✅ Updated Mar 2026, now near-Apache 2.0 permissive |
845
- | **MiniMax Model License** | MiniMax M2, M2.5, M3 | ✅ Royalty-free, non-exclusive. Prohibited uses policy applies to model |
813
+ | **MiniMax Model License** | MiniMax M2, M2.5, M3 | ✅ Royalty-free, non-exclusive. Prohibited-uses policy applies to model |
846
814
  | **Proprietary / hosted API terms** | Gemini, GitHub Models, Mistral/Codestral, OpenRouter-hosted models | ✅ Provider ToS applies |
847
815
  | **OpenCode Zen** | Big Pickle, GPT 5 Nano, MiniMax M3 Free, Nemotron 3 Super Free, HY3/Ling/Trinity previews | ✅ Per OpenCode Zen ToS |
848
816
 
849
- ### Key Points
817
+ **Key points:** (1) generated code is yours; (2) Apache 2.0 / permissive families (Qwen, GLM Flash, GPT-OSS, Devstral, Gemma) are the lowest-friction; (3) Llama requires "Built with Llama" attribution, >700M MAU needs a Meta license; (4) DeepSeek / MiniMax have use-restriction policies that govern the model, not your output; (5) API-served models grant output ownership under their current ToS.
850
818
 
851
- 1. **Generated code is yours**no model claims ownership of your output
852
- 2. **Apache 2.0 / permissive model families** (Qwen, GLM Flash, GPT-OSS, Devstral, Gemma) are the lowest-friction options
853
- 3. **Llama** requires "Built with Llama" attribution; >700M MAU needs a Meta license
854
- 4. **DeepSeek / MiniMax** have use-restriction policies (no military use) that govern the model, not your generated code
855
- 5. **API-served models** (Gemini, GitHub Models, OpenRouter, Mistral, etc.) grant output ownership under their current terms of service
856
-
857
- > ⚠️ **Disclaimer:** This is a summary, not legal advice. License terms can change. Always verify the current license on the model's official page before making legal decisions.
819
+ > ⚠️ This is a summary, not legal advice. License terms can change always verify on the model's official page before making legal decisions.
858
820
 
859
821
  ---
860
822
 
861
823
  ## 📊 Telemetry
862
824
 
863
- `free-coding-models` collects anonymous usage telemetry to help understand how the CLI is used and improve the product. No personal information, API keys, prompts, source code, file paths, or secrets are ever collected.
864
-
865
- The telemetry payload is limited to anonymous product analytics such as the app version, selected tool mode, operating system, terminal family, and a random anonymous install ID stored locally on your machine. When a model is launched, telemetry can also include the selected tool, provider, model ID, model label, model tier, launch result, and a few product actions such as installing provider catalogs, saving/removing API keys, or toggling shell environment export.
866
-
867
- Telemetry is enabled by default and can be disabled with any of the following:
825
+ `free-coding-models` collects **anonymous** usage telemetry to understand how the CLI is used and improve the product. No personal information, API keys, prompts, source code, file paths, or secrets are ever collected — only anonymous product analytics (app version, tool mode, OS, terminal family, a random local install ID, and a few product actions like saving keys or installing catalogs).
868
826
 
869
827
  | Method | How |
870
828
  |--------|-----|
871
- | CLI flag | Run `free-coding-models --no-telemetry` |
872
- | Environment variable | Set `FREE_CODING_MODELS_TELEMETRY=0` (also supports `false` or `off`) |
829
+ | CLI flag | `free-coding-models --no-telemetry` |
830
+ | Env var | `FREE_CODING_MODELS_TELEMETRY=0` (also `false` / `off`) |
873
831
 
874
832
  ---
875
833
 
@@ -881,33 +839,21 @@ Telemetry is enabled by default and can be disabled with any of the following:
881
839
  <img src="https://img.shields.io/badge/supply_chain-verified-brightgreen" alt="supply chain verified">
882
840
  </p>
883
841
 
884
- ### Supply Chain
885
-
886
842
  | Signal | Status |
887
843
  |--------|--------|
888
- | **npm Provenance** | ✅ Published with Sigstore-signed provenance |
889
- | **SBOM** | ✅ Software Bill of Materials attached to every GitHub Release |
890
- | **Dependencies** | ✅ 1 runtime dependency (`chalk`) |
891
- | **Lockfile** | ✅ `pnpm-lock.yaml` committed and tracked |
844
+ | **npm Provenance** | ✅ Sigstore-signed |
845
+ | **SBOM** | ✅ Attached to every GitHub Release |
846
+ | **Dependencies** | ✅ 1 runtime (`chalk`) |
847
+ | **Lockfile** | ✅ `pnpm-lock.yaml` tracked |
892
848
  | **Security Policy** | ✅ [`SECURITY.md`](SECURITY.md) |
893
849
  | **Code Owners** | ✅ [`CODEOWNERS`](CODEOWNERS) — all changes require maintainer review |
894
- | **Dependabot** | ✅ Weekly automated dependency + GitHub Actions updates |
895
- | **Audit CI** | ✅ `npm audit` runs on every push/PR + weekly scheduled scan |
850
+ | **Dependabot** | ✅ Weekly automated updates |
851
+ | **Audit CI** | ✅ `npm audit` on every push/PR + weekly scan |
896
852
  | **License** | ✅ MIT |
897
853
 
898
- ### What This Tool Does
899
-
900
- - Pings public API endpoints to measure latency and check availability
901
- - Reads your API keys from `.env` files (only if you configure them)
902
- - Opens configuration files for editing (with your permission)
903
- - Reports anonymous usage data (no personal information — see footer)
904
-
905
- ### What This Tool Does NOT Do
854
+ **What this tool does:** pings public API endpoints to measure latency/availability · reads your API keys from `.env` (only if you configure them) · opens config files for editing (with permission) · reports anonymous usage data.
906
855
 
907
- -Does **not** send your API keys, code, or personal data to any third party
908
- - ❌ Does **not** install or execute arbitrary code beyond `chalk` (the only dependency)
909
- - ❌ Does **not** modify any files outside its own config directory
910
- - ❌ Does **not** require `sudo`, root, or elevated permissions
856
+ **What this tool does NOT do:** never sends your API keys, code, or personal data to any third party · ❌ never installs or executes arbitrary code beyond `chalk` · ❌ never modifies files outside its own config dir · ❌ never requires `sudo`, root, or elevated permissions.
911
857
 
912
858
  > To report a vulnerability, see [`SECURITY.md`](SECURITY.md).
913
859
 
@@ -923,7 +869,7 @@ Telemetry is enabled by default and can be disabled with any of the following:
923
869
  </picture>
924
870
  </a>
925
871
 
926
-
872
+ ---
927
873
 
928
874
  ## Special thanks to contributors
929
875
 
@@ -933,7 +879,7 @@ Telemetry is enabled by default and can be disabled with any of the following:
933
879
  <td align="center" width="120"><a href="https://github.com/erwinh22"><img src="https://avatars.githubusercontent.com/u/6641858?v=4&s=80" width="80" height="80" style="border-radius:50%" alt="erwinh22"></a></td>
934
880
  <td align="center" width="120"><a href="https://github.com/whit3rabbit"><img src="https://avatars.githubusercontent.com/u/12357518?v=4&s=80" width="80" height="80" style="border-radius:50%" alt="whit3rabbit"></a></td>
935
881
  <td align="center" width="120"><a href="https://github.com/skylaweber"><img src="https://avatars.githubusercontent.com/u/172871734?v=4&s=80" width="80" height="80" style="border-radius:50%" alt="skylaweber"></a></td>
936
- <td align="center" width="120"><a href="https://github.com/PhucTruong-ctrl"><img src="https://github.com/PhucTruong-ctrl.png?s=80" width="80" height="80" style="border-radius:50%" alt="PhucTruong-ctrl"></a></td>
882
+ <td align="center" width="120"><a href="https://github.com/PhucTruong-ctrl"><img src="https://avatars.githubusercontent.com/u/PhucTruong-ctrl.png?s=80" width="80" height="80" style="border-radius:50%" alt="PhucTruong-ctrl"></a></td>
937
883
  <td align="center" width="120"><a href="https://github.com/chindris-mihai-alexandru"><img src="https://avatars.githubusercontent.com/u/12643176?v=4&s=80" width="80" height="80" style="border-radius:50%" alt="chindris-mihai-alexandru"></a></td>
938
884
  <td align="center" width="120"><a href="https://github.com/serajbaltu"><img src="https://avatars.githubusercontent.com/u/90699173?v=4&s=80" width="80" height="80" style="border-radius:50%" alt="serajbaltu"></a></td>
939
885
  <td align="center" width="120"><a href="https://github.com/stgreenb"><img src="https://avatars.githubusercontent.com/u/18483964?v=4&s=80" width="80" height="80" style="border-radius:50%" alt="stgreenb"></a></td>
@@ -961,7 +907,7 @@ Telemetry is enabled by default and can be disabled with any of the following:
961
907
 
962
908
  ## 🆓 Other Free AI Resources
963
909
 
964
- **Curated resources outside the active CLI catalog** — IDE extensions, coding agents, GitHub lists, and providers that are useful but not clean enough for the core free-provider table.
910
+ Curated resources kept **outside** the active CLI catalog — IDE extensions, coding agents, GitHub lists, and providers that are useful but not clean enough for the core free-provider table.
965
911
 
966
912
  ### 📚 Awesome Lists (curated by the community)
967
913
 
@@ -988,7 +934,7 @@ Telemetry is enabled by default and can be disabled with any of the following:
988
934
  | [Windsurf](https://windsurf.com/) | 25 prompt credits/month | Required |
989
935
  | [Kilo Code](https://kilocode.ai/) | Up to $25 signup credits (one-time) | Required |
990
936
  | [Tabnine](https://www.tabnine.com/) | Basic completions + chat (limited) | Required |
991
- | [SuperMaven](https://supermaven.com/) | Basic suggestions, 1M token context | Required |
937
+ | [SuperMaven](https://www.supermaven.com/) | Basic suggestions, 1M token context | Required |
992
938
 
993
939
  ### 🔑 API Providers with Permanent Free Tiers
994
940
 
@@ -1005,13 +951,13 @@ Telemetry is enabled by default and can be disabled with any of the following:
1005
951
  | [Cloudflare Workers AI](https://dash.cloudflare.com) | 10K neurons/day | Llama 3.3 70B, QwQ 32B, 47+ models |
1006
952
  | [OVHcloud AI Endpoints](https://endpoints.ai.cloud.ovh.net) | 2 req/min/IP sandbox | GPT-OSS, Qwen3, Mistral |
1007
953
 
1008
- ### 🧪 Good Candidates Kept Outside the Core Catalog
954
+ ### 🧪 Good candidates kept outside the core catalog
1009
955
 
1010
- | Provider | Why it is not core |
956
+ | Provider | Why it's not core |
1011
957
  |----------|--------------------|
1012
- | [Vercel AI Gateway](https://vercel.com/docs/ai-gateway) | Useful gateway with included credits, but it is a router/billing layer, not a provider of permanently free models. |
1013
- | [Cohere](https://cohere.com/) | Real evaluation key, but the allowance is small and the catalog is not coding-first enough for the default TUI. |
1014
- | [Ollama Cloud](https://ollama.com/pricing) | Interesting for light cloud usage, but it is closer to hosted Ollama capacity than a classic OpenAI-compatible free provider. |
958
+ | [Vercel AI Gateway](https://vercel.com/docs/ai-gateway) | Useful gateway with included credits, but it's a router/billing layer, not a provider of permanently free models. |
959
+ | [Cohere](https://cohere.com/) | Real evaluation key, but the allowance is small and the catalog isn't coding-first enough for the default TUI. |
960
+ | [Ollama Cloud](https://ollama.com/pricing) | Interesting for light cloud usage, but closer to hosted Ollama capacity than a classic OpenAI-compatible free provider. |
1015
961
 
1016
962
  ### 💰 Providers with Trial Credits
1017
963
 
@@ -1030,12 +976,12 @@ Telemetry is enabled by default and can be disabled with any of the following:
1030
976
  | [Inference.net](https://inference.net) | $1 (+ $25 on survey) | Permanent |
1031
977
  | [Novita](https://novita.ai/) | $0.5 | 1 year |
1032
978
 
1033
- These trial-credit providers are deliberately not treated as core providers unless their free allowance is practical for recurring coding use. A $0.10/month or $1 one-time credit is useful for experimentation, not for this CLI's default promise.
979
+ These trial-credit providers are deliberately not treated as core unless their free allowance is practical for recurring coding use.
1034
980
 
1035
- ### 🎓 Free with Education/Developer Programs
981
+ ### 🎓 Free with Education / Developer Programs
1036
982
 
1037
983
  | Program | What you get |
1038
984
  |---------|--------------|
1039
985
  | [GitHub Student Pack](https://education.github.com/pack) | Free Copilot Pro for students (verify with .edu email) |
1040
986
  | [GitHub Copilot Free](https://code.visualstudio.com/blogs/2024/12/18/free-github-copilot) | 50 chat + 2,000 completions/month in VS Code |
1041
- | [Copilot Pro for teachers/maintainers](https://docs.github.com/en/copilot/how-tos/manage-your-account/get-free-access-to-copilot-pro) | Free Copilot Pro for open source maintainers & educators |
987
+ | [Copilot Pro for teachers/maintainers](https://docs.github.com/en/copilot/how-tos/manage-your-account/get-free-access-to-copilot-pro) | Free Copilot Pro for open-source maintainers & educators |