@vox-ai/cli 0.1.0-beta.8 → 0.1.0-beta.9

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 (3) hide show
  1. package/README.md +21 -2
  2. package/bin/vox.cjs +79 -48
  3. package/package.json +5 -5
package/README.md CHANGED
@@ -109,14 +109,33 @@ Development and local builds never emit telemetry.
109
109
 
110
110
  ## Upgrade
111
111
 
112
- `vox upgrade` checks for a newer release and prints the upgrade command for how you installed it it does not modify your installation itself. Run the printed command (or one of the below) to actually update:
112
+ `vox upgrade` is a package-manager aware upgrade assistant: it detects how vox was installed (npm, Homebrew, standalone, or unknown) and prints the exact upgrade command for that install. It never modifies your installation itself run the printed command to update.
113
113
 
114
114
  ```bash
115
- vox upgrade # check for a newer version and print the upgrade command
115
+ vox upgrade # detect the install and print the exact upgrade command
116
+ vox upgrade --channel beta # check the beta channel
117
+ vox upgrade --json # structured output for scripts / coding agents
116
118
  npm install -g @vox-ai/cli@latest # update an npm install
117
119
  brew upgrade vox-public/tap/vox # update a Homebrew install
118
120
  ```
119
121
 
122
+ For Homebrew, `vox upgrade` distinguishes the newest upstream release from what the formula currently offers, so it won't tell you to `brew upgrade` before the formula has caught up. `vox upgrade --json` (schema `vox.ai.cli.upgrade.v2`) returns `status`, `confidence`, `actions`, and `verify_commands` so a coding agent can pick the next command without parsing human text.
123
+
124
+ ### Update notices
125
+
126
+ vox occasionally checks — at most once a day, when you run a command — whether a newer version is published, and caches the result locally (no daemon, no background process). When an update exists, it prints a single line to stderr on your next interactive run:
127
+
128
+ ```text
129
+ A newer vox.ai CLI is available: 0.1.0-beta.9
130
+ Run `vox upgrade` for the exact upgrade command.
131
+ ```
132
+
133
+ The check only queries the public npm registry — it is not telemetry and sends no account, organization, or auth information. It stays silent for `--json`, non-interactive shells, and CI, and never changes a command's exit code. **Homebrew installs are not nudged by this periodic notice** (npm alone cannot tell whether the formula has published the new version yet) — run `vox upgrade` or `brew outdated` for accurate Homebrew guidance. Turn it off with:
134
+
135
+ ```bash
136
+ VOX_NO_UPDATE_NOTIFIER=1 vox …
137
+ ```
138
+
120
139
  ### macOS code signing
121
140
 
122
141
  Official macOS binaries are signed with the company Developer ID Application identity, with a stable signing identity across builds:
package/bin/vox.cjs CHANGED
@@ -12,63 +12,94 @@ const platformPackages = {
12
12
  "win32-x64": "@vox-ai/cli-win32-x64",
13
13
  };
14
14
 
15
- const artifact = `${process.platform}-${process.arch}`;
16
- const packageName = platformPackages[artifact];
17
-
18
- if (!packageName) {
19
- console.error(
20
- [
21
- `vox CLI does not ship a prebuilt npm binary for ${artifact}.`,
22
- "Supported platforms: macOS (arm64/x64), Linux x64, and Windows x64. On macOS you can also use the Homebrew formula.",
23
- ].join("\n"),
24
- );
25
- process.exit(1);
15
+ // Build the environment handed to the spawned platform binary. Injecting the
16
+ // install source lets `vox upgrade` report `install_source: "npm"` with high
17
+ // confidence even though the real executable lives under a platform package
18
+ // (@vox-ai/cli-<artifact>/bin/vox[.exe]). Pre-set values win so a parent
19
+ // wrapper / user override is respected.
20
+ function buildSpawnEnv(baseEnv, options) {
21
+ return {
22
+ ...baseEnv,
23
+ VOX_INSTALL_SOURCE: baseEnv.VOX_INSTALL_SOURCE || "npm",
24
+ VOX_EXECUTABLE_PATH: baseEnv.VOX_EXECUTABLE_PATH || options.scriptPath,
25
+ VOX_PLATFORM_PACKAGE: baseEnv.VOX_PLATFORM_PACKAGE || options.packageName,
26
+ VOX_PLATFORM_ARTIFACT: baseEnv.VOX_PLATFORM_ARTIFACT || options.artifact,
27
+ };
26
28
  }
27
29
 
28
- // Bun compiles the Windows binary as `vox.exe`; every other platform ships an
29
- // extension-less `vox`.
30
- const binaryName = process.platform === "win32" ? "vox.exe" : "vox";
31
- let binaryPath;
32
-
33
- try {
34
- binaryPath = join(dirname(require.resolve(`${packageName}/package.json`)), "bin", binaryName);
35
- } catch (error) {
36
- console.error(
37
- [
38
- `The platform package ${packageName} is missing.`,
39
- "Reinstall @vox-ai/cli without omitting optional dependencies.",
40
- "",
41
- summarizeError(error),
42
- ].filter(Boolean).join("\n"),
43
- );
44
- process.exit(1);
30
+ function summarizeError(error) {
31
+ return error && typeof error.message === "string" ? error.message : String(error);
45
32
  }
46
33
 
47
- try {
48
- chmodSync(binaryPath, 0o755);
49
- } catch {
50
- // Best-effort for tarballs that did not preserve executable mode.
51
- }
34
+ function main() {
35
+ const artifact = `${process.platform}-${process.arch}`;
36
+ const packageName = platformPackages[artifact];
37
+
38
+ if (!packageName) {
39
+ console.error(
40
+ [
41
+ `vox CLI does not ship a prebuilt npm binary for ${artifact}.`,
42
+ "Supported platforms: macOS (arm64/x64), Linux x64, and Windows x64. On macOS you can also use the Homebrew formula.",
43
+ ].join("\n"),
44
+ );
45
+ process.exit(1);
46
+ }
52
47
 
53
- const child = spawn(binaryPath, process.argv.slice(2), {
54
- stdio: "inherit",
55
- });
48
+ // Bun compiles the Windows binary as `vox.exe`; every other platform ships an
49
+ // extension-less `vox`.
50
+ const binaryName = process.platform === "win32" ? "vox.exe" : "vox";
51
+ let binaryPath;
56
52
 
57
- child.on("error", (error) => {
58
- console.error(`Failed to start vox binary at ${binaryPath}: ${error.message}`);
59
- process.exit(1);
60
- });
53
+ try {
54
+ binaryPath = join(dirname(require.resolve(`${packageName}/package.json`)), "bin", binaryName);
55
+ } catch (error) {
56
+ console.error(
57
+ [
58
+ `The platform package ${packageName} is missing.`,
59
+ "Reinstall @vox-ai/cli without omitting optional dependencies.",
60
+ "",
61
+ summarizeError(error),
62
+ ]
63
+ .filter(Boolean)
64
+ .join("\n"),
65
+ );
66
+ process.exit(1);
67
+ }
61
68
 
62
- child.on("exit", (code, signal) => {
63
- if (signal) {
64
- process.kill(process.pid, signal);
65
- return;
69
+ try {
70
+ chmodSync(binaryPath, 0o755);
71
+ } catch {
72
+ // Best-effort for tarballs that did not preserve executable mode.
66
73
  }
67
74
 
68
- process.exit(code ?? 1);
69
- });
75
+ const child = spawn(binaryPath, process.argv.slice(2), {
76
+ stdio: "inherit",
77
+ env: buildSpawnEnv(process.env, {
78
+ packageName,
79
+ artifact,
80
+ scriptPath: process.argv[1],
81
+ }),
82
+ });
70
83
 
71
- function summarizeError(error) {
72
- return error && typeof error.message === "string" ? error.message : String(error);
84
+ child.on("error", (error) => {
85
+ console.error(`Failed to start vox binary at ${binaryPath}: ${error.message}`);
86
+ process.exit(1);
87
+ });
88
+
89
+ child.on("exit", (code, signal) => {
90
+ if (signal) {
91
+ process.kill(process.pid, signal);
92
+ return;
93
+ }
94
+
95
+ process.exit(code ?? 1);
96
+ });
73
97
  }
74
98
 
99
+ module.exports = { buildSpawnEnv, platformPackages };
100
+
101
+ // Only launch when executed as the bin entry (`vox`), not when imported by a
102
+ // unit test.
103
+ if (require.main === module) {
104
+ main();
105
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vox-ai/cli",
3
- "version": "0.1.0-beta.8",
3
+ "version": "0.1.0-beta.9",
4
4
  "description": "vox.ai command-line workflow tools",
5
5
  "homepage": "https://www.tryvox.co",
6
6
  "license": "MIT",
@@ -13,10 +13,10 @@
13
13
  "LICENSE"
14
14
  ],
15
15
  "optionalDependencies": {
16
- "@vox-ai/cli-darwin-arm64": "0.1.0-beta.8",
17
- "@vox-ai/cli-darwin-x64": "0.1.0-beta.8",
18
- "@vox-ai/cli-linux-x64": "0.1.0-beta.8",
19
- "@vox-ai/cli-win32-x64": "0.1.0-beta.8"
16
+ "@vox-ai/cli-darwin-arm64": "0.1.0-beta.9",
17
+ "@vox-ai/cli-darwin-x64": "0.1.0-beta.9",
18
+ "@vox-ai/cli-linux-x64": "0.1.0-beta.9",
19
+ "@vox-ai/cli-win32-x64": "0.1.0-beta.9"
20
20
  },
21
21
  "engines": {
22
22
  "node": ">=20.17.0"