free-coding-models 0.1.62 → 0.1.64

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,7 +47,7 @@
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
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
51
  - **⚙️ Settings screen** — Press `P` to manage provider API keys, enable/disable providers, and test keys live
52
52
  - **🚀 Parallel pings** — All models tested simultaneously via native `fetch`
53
53
  - **📊 Real-time animation** — Watch latency appear live in alternate screen buffer
@@ -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
+ - **📊 Privacy-first analytics (optional)** — anonymous PostHog events with explicit consent + opt-out
67
68
 
68
69
  ---
69
70
 
@@ -76,8 +77,12 @@ Before using `free-coding-models`, make sure you have:
76
77
  - **NVIDIA NIM** — [build.nvidia.com](https://build.nvidia.com) → Profile → API Keys → Generate
77
78
  - **Groq** — [console.groq.com/keys](https://console.groq.com/keys) → Create API Key
78
79
  - **Cerebras** — [cloud.cerebras.ai](https://cloud.cerebras.ai) → API Keys → Create
79
- - **SambaNova** — [cloud.sambanova.ai/apis](https://cloud.sambanova.ai/apis) → API KeysCreate ($5 free trial, 3 months)
80
- - **OpenRouter** — [openrouter.ai/settings/keys](https://openrouter.ai/settings/keys) → Create key (50 free req/day)
80
+ - **SambaNova** — [sambanova.ai/developers](https://sambanova.ai/developers) → Developers portalAPI key (dev tier generous)
81
+ - **OpenRouter** — [openrouter.ai/keys](https://openrouter.ai/keys) → Create key (50 req/day, 20/min on `:free`)
82
+ - **Hugging Face Inference** — [huggingface.co/settings/tokens](https://huggingface.co/settings/tokens) → Access Tokens (free monthly credits)
83
+ - **Replicate** — [replicate.com/account/api-tokens](https://replicate.com/account/api-tokens) → Create token (dev quota)
84
+ - **DeepInfra** — [deepinfra.com/login](https://deepinfra.com/login) → Login → API key (free dev tier)
85
+ - **Fireworks AI** — [fireworks.ai](https://fireworks.ai) → Settings → Access Tokens ($1 free credits)
81
86
  - **Mistral Codestral** — [codestral.mistral.ai](https://codestral.mistral.ai) → API Keys (30 req/min, 2000/day — phone required)
82
87
  - **Hyperbolic** — [app.hyperbolic.ai/settings](https://app.hyperbolic.ai/settings) → API Keys ($1 free trial)
83
88
  - **Scaleway** — [console.scaleway.com/iam/api-keys](https://console.scaleway.com/iam/api-keys) → IAM → API Keys (1M free tokens)
@@ -85,7 +90,7 @@ Before using `free-coding-models`, make sure you have:
85
90
  3. **OpenCode** *(optional)* — [Install OpenCode](https://github.com/opencode-ai/opencode) to use the OpenCode integration
86
91
  4. **OpenClaw** *(optional)* — [Install OpenClaw](https://openclaw.ai) to use the OpenClaw integration
87
92
 
88
- > 💡 **Tip:** You don't need all four 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.
93
+ > 💡 **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.
89
94
 
90
95
  ---
91
96
 
@@ -130,6 +135,9 @@ free-coding-models --best
130
135
  # Analyze for 10 seconds and output the most reliable model
131
136
  free-coding-models --fiable
132
137
 
138
+ # Disable anonymous analytics for this run
139
+ free-coding-models --no-telemetry
140
+
133
141
  # Filter models by tier letter
134
142
  free-coding-models --tier S # S+ and S only
135
143
  free-coding-models --tier A # A+, A, A- only
@@ -163,13 +171,13 @@ When you run `free-coding-models` without `--opencode` or `--openclaw`, you get
163
171
  Use `↑↓` arrows to select, `Enter` to confirm. Then the TUI launches with your chosen mode shown in the header badge.
164
172
 
165
173
  **How it works:**
166
- 1. **Ping phase** — All enabled models are pinged in parallel (up to 101 across 9 providers)
174
+ 1. **Ping phase** — All enabled models are pinged in parallel (up to 111 across 13 providers)
167
175
  2. **Continuous monitoring** — Models are re-pinged every 2 seconds forever
168
176
  3. **Real-time updates** — Watch "Latest", "Avg", and "Up%" columns update live
169
177
  4. **Select anytime** — Use ↑↓ arrows to navigate, press Enter on a model to act
170
178
  5. **Smart detection** — Automatically detects if NVIDIA NIM is configured in OpenCode or OpenClaw
171
179
 
172
- Setup wizard (first run — walks through all 9 providers):
180
+ Setup wizard (first run — walks through all 13 providers):
173
181
 
174
182
  ```
175
183
  🔑 First-time setup — API keys
@@ -199,7 +207,7 @@ Setup wizard (first run — walks through all 9 providers):
199
207
  You can add or change keys anytime with the P key in the TUI.
200
208
  ```
201
209
 
202
- You don't need all four — skip any provider by pressing Enter. At least one key is required.
210
+ You don't need all thirteen — skip any provider by pressing Enter. At least one key is required.
203
211
 
204
212
  ### Adding or changing keys later
205
213
 
@@ -210,9 +218,14 @@ Press **`P`** to open the Settings screen at any time:
210
218
 
211
219
  Providers
212
220
 
213
- ❯ [ ✅ ] NIM nvapi-••••••••••••3f9a [Test ✅]
214
- [ ✅ ] Groq (no key set) [Test —]
215
- [ ✅ ] Cerebras (no key set) [Test —]
221
+ ❯ [ ✅ ] NVIDIA NIM nvapi-••••••••••••3f9a [Test ✅] Free tier (provider quota by model)
222
+ [ ✅ ] OpenRouter (no key set) [Test —] 50 req/day, 20/min (:free shared quota)
223
+ [ ✅ ] Hugging Face Inference (no key set) [Test —] Free monthly credits (~$0.10)
224
+
225
+ Setup Instructions — NVIDIA NIM
226
+ 1) Create a NVIDIA NIM account: https://build.nvidia.com
227
+ 2) Profile → API Keys → Generate
228
+ 3) Press T to test your key
216
229
 
217
230
  ↑↓ Navigate • Enter Edit key • Space Toggle enabled • T Test key • Esc Close
218
231
  ```
@@ -225,6 +238,8 @@ Press **`P`** to open the Settings screen at any time:
225
238
 
226
239
  Keys are saved to `~/.free-coding-models.json` (permissions `0600`).
227
240
 
241
+ Analytics toggle is in the same Settings screen (`P`) as a dedicated row (toggle with Enter or Space).
242
+
228
243
  ### Environment variable overrides
229
244
 
230
245
  Env vars always take priority over the config file:
@@ -233,8 +248,24 @@ Env vars always take priority over the config file:
233
248
  NVIDIA_API_KEY=nvapi-xxx free-coding-models
234
249
  GROQ_API_KEY=gsk_xxx free-coding-models
235
250
  CEREBRAS_API_KEY=csk_xxx free-coding-models
251
+ OPENROUTER_API_KEY=sk-or-xxx free-coding-models
252
+ HUGGINGFACE_API_KEY=hf_xxx free-coding-models
253
+ REPLICATE_API_TOKEN=r8_xxx free-coding-models
254
+ DEEPINFRA_API_KEY=di_xxx free-coding-models
255
+ FIREWORKS_API_KEY=fw_xxx free-coding-models
256
+ FREE_CODING_MODELS_TELEMETRY=0 free-coding-models
236
257
  ```
237
258
 
259
+ Telemetry env vars:
260
+
261
+ - `FREE_CODING_MODELS_TELEMETRY=0|1` — force disable/enable analytics
262
+ - `FREE_CODING_MODELS_POSTHOG_KEY` — PostHog project API key (required to send events)
263
+ - `FREE_CODING_MODELS_POSTHOG_HOST` — optional ingest host (`https://eu.i.posthog.com` default)
264
+ - `FREE_CODING_MODELS_TELEMETRY_DEBUG=1` — optional stderr debug logs for telemetry troubleshooting
265
+
266
+ On first run (or when consent policy changes), the CLI asks users to accept or decline anonymous analytics.
267
+ When enabled, telemetry events include: event name, app version, selected mode, system (`macOS`/`Windows`/`Linux`), and terminal family (`Terminal.app`, `iTerm2`, `kitty`, `Warp`, `WezTerm`, etc., with generic fallback from `TERM_PROGRAM`/`TERM`).
268
+
238
269
  ### Get your free API keys
239
270
 
240
271
  **NVIDIA NIM** (44 models, S+ → C tier):
@@ -251,13 +282,33 @@ CEREBRAS_API_KEY=csk_xxx free-coding-models
251
282
  1. Sign up at [cloud.cerebras.ai](https://cloud.cerebras.ai)
252
283
  2. Go to API Keys → Create
253
284
 
254
- > 💡 **Free credits** — All three providers offer free tiers for developers.
285
+ **OpenRouter** (`:free` models):
286
+ 1. Sign up at [openrouter.ai/keys](https://openrouter.ai/keys)
287
+ 2. Create API key (`sk-or-...`)
288
+
289
+ **Hugging Face Inference**:
290
+ 1. Sign up at [huggingface.co/settings/tokens](https://huggingface.co/settings/tokens)
291
+ 2. Create Access Token (`hf_...`)
292
+
293
+ **Replicate**:
294
+ 1. Sign up at [replicate.com/account/api-tokens](https://replicate.com/account/api-tokens)
295
+ 2. Create API token (`r8_...`)
296
+
297
+ **DeepInfra**:
298
+ 1. Sign up at [deepinfra.com/login](https://deepinfra.com/login)
299
+ 2. Create API key from your account dashboard
300
+
301
+ **Fireworks AI**:
302
+ 1. Sign up at [fireworks.ai](https://fireworks.ai)
303
+ 2. Open Settings → Access Tokens and create a token
304
+
305
+ > 💡 **Free tiers** — each provider exposes a dev/free tier with its own quotas.
255
306
 
256
307
  ---
257
308
 
258
309
  ## 🤖 Coding Models
259
310
 
260
- **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.
311
+ **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.
261
312
 
262
313
  ### NVIDIA NIM (44 models)
263
314
 
@@ -330,6 +381,19 @@ Current tier filter is shown in the header badge (e.g., `[Tier S]`)
330
381
  - Sets your selected model as default in `~/.config/opencode/opencode.json`
331
382
  - Launches OpenCode with the model ready to use
332
383
 
384
+ ### tmux sub-agent panes
385
+
386
+ 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.
387
+
388
+ - Priority 1: reuse `OPENCODE_PORT` if it is valid and free
389
+ - Priority 2: auto-pick the first free port in `4096-5095`
390
+
391
+ You can force a specific port:
392
+
393
+ ```bash
394
+ OPENCODE_PORT=4098 free-coding-models --opencode
395
+ ```
396
+
333
397
  ### Manual OpenCode Setup (Optional)
334
398
 
335
399
  Create or edit `~/.config/opencode/opencode.json`:
@@ -500,11 +564,23 @@ This script:
500
564
 
501
565
  **Environment variables (override config file):**
502
566
 
503
- | Variable | Provider |
504
- |----------|----------|
505
- | `NVIDIA_API_KEY` | NVIDIA NIM |
506
- | `GROQ_API_KEY` | Groq |
507
- | `CEREBRAS_API_KEY` | Cerebras |
567
+ | Variable | Description |
568
+ |----------|-------------|
569
+ | `NVIDIA_API_KEY` | NVIDIA NIM key |
570
+ | `GROQ_API_KEY` | Groq key |
571
+ | `CEREBRAS_API_KEY` | Cerebras key |
572
+ | `SAMBANOVA_API_KEY` | SambaNova key |
573
+ | `OPENROUTER_API_KEY` | OpenRouter key |
574
+ | `HUGGINGFACE_API_KEY` / `HF_TOKEN` | Hugging Face token |
575
+ | `REPLICATE_API_TOKEN` | Replicate token |
576
+ | `DEEPINFRA_API_KEY` / `DEEPINFRA_TOKEN` | DeepInfra key |
577
+ | `CODESTRAL_API_KEY` | Mistral Codestral key |
578
+ | `HYPERBOLIC_API_KEY` | Hyperbolic key |
579
+ | `SCALEWAY_API_KEY` | Scaleway key |
580
+ | `GOOGLE_API_KEY` | Google AI Studio key |
581
+ | `FREE_CODING_MODELS_TELEMETRY` | `0` disables analytics, `1` enables analytics |
582
+ | `FREE_CODING_MODELS_POSTHOG_KEY` | PostHog project API key used for anonymous event capture |
583
+ | `FREE_CODING_MODELS_POSTHOG_HOST` | Optional PostHog ingest host (`https://eu.i.posthog.com` default) |
508
584
 
509
585
  **Config file:** `~/.free-coding-models.json` (created automatically, permissions `0600`)
510
586
 
@@ -513,12 +589,25 @@ This script:
513
589
  "apiKeys": {
514
590
  "nvidia": "nvapi-xxx",
515
591
  "groq": "gsk_xxx",
516
- "cerebras": "csk_xxx"
592
+ "cerebras": "csk_xxx",
593
+ "openrouter": "sk-or-xxx",
594
+ "huggingface": "hf_xxx",
595
+ "replicate": "r8_xxx",
596
+ "deepinfra": "di_xxx"
517
597
  },
518
598
  "providers": {
519
599
  "nvidia": { "enabled": true },
520
600
  "groq": { "enabled": true },
521
- "cerebras": { "enabled": true }
601
+ "cerebras": { "enabled": true },
602
+ "openrouter": { "enabled": true },
603
+ "huggingface": { "enabled": true },
604
+ "replicate": { "enabled": true },
605
+ "deepinfra": { "enabled": true }
606
+ },
607
+ "telemetry": {
608
+ "enabled": true,
609
+ "consentVersion": 1,
610
+ "anonymousId": "anon_550e8400-e29b-41d4-a716-446655440000"
522
611
  }
523
612
  }
524
613
  ```
@@ -538,6 +627,7 @@ This script:
538
627
  | `--openclaw` | OpenClaw mode — Enter sets selected model as default in OpenClaw |
539
628
  | `--best` | Show only top-tier models (A+, S, S+) |
540
629
  | `--fiable` | Analyze 10 seconds, output the most reliable model as `provider/model_id` |
630
+ | `--no-telemetry` | Disable anonymous analytics for this run |
541
631
  | `--tier S` | Show only S+ and S tier models |
542
632
  | `--tier A` | Show only A+, A, A- tier models |
543
633
  | `--tier B` | Show only B+, B tier models |
@@ -549,15 +639,15 @@ This script:
549
639
  - **R/Y/O/M/L/A/S/N/H/V/U** — Sort by Rank/Tier/Origin/Model/LatestPing/Avg/SWE/Ctx/Health/Verdict/Uptime
550
640
  - **T** — Cycle tier filter (All → S+ → S → A+ → A → A- → B+ → B → C → All)
551
641
  - **Z** — Cycle mode (OpenCode CLI → OpenCode Desktop → OpenClaw)
552
- - **P** — Open Settings (manage API keys, enable/disable providers)
642
+ - **P** — Open Settings (manage API keys, provider toggles, analytics toggle)
553
643
  - **W** — Decrease ping interval (faster pings)
554
644
  - **X** — Increase ping interval (slower pings)
555
645
  - **Ctrl+C** — Exit
556
646
 
557
647
  **Keyboard shortcuts (Settings screen — `P` key):**
558
- - **↑↓** — Navigate providers
559
- - **Enter** — Edit API key inline (type key, Enter to save, Esc to cancel)
560
- - **Space** — Toggle provider enabled/disabled
648
+ - **↑↓** — Navigate providers and analytics row
649
+ - **Enter** — Edit API key inline, or toggle analytics on analytics row
650
+ - **Space** — Toggle provider enabled/disabled, or toggle analytics on analytics row
561
651
  - **T** — Test current provider's API key (fires a live ping)
562
652
  - **Esc** — Close settings and return to main TUI
563
653
 
@@ -615,6 +705,6 @@ We welcome contributions! Feel free to open issues, submit pull requests, or get
615
705
 
616
706
  For questions or issues, open a [GitHub issue](https://github.com/vava-nessa/free-coding-models/issues).
617
707
 
618
- 💬 Let's talk about the projet on Discord: https://discord.gg/5MbTnDC3Md
708
+ 💬 Let's talk about the project on Discord: https://discord.gg/5MbTnDC3Md
619
709
 
620
710
  > ⚠️ **free-coding-models is a BETA TUI** — it might crash or have problems. Use at your own risk and feel free to report issues!