free-coding-models 0.1.45 β 0.1.47
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 +2 -2
- package/bin/free-coding-models.js +18 -2
- package/lib/utils.js +10 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<h1 align="center">free-coding-models</h1>
|
|
10
10
|
|
|
11
11
|
<p align="center">
|
|
12
|
-
<strong>Want to contribute or discuss the project?</strong> Join our <a href="https://discord.gg/
|
|
12
|
+
<strong>Want to contribute or discuss the project?</strong> Join our <a href="https://discord.gg/5MbTnDC3Md">Discord community</a>!
|
|
13
13
|
</p>
|
|
14
14
|
|
|
15
15
|
<p align="center">
|
|
@@ -600,4 +600,4 @@ We welcome contributions! Feel free to open issues, submit pull requests, or get
|
|
|
600
600
|
**A:** No β `free-coding-models` configures OpenClaw to use NVIDIA NIM's remote API, so models run on NVIDIA's infrastructure. No GPU or local setup required.
|
|
601
601
|
|
|
602
602
|
## π§ Support
|
|
603
|
-
For questions or issues, open a GitHub issue or join our community Discord: https://discord.gg/
|
|
603
|
+
For questions or issues, open a GitHub issue or join our community Discord: https://discord.gg/5MbTnDC3Md
|
|
@@ -702,7 +702,7 @@ function renderTable(results, pendingPings, frame, cursor = null, sortColumn = '
|
|
|
702
702
|
: chalk.rgb(0, 200, 255)('EnterβOpenCode')
|
|
703
703
|
lines.push(chalk.dim(` ββ Navigate β’ `) + actionHint + chalk.dim(` β’ R/Y/O/M/L/A/S/C/H/V/U Sort β’ Wβ/Xβ Interval (${intervalSec}s) β’ T Filter tier β’ Z Mode β’ `) + chalk.yellow('P') + chalk.dim(` Settings β’ Ctrl+C Exit`))
|
|
704
704
|
lines.push('')
|
|
705
|
-
lines.push(chalk.dim(' Made with ') + 'π & β' + chalk.dim(' by ') + '\x1b]8;;https://github.com/vava-nessa\x1b\\vava-nessa\x1b]8;;\x1b\\' + chalk.dim(' β’ ') + 'π« ' + chalk.cyanBright('\x1b]8;;https://discord.gg/
|
|
705
|
+
lines.push(chalk.dim(' Made with ') + 'π & β' + chalk.dim(' by ') + '\x1b]8;;https://github.com/vava-nessa\x1b\\vava-nessa\x1b]8;;\x1b\\' + chalk.dim(' β’ ') + 'π« ' + chalk.cyanBright('\x1b]8;;https://discord.gg/5MbTnDC3Md\x1b\\Join our Discord!\x1b]8;;\x1b\\') + chalk.dim(' β’ ') + 'β ' + '\x1b]8;;https://github.com/vava-nessa/free-coding-models\x1b\\Read the docs on GitHub\x1b]8;;\x1b\\')
|
|
706
706
|
lines.push('')
|
|
707
707
|
// π Append \x1b[K (erase to EOL) to each line so leftover chars from previous
|
|
708
708
|
// π frames are cleared. Then pad with blank cleared lines to fill the terminal,
|
|
@@ -1217,6 +1217,14 @@ function filterByTierOrExit(results, tierLetter) {
|
|
|
1217
1217
|
}
|
|
1218
1218
|
|
|
1219
1219
|
async function main() {
|
|
1220
|
+
const cliArgs = parseArgs(process.argv)
|
|
1221
|
+
|
|
1222
|
+
// Validate --tier early, before entering alternate screen
|
|
1223
|
+
if (cliArgs.tierFilter && !TIER_LETTER_MAP[cliArgs.tierFilter]) {
|
|
1224
|
+
console.error(chalk.red(` Unknown tier "${cliArgs.tierFilter}". Valid tiers: S, A, B, C`))
|
|
1225
|
+
process.exit(1)
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1220
1228
|
// π Load JSON config (auto-migrates old plain-text ~/.free-coding-models if needed)
|
|
1221
1229
|
const config = loadConfig()
|
|
1222
1230
|
|
|
@@ -1452,6 +1460,14 @@ async function main() {
|
|
|
1452
1460
|
state.settingsTestResults[providerKey] = code === '200' ? 'ok' : 'fail'
|
|
1453
1461
|
}
|
|
1454
1462
|
|
|
1463
|
+
// Apply CLI --tier filter if provided
|
|
1464
|
+
if (cliArgs.tierFilter) {
|
|
1465
|
+
const allowed = TIER_LETTER_MAP[cliArgs.tierFilter]
|
|
1466
|
+
state.results.forEach(r => {
|
|
1467
|
+
r.hidden = !allowed.includes(r.tier)
|
|
1468
|
+
})
|
|
1469
|
+
}
|
|
1470
|
+
|
|
1455
1471
|
// π Setup keyboard input for interactive selection during pings
|
|
1456
1472
|
// π Use readline with keypress event for arrow key handling
|
|
1457
1473
|
process.stdin.setEncoding('utf8')
|
|
@@ -1566,7 +1582,7 @@ async function main() {
|
|
|
1566
1582
|
'l': 'ping', 'a': 'avg', 's': 'swe', 'n': 'ctx', 'h': 'condition', 'v': 'verdict', 'u': 'uptime'
|
|
1567
1583
|
}
|
|
1568
1584
|
|
|
1569
|
-
if (sortKeys[key.name]) {
|
|
1585
|
+
if (sortKeys[key.name] && !key.ctrl) {
|
|
1570
1586
|
const col = sortKeys[key.name]
|
|
1571
1587
|
// π Toggle direction if same column, otherwise reset to asc
|
|
1572
1588
|
if (state.sortColumn === col) {
|
package/lib/utils.js
CHANGED
|
@@ -289,9 +289,17 @@ export function parseArgs(argv) {
|
|
|
289
289
|
let apiKey = null
|
|
290
290
|
const flags = []
|
|
291
291
|
|
|
292
|
-
|
|
292
|
+
// Determine which arg index is consumed by --tier so we skip it
|
|
293
|
+
const tierIdx = args.findIndex(a => a.toLowerCase() === '--tier')
|
|
294
|
+
const tierValueIdx = (tierIdx !== -1 && args[tierIdx + 1] && !args[tierIdx + 1].startsWith('--'))
|
|
295
|
+
? tierIdx + 1
|
|
296
|
+
: -1
|
|
297
|
+
|
|
298
|
+
for (const [i, arg] of args.entries()) {
|
|
293
299
|
if (arg.startsWith('--')) {
|
|
294
300
|
flags.push(arg.toLowerCase())
|
|
301
|
+
} else if (i === tierValueIdx) {
|
|
302
|
+
// Skip -- this is the --tier value, not an API key
|
|
295
303
|
} else if (!apiKey) {
|
|
296
304
|
apiKey = arg
|
|
297
305
|
}
|
|
@@ -303,13 +311,7 @@ export function parseArgs(argv) {
|
|
|
303
311
|
const openCodeDesktopMode = flags.includes('--opencode-desktop')
|
|
304
312
|
const openClawMode = flags.includes('--openclaw')
|
|
305
313
|
|
|
306
|
-
|
|
307
|
-
// π If the next arg is another flag (--), treat it as missing value β tierFilter stays null
|
|
308
|
-
let tierFilter = null
|
|
309
|
-
const tierIdx = args.findIndex(a => a.toLowerCase() === '--tier')
|
|
310
|
-
if (tierIdx !== -1 && args[tierIdx + 1] && !args[tierIdx + 1].startsWith('--')) {
|
|
311
|
-
tierFilter = args[tierIdx + 1].toUpperCase()
|
|
312
|
-
}
|
|
314
|
+
let tierFilter = tierValueIdx !== -1 ? args[tierValueIdx].toUpperCase() : null
|
|
313
315
|
|
|
314
316
|
return { apiKey, bestMode, fiableMode, openCodeMode, openCodeDesktopMode, openClawMode, tierFilter }
|
|
315
317
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "free-coding-models",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.47",
|
|
4
4
|
"description": "Find the fastest coding LLM models in seconds β ping free models from multiple providers, pick the best one for OpenCode, Cursor, or any AI coding assistant.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"nvidia",
|