free-coding-models 0.1.63 → 0.1.65

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.
package/README.md CHANGED
@@ -2,8 +2,8 @@
2
2
  <img src="https://img.shields.io/npm/v/free-coding-models?color=76b900&label=npm&logo=npm" alt="npm version">
3
3
  <img src="https://img.shields.io/node/v/free-coding-models?color=76b900&logo=node.js" alt="node version">
4
4
  <img src="https://img.shields.io/npm/l/free-coding-models?color=76b900" alt="license">
5
- <img src="https://img.shields.io/badge/models-101-76b900?logo=nvidia" alt="models count">
6
- <img src="https://img.shields.io/badge/providers-9-blue" alt="providers count">
5
+ <img src="https://img.shields.io/badge/models-111-76b900?logo=nvidia" alt="models count">
6
+ <img src="https://img.shields.io/badge/providers-13-blue" alt="providers count">
7
7
  </p>
8
8
 
9
9
  <h1 align="center">free-coding-models</h1>
@@ -15,7 +15,7 @@
15
15
  <p align="center">
16
16
 
17
17
  ```
18
- 1. Create a free API key (NVIDIA, Groq, or Cerebras)
18
+ 1. Create a free API key (NVIDIA, OpenRouter, Hugging Face, etc.)
19
19
  2. npm i -g free-coding-models
20
20
  3. free-coding-models
21
21
  ```
@@ -24,7 +24,7 @@
24
24
 
25
25
  <p align="center">
26
26
  <strong>Find the fastest coding LLM models in seconds</strong><br>
27
- <sub>Ping free models from NVIDIA NIM, Groq, Cerebras, and SambaNova in real-time — pick the best one for OpenCode, OpenClaw, or any AI coding assistant</sub>
27
+ <sub>Ping free coding models from 13 providers in real-time — pick the best one for OpenCode, OpenClaw, or any AI coding assistant</sub>
28
28
  </p>
29
29
 
30
30
  <p align="center">
@@ -47,8 +47,8 @@
47
47
  ## ✨ Features
48
48
 
49
49
  - **🎯 Coding-focused** — Only LLM models optimized for code generation, not chat or vision
50
- - **🌐 Multi-provider** — 101 models from NVIDIA NIM, Groq, Cerebras, SambaNova, OpenRouter, Codestral, Hyperbolic, Scaleway, and Google AI — all free to use
51
- - **⚙️ Settings screen** — Press `P` to manage provider API keys, enable/disable providers, and test keys live
50
+ - **🌐 Multi-provider** — 111 models from NVIDIA NIM, Groq, Cerebras, SambaNova, OpenRouter, Hugging Face Inference, Replicate, DeepInfra, Fireworks AI, Codestral, Hyperbolic, Scaleway, and Google AI — all free to use
51
+ - **⚙️ Settings screen** — Press `P` to manage provider API keys, enable/disable providers, test keys live, and manually check/install updates
52
52
  - **🚀 Parallel pings** — All models tested simultaneously via native `fetch`
53
53
  - **📊 Real-time animation** — Watch latency appear live in alternate screen buffer
54
54
  - **🏆 Smart ranking** — Top 3 fastest models highlighted with medals 🥇🥈🥉
@@ -64,6 +64,7 @@
64
64
  - **📶 Status indicators** — UP ✅ · No Key 🔑 · Timeout ⏳ · Overloaded 🔥 · Not Found 🚫
65
65
  - **🔍 Keyless latency** — Models are pinged even without an API key — a `🔑 NO KEY` status confirms the server is reachable with real latency shown, so you can compare providers before committing to a key
66
66
  - **🏷 Tier filtering** — Filter models by tier letter (S, A, B, C) with `--tier` flag or dynamically with `T` key
67
+ - **⭐ Persistent favorites** — Press `F` on a selected row to pin/unpin it; favorites stay at top with a dark orange background and a star before the model name
67
68
  - **📊 Privacy-first analytics (optional)** — anonymous PostHog events with explicit consent + opt-out
68
69
 
69
70
  ---
@@ -77,8 +78,12 @@ Before using `free-coding-models`, make sure you have:
77
78
  - **NVIDIA NIM** — [build.nvidia.com](https://build.nvidia.com) → Profile → API Keys → Generate
78
79
  - **Groq** — [console.groq.com/keys](https://console.groq.com/keys) → Create API Key
79
80
  - **Cerebras** — [cloud.cerebras.ai](https://cloud.cerebras.ai) → API Keys → Create
80
- - **SambaNova** — [cloud.sambanova.ai/apis](https://cloud.sambanova.ai/apis) → API KeysCreate ($5 free trial, 3 months)
81
- - **OpenRouter** — [openrouter.ai/settings/keys](https://openrouter.ai/settings/keys) → Create key (50 free req/day)
81
+ - **SambaNova** — [sambanova.ai/developers](https://sambanova.ai/developers) → Developers portalAPI key (dev tier generous)
82
+ - **OpenRouter** — [openrouter.ai/keys](https://openrouter.ai/keys) → Create key (50 req/day, 20/min on `:free`)
83
+ - **Hugging Face Inference** — [huggingface.co/settings/tokens](https://huggingface.co/settings/tokens) → Access Tokens (free monthly credits)
84
+ - **Replicate** — [replicate.com/account/api-tokens](https://replicate.com/account/api-tokens) → Create token (dev quota)
85
+ - **DeepInfra** — [deepinfra.com/login](https://deepinfra.com/login) → Login → API key (free dev tier)
86
+ - **Fireworks AI** — [fireworks.ai](https://fireworks.ai) → Settings → Access Tokens ($1 free credits)
82
87
  - **Mistral Codestral** — [codestral.mistral.ai](https://codestral.mistral.ai) → API Keys (30 req/min, 2000/day — phone required)
83
88
  - **Hyperbolic** — [app.hyperbolic.ai/settings](https://app.hyperbolic.ai/settings) → API Keys ($1 free trial)
84
89
  - **Scaleway** — [console.scaleway.com/iam/api-keys](https://console.scaleway.com/iam/api-keys) → IAM → API Keys (1M free tokens)
@@ -86,7 +91,7 @@ Before using `free-coding-models`, make sure you have:
86
91
  3. **OpenCode** *(optional)* — [Install OpenCode](https://github.com/opencode-ai/opencode) to use the OpenCode integration
87
92
  4. **OpenClaw** *(optional)* — [Install OpenClaw](https://openclaw.ai) to use the OpenClaw integration
88
93
 
89
- > 💡 **Tip:** You don't need all nine providers. One key is enough to get started. Add more later via the Settings screen (`P` key). Models without a key still show real latency (`🔑 NO KEY`) so you can evaluate providers before signing up.
94
+ > 💡 **Tip:** You don't need all thirteen providers. One key is enough to get started. Add more later via the Settings screen (`P` key). Models without a key still show real latency (`🔑 NO KEY`) so you can evaluate providers before signing up.
90
95
 
91
96
  ---
92
97
 
@@ -167,13 +172,13 @@ When you run `free-coding-models` without `--opencode` or `--openclaw`, you get
167
172
  Use `↑↓` arrows to select, `Enter` to confirm. Then the TUI launches with your chosen mode shown in the header badge.
168
173
 
169
174
  **How it works:**
170
- 1. **Ping phase** — All enabled models are pinged in parallel (up to 101 across 9 providers)
175
+ 1. **Ping phase** — All enabled models are pinged in parallel (up to 111 across 13 providers)
171
176
  2. **Continuous monitoring** — Models are re-pinged every 2 seconds forever
172
177
  3. **Real-time updates** — Watch "Latest", "Avg", and "Up%" columns update live
173
178
  4. **Select anytime** — Use ↑↓ arrows to navigate, press Enter on a model to act
174
179
  5. **Smart detection** — Automatically detects if NVIDIA NIM is configured in OpenCode or OpenClaw
175
180
 
176
- Setup wizard (first run — walks through all 9 providers):
181
+ Setup wizard (first run — walks through all 13 providers):
177
182
 
178
183
  ```
179
184
  🔑 First-time setup — API keys
@@ -203,7 +208,7 @@ Setup wizard (first run — walks through all 9 providers):
203
208
  You can add or change keys anytime with the P key in the TUI.
204
209
  ```
205
210
 
206
- You don't need all nine — skip any provider by pressing Enter. At least one key is required.
211
+ You don't need all thirteen — skip any provider by pressing Enter. At least one key is required.
207
212
 
208
213
  ### Adding or changing keys later
209
214
 
@@ -214,22 +219,30 @@ Press **`P`** to open the Settings screen at any time:
214
219
 
215
220
  Providers
216
221
 
217
- ❯ [ ✅ ] NIM nvapi-••••••••••••3f9a [Test ✅]
218
- [ ✅ ] Groq (no key set) [Test —]
219
- [ ✅ ] Cerebras (no key set) [Test —]
222
+ ❯ [ ✅ ] NVIDIA NIM nvapi-••••••••••••3f9a [Test ✅] Free tier (provider quota by model)
223
+ [ ✅ ] OpenRouter (no key set) [Test —] 50 req/day, 20/min (:free shared quota)
224
+ [ ✅ ] Hugging Face Inference (no key set) [Test —] Free monthly credits (~$0.10)
220
225
 
221
- ↑↓ Navigate • Enter Edit key • Space Toggle enabled • T Test key • Esc Close
226
+ Setup Instructions NVIDIA NIM
227
+ 1) Create a NVIDIA NIM account: https://build.nvidia.com
228
+ 2) Profile → API Keys → Generate
229
+ 3) Press T to test your key
230
+
231
+ ↑↓ Navigate • Enter Edit key / Check-or-Install update • Space Toggle enabled • T Test key • U Check updates • Esc Close
222
232
  ```
223
233
 
224
234
  - **↑↓** — navigate providers
225
235
  - **Enter** — enter inline key edit mode (type your key, Enter to save, Esc to cancel)
226
236
  - **Space** — toggle provider enabled/disabled
227
237
  - **T** — fire a real test ping to verify the key works (shows ✅/❌)
238
+ - **U** — manually check npm for a newer version
228
239
  - **Esc** — close settings and reload models list
229
240
 
230
241
  Keys are saved to `~/.free-coding-models.json` (permissions `0600`).
231
242
 
232
243
  Analytics toggle is in the same Settings screen (`P`) as a dedicated row (toggle with Enter or Space).
244
+ Manual update is in the same Settings screen (`P`) under **Maintenance** (Enter to check, Enter again to install when an update is available).
245
+ Favorites are also persisted in the same config file and survive restarts.
233
246
 
234
247
  ### Environment variable overrides
235
248
 
@@ -239,6 +252,11 @@ Env vars always take priority over the config file:
239
252
  NVIDIA_API_KEY=nvapi-xxx free-coding-models
240
253
  GROQ_API_KEY=gsk_xxx free-coding-models
241
254
  CEREBRAS_API_KEY=csk_xxx free-coding-models
255
+ OPENROUTER_API_KEY=sk-or-xxx free-coding-models
256
+ HUGGINGFACE_API_KEY=hf_xxx free-coding-models
257
+ REPLICATE_API_TOKEN=r8_xxx free-coding-models
258
+ DEEPINFRA_API_KEY=di_xxx free-coding-models
259
+ FIREWORKS_API_KEY=fw_xxx free-coding-models
242
260
  FREE_CODING_MODELS_TELEMETRY=0 free-coding-models
243
261
  ```
244
262
 
@@ -268,13 +286,33 @@ When enabled, telemetry events include: event name, app version, selected mode,
268
286
  1. Sign up at [cloud.cerebras.ai](https://cloud.cerebras.ai)
269
287
  2. Go to API Keys → Create
270
288
 
271
- > 💡 **Free credits** — All three providers offer free tiers for developers.
289
+ **OpenRouter** (`:free` models):
290
+ 1. Sign up at [openrouter.ai/keys](https://openrouter.ai/keys)
291
+ 2. Create API key (`sk-or-...`)
292
+
293
+ **Hugging Face Inference**:
294
+ 1. Sign up at [huggingface.co/settings/tokens](https://huggingface.co/settings/tokens)
295
+ 2. Create Access Token (`hf_...`)
296
+
297
+ **Replicate**:
298
+ 1. Sign up at [replicate.com/account/api-tokens](https://replicate.com/account/api-tokens)
299
+ 2. Create API token (`r8_...`)
300
+
301
+ **DeepInfra**:
302
+ 1. Sign up at [deepinfra.com/login](https://deepinfra.com/login)
303
+ 2. Create API key from your account dashboard
304
+
305
+ **Fireworks AI**:
306
+ 1. Sign up at [fireworks.ai](https://fireworks.ai)
307
+ 2. Open Settings → Access Tokens and create a token
308
+
309
+ > 💡 **Free tiers** — each provider exposes a dev/free tier with its own quotas.
272
310
 
273
311
  ---
274
312
 
275
313
  ## 🤖 Coding Models
276
314
 
277
- **101 coding models** across 9 providers and 8 tiers, ranked by [SWE-bench Verified](https://www.swebench.com) — the industry-standard benchmark measuring real GitHub issue resolution. Scores are self-reported by providers unless noted.
315
+ **111 coding models** across 13 providers and 8 tiers, ranked by [SWE-bench Verified](https://www.swebench.com) — the industry-standard benchmark measuring real GitHub issue resolution. Scores are self-reported by providers unless noted.
278
316
 
279
317
  ### NVIDIA NIM (44 models)
280
318
 
@@ -347,6 +385,19 @@ Current tier filter is shown in the header badge (e.g., `[Tier S]`)
347
385
  - Sets your selected model as default in `~/.config/opencode/opencode.json`
348
386
  - Launches OpenCode with the model ready to use
349
387
 
388
+ ### tmux sub-agent panes
389
+
390
+ When launched from an existing `tmux` session, `free-coding-models` now auto-adds an OpenCode `--port` argument so OpenCode/oh-my-opencode can spawn sub-agents in panes.
391
+
392
+ - Priority 1: reuse `OPENCODE_PORT` if it is valid and free
393
+ - Priority 2: auto-pick the first free port in `4096-5095`
394
+
395
+ You can force a specific port:
396
+
397
+ ```bash
398
+ OPENCODE_PORT=4098 free-coding-models --opencode
399
+ ```
400
+
350
401
  ### Manual OpenCode Setup (Optional)
351
402
 
352
403
  Create or edit `~/.config/opencode/opencode.json`:
@@ -522,6 +573,15 @@ This script:
522
573
  | `NVIDIA_API_KEY` | NVIDIA NIM key |
523
574
  | `GROQ_API_KEY` | Groq key |
524
575
  | `CEREBRAS_API_KEY` | Cerebras key |
576
+ | `SAMBANOVA_API_KEY` | SambaNova key |
577
+ | `OPENROUTER_API_KEY` | OpenRouter key |
578
+ | `HUGGINGFACE_API_KEY` / `HF_TOKEN` | Hugging Face token |
579
+ | `REPLICATE_API_TOKEN` | Replicate token |
580
+ | `DEEPINFRA_API_KEY` / `DEEPINFRA_TOKEN` | DeepInfra key |
581
+ | `CODESTRAL_API_KEY` | Mistral Codestral key |
582
+ | `HYPERBOLIC_API_KEY` | Hyperbolic key |
583
+ | `SCALEWAY_API_KEY` | Scaleway key |
584
+ | `GOOGLE_API_KEY` | Google AI Studio key |
525
585
  | `FREE_CODING_MODELS_TELEMETRY` | `0` disables analytics, `1` enables analytics |
526
586
  | `FREE_CODING_MODELS_POSTHOG_KEY` | PostHog project API key used for anonymous event capture |
527
587
  | `FREE_CODING_MODELS_POSTHOG_HOST` | Optional PostHog ingest host (`https://eu.i.posthog.com` default) |
@@ -533,13 +593,24 @@ This script:
533
593
  "apiKeys": {
534
594
  "nvidia": "nvapi-xxx",
535
595
  "groq": "gsk_xxx",
536
- "cerebras": "csk_xxx"
596
+ "cerebras": "csk_xxx",
597
+ "openrouter": "sk-or-xxx",
598
+ "huggingface": "hf_xxx",
599
+ "replicate": "r8_xxx",
600
+ "deepinfra": "di_xxx"
537
601
  },
538
602
  "providers": {
539
603
  "nvidia": { "enabled": true },
540
604
  "groq": { "enabled": true },
541
- "cerebras": { "enabled": true }
605
+ "cerebras": { "enabled": true },
606
+ "openrouter": { "enabled": true },
607
+ "huggingface": { "enabled": true },
608
+ "replicate": { "enabled": true },
609
+ "deepinfra": { "enabled": true }
542
610
  },
611
+ "favorites": [
612
+ "nvidia/deepseek-ai/deepseek-v3.2"
613
+ ],
543
614
  "telemetry": {
544
615
  "enabled": true,
545
616
  "consentVersion": 1,
@@ -573,18 +644,23 @@ This script:
573
644
  - **↑↓** — Navigate models
574
645
  - **Enter** — Select model (launches OpenCode or sets OpenClaw default, depending on mode)
575
646
  - **R/Y/O/M/L/A/S/N/H/V/U** — Sort by Rank/Tier/Origin/Model/LatestPing/Avg/SWE/Ctx/Health/Verdict/Uptime
647
+ - **F** — Toggle favorite on selected model (⭐ in Model column, pinned at top)
576
648
  - **T** — Cycle tier filter (All → S+ → S → A+ → A → A- → B+ → B → C → All)
577
649
  - **Z** — Cycle mode (OpenCode CLI → OpenCode Desktop → OpenClaw)
578
- - **P** — Open Settings (manage API keys, provider toggles, analytics toggle)
650
+ - **P** — Open Settings (manage API keys, provider toggles, analytics toggle, manual update)
579
651
  - **W** — Decrease ping interval (faster pings)
580
652
  - **X** — Increase ping interval (slower pings)
653
+ - **K** / **Esc** — Show/hide help overlay
581
654
  - **Ctrl+C** — Exit
582
655
 
656
+ Pressing **K** now shows a full in-app reference: main hotkeys, settings hotkeys, and CLI flags with usage examples.
657
+
583
658
  **Keyboard shortcuts (Settings screen — `P` key):**
584
- - **↑↓** — Navigate providers and analytics row
585
- - **Enter** — Edit API key inline, or toggle analytics on analytics row
659
+ - **↑↓** — Navigate providers, analytics row, and maintenance row
660
+ - **Enter** — Edit API key inline, toggle analytics on analytics row, or check/install update on maintenance row
586
661
  - **Space** — Toggle provider enabled/disabled, or toggle analytics on analytics row
587
662
  - **T** — Test current provider's API key (fires a live ping)
663
+ - **U** — Check for updates manually from settings
588
664
  - **Esc** — Close settings and return to main TUI
589
665
 
590
666
  ---