coder-config 0.53.6-beta → 0.53.7-beta
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/lib/cli.js +12 -8
- package/lib/constants.js +1 -1
- package/package.json +1 -1
package/lib/cli.js
CHANGED
|
@@ -358,9 +358,11 @@ function runCli(manager) {
|
|
|
358
358
|
if (sub === 'status') {
|
|
359
359
|
const status = manager.routerGetStatus();
|
|
360
360
|
console.log(`CCR installed: ${status.installed ? 'yes' : 'no'}`);
|
|
361
|
-
console.log(`
|
|
362
|
-
|
|
363
|
-
if (status.
|
|
361
|
+
console.log(`Config exists: ${status.configExists ? 'yes' : 'no'}`);
|
|
362
|
+
console.log(`Proxy running: ${status.running ? 'yes' : 'no'}`);
|
|
363
|
+
if (!status.installed) {
|
|
364
|
+
console.log('\nInstall: npm install -g claude-code-router');
|
|
365
|
+
}
|
|
364
366
|
} else if (sub === 'list') {
|
|
365
367
|
const providers = manager.routerListProviders();
|
|
366
368
|
if (providers.length === 0) {
|
|
@@ -369,7 +371,7 @@ function runCli(manager) {
|
|
|
369
371
|
console.log('Providers:');
|
|
370
372
|
for (const p of providers) {
|
|
371
373
|
const models = p.models && p.models.length > 0 ? ` (${p.models.join(', ')})` : '';
|
|
372
|
-
console.log(` ${p.name} — ${p.url}${models}`);
|
|
374
|
+
console.log(` ${p.name} — ${p.api_base_url || p.url || '(no url)'}${models}`);
|
|
373
375
|
}
|
|
374
376
|
}
|
|
375
377
|
console.log('');
|
|
@@ -393,15 +395,17 @@ function runCli(manager) {
|
|
|
393
395
|
const urlIdx = args.indexOf('--url');
|
|
394
396
|
const keyIdx = args.indexOf('--key');
|
|
395
397
|
const modelsIdx = args.indexOf('--models');
|
|
396
|
-
const
|
|
397
|
-
const
|
|
398
|
+
const api_base_url = urlIdx !== -1 ? args[urlIdx + 1] : undefined;
|
|
399
|
+
const api_key = keyIdx !== -1 ? args[keyIdx + 1] : undefined;
|
|
398
400
|
const models = modelsIdx !== -1 ? args[modelsIdx + 1].split(',') : undefined;
|
|
399
|
-
if (!
|
|
401
|
+
if (!api_base_url) {
|
|
400
402
|
console.error('--url is required');
|
|
401
403
|
process.exitCode = 1;
|
|
402
404
|
break;
|
|
403
405
|
}
|
|
404
|
-
|
|
406
|
+
const providerConfig = { api_base_url, models };
|
|
407
|
+
if (api_key) providerConfig.api_key = api_key;
|
|
408
|
+
manager.routerAddProvider(name, providerConfig);
|
|
405
409
|
console.log(`Provider '${name}' added.`);
|
|
406
410
|
} else if (sub === 'remove-provider') {
|
|
407
411
|
const name = args[2];
|
package/lib/constants.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "coder-config",
|
|
3
|
-
"version": "0.53.
|
|
3
|
+
"version": "0.53.7-beta",
|
|
4
4
|
"description": "Configuration manager for AI coding tools - Claude Code, Gemini CLI, Codex CLI, Antigravity. Manage MCPs, rules, permissions, memory, and workstreams.",
|
|
5
5
|
"author": "regression.io",
|
|
6
6
|
"main": "config-loader.js",
|