@nexus-cortex/cli 4.31.0 → 4.32.0

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 (2) hide show
  1. package/bin/cortex.js +14 -0
  2. package/package.json +2 -2
package/bin/cortex.js CHANGED
@@ -154,6 +154,19 @@ if (args.includes('--update')) {
154
154
  process.exit(res.status || 1);
155
155
  }
156
156
 
157
+ // `cortex --uninstall` — remove the global install. Config/keys at ~/.cortex are LEFT
158
+ // in place (so you don't lose your API key by accident); the message says how to remove them.
159
+ if (args.includes('--uninstall')) {
160
+ process.stdout.write('Uninstalling nexus-cortex…\n\n');
161
+ const res = spawnSync('npm', ['uninstall', '-g', 'nexus-cortex'], { stdio: 'inherit' });
162
+ if (res.status === 0) {
163
+ process.stdout.write('\n✓ Uninstalled. Your config and API key remain at ~/.cortex — to remove those too:\n rm -rf ~/.cortex\n');
164
+ process.exit(0);
165
+ }
166
+ process.stderr.write('\nUninstall failed — see the npm output above. If it is a permissions error, try:\n sudo npm uninstall -g nexus-cortex\n');
167
+ process.exit(res.status || 1);
168
+ }
169
+
157
170
  // Update-available notice (skip for machine-readable / quiet output).
158
171
  if (!args.includes('--json') && !args.includes('--quiet') && !args.includes('-q')) {
159
172
  notifyUpdateAvailable();
@@ -371,6 +384,7 @@ FLAGS:
371
384
  --cwd DIR (agent) Run in DIR — the agent's file tools operate there
372
385
  --update Update nexus-cortex to the latest version (npm i -g)
373
386
  (a notice appears when you're behind; CORTEX_NO_UPDATE_NOTICE=true to silence)
387
+ --uninstall Remove the global nexus-cortex install (keeps ~/.cortex config)
374
388
  --shutdown Stop the running server and exit
375
389
  --tmux List active tmux sessions with dashboard URLs
376
390
  --stats Show current session statistics
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nexus-cortex/cli",
3
- "version": "4.31.0",
3
+ "version": "4.32.0",
4
4
  "description": "Nexus Cortex CLI - Terminal interface for multi-provider LLM orchestration",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -19,7 +19,7 @@
19
19
  "prepack": "node ../../scripts/copy-pkg-cortex-scaffold.mjs"
20
20
  },
21
21
  "dependencies": {
22
- "@nexus-cortex/core": "^4.31.0",
22
+ "@nexus-cortex/core": "^4.32.0",
23
23
  "chalk": "^4.1.2",
24
24
  "cli-spinners": "^2.9.0",
25
25
  "commander": "^11.0.0",