subconscious-cli 4.0.10 → 4.0.11

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
@@ -40,6 +40,13 @@ leaving the TUI.
40
40
  `subc help` and `subc --help` continue to print script-friendly command help.
41
41
  Non-interactive `subc` also prints regular help.
42
42
 
43
+ Print the installed CLI version without performing an update or gateway check:
44
+
45
+ ```bash
46
+ subc --version
47
+ subc -v
48
+ ```
49
+
43
50
  Every command accepts `help` as a subcommand. These only read the selected
44
51
  profile; they do not authenticate, install, configure, or launch anything:
45
52
 
package/bin/cli.js CHANGED
@@ -226,13 +226,22 @@ function requireNamedProfile(profile) {
226
226
  }
227
227
 
228
228
  async function main() {
229
- const update = await showUpdateNotice();
230
- if (update?.action === 'updated' || update?.action === 'cancel') return;
231
-
232
229
  let parsed = extractProfile(process.argv.slice(2));
233
230
  let { args, profileName, profileExplicit } = parsed;
234
231
  let command = args[0];
235
232
 
233
+ // Version output must be fast and reliable even when npm or the gateway is
234
+ // unavailable, so handle it before the automatic update check.
235
+ if (command === '--version' || command === '-v') {
236
+ const pkgPath = new URL('../package.json', import.meta.url);
237
+ const pkg = JSON.parse(await fs.readFile(pkgPath, 'utf-8'));
238
+ console.log(pkg.version);
239
+ return;
240
+ }
241
+
242
+ const update = await showUpdateNotice();
243
+ if (update?.action === 'updated' || update?.action === 'cancel') return;
244
+
236
245
  if (!command && process.stdin.isTTY === true && process.stdout.isTTY === true && process.env.TERM !== 'dumb') {
237
246
  const selection = await runTui({ profileName });
238
247
  if (!selection?.args?.length) return;
@@ -261,13 +270,6 @@ async function main() {
261
270
  return;
262
271
  }
263
272
 
264
- if (command === '--version' || command === '-v') {
265
- const pkgPath = new URL('../package.json', import.meta.url);
266
- const pkg = JSON.parse(await fs.readFile(pkgPath, 'utf-8'));
267
- console.log(pkg.version);
268
- return;
269
- }
270
-
271
273
  if (command === 'setup') {
272
274
  printRetiredSetup(args.slice(1));
273
275
  process.exitCode = 1;
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "subconscious-cli",
3
- "version": "4.0.10",
3
+ "version": "4.0.11",
4
4
  "description": "CLI for Subconscious — run Claude Code, Codex, OpenCode, DeepSeek Harness, Cursor, Copilot, and Pi",
5
5
  "bin": {
6
6
  "subc": "bin/cli.js"
@@ -10,7 +10,8 @@
10
10
  "build:tui:host": "node scripts/build-tui.js --host",
11
11
  "test": "node --test",
12
12
  "test:tui": "go -C tui test ./...",
13
- "prepack": "npm run build:tui"
13
+ "prepack": "npm run build:tui",
14
+ "prepublishOnly": "node scripts/require-publish-script.js"
14
15
  },
15
16
  "files": [
16
17
  "bin"