@winding-labs/zest 0.3.1 → 2.1.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 (3) hide show
  1. package/README.md +4 -3
  2. package/bin/zest.js +23 -18
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Zest CLI
2
2
 
3
- Measure your AI coding sessions with [Zest](https://meetzest.com). One command installs the Zest plugin of each AI coding tool you pick (Claude Code, Codex, Grok Build, Hermes, opencode, Freebuff):
3
+ Measure your AI coding sessions with [Zest](https://meetzest.com/?utm_source=npmjs.com&utm_medium=referral&utm_campaign=npm-readme), a usage tracker and dashboard for Claude Code, Codex and the other coding agents your team runs. One command installs the Zest plugin of each AI coding tool you pick (Claude Code, Codex, Grok Build, Hermes, opencode, Freebuff):
4
4
 
5
5
  ```sh
6
6
  npx @winding-labs/zest
@@ -13,10 +13,11 @@ In a terminal it runs as a short guided setup: pick your tools (the ones found o
13
13
 
14
14
  It works on macOS, Linux and Windows (x64) and needs Node.js 18 or newer for the installer only. The CLI itself is a standalone binary in `~/.zest/bin/zest` (`%USERPROFILE%\.zest\bin\zest.exe` on Windows, added to your user PATH — open a new terminal afterwards), verified against SHA256 checksums shipped in the npm package.
15
15
 
16
- Each plugin signs in once inside its tool; the installer prints the command. Only sessions started after setup are collected.
16
+ Then it opens your browser with a sign-in code filled in: one Approve signs in every plugin it installed. Without a terminal it prints `zest login` instead, which does the same. Only sessions started after setup are collected.
17
17
 
18
18
  - `zest status` — your Zest plugins per tool: sign-in, sync, last sync and errors; `--watch` keeps it live, `--json` prints it as JSON
19
- - `zest update` — install the latest release
19
+ - `zest login` — sign in once, for the CLI and every installed plugin that is not signed in yet
20
+ - `zest update` — install the newest release
20
21
  - `zest pause` / `zest resume` — stop or restart uploads
21
22
  - `zest logout` — sign this device out, also on the Zest server; the web app, your plugins and other devices stay signed in
22
23
  - `npx @winding-labs/zest --uninstall` — stop collecting, remove the hooks, shims and the binary and sign out; the Zest plugins stay installed (it offers to turn back on any plugin the CLI replaced)
package/bin/zest.js CHANGED
@@ -34,11 +34,20 @@ import {
34
34
  writeFileSync
35
35
  } from "node:fs";
36
36
  import { homedir } from "node:os";
37
- import { dirname, join, resolve, sep, win32 } from "node:path";
37
+ import { dirname, join as join2, resolve, sep, win32 } from "node:path";
38
38
  import { pipeline } from "node:stream/promises";
39
39
  import { createGunzip } from "node:zlib";
40
+
41
+ // ../../packages/plugin-common/src/utils/processes.ts
42
+ import { join } from "node:path";
43
+ function windowsSystemBinary(...parts) {
44
+ return join(process.env.SystemRoot || "C:\\Windows", "System32", ...parts);
45
+ }
46
+ var windowsPowerShell = () => windowsSystemBinary("WindowsPowerShell", "v1.0", "powershell.exe");
47
+
48
+ // ../../packages/plugin-common/release/prefetch.ts
40
49
  function getCacheBase(namespace) {
41
- return join(homedir(), ".zest", "bin", namespace);
50
+ return join2(homedir(), ".zest", "bin", namespace);
42
51
  }
43
52
  var DOWNLOAD_TIMEOUT_MS = 5 * 60000;
44
53
  function getPlatformKey() {
@@ -84,8 +93,8 @@ function extractZipToFile(zipPath, destPath) {
84
93
  }
85
94
  async function downloadAndVerify(url, expectedSha, destDir, binName, fetchFn = fetch, userAgent = "zest-daemon") {
86
95
  mkdirSync(destDir, { recursive: true });
87
- const tempDl = join(destDir, `.download.${process.pid}`);
88
- const tempBin = join(destDir, `.bin.${process.pid}`);
96
+ const tempDl = join2(destDir, `.download.${process.pid}`);
97
+ const tempBin = join2(destDir, `.bin.${process.pid}`);
89
98
  try {
90
99
  const controller = new AbortController;
91
100
  const timer = setTimeout(() => controller.abort(), DOWNLOAD_TIMEOUT_MS);
@@ -116,7 +125,7 @@ async function downloadAndVerify(url, expectedSha, destDir, binName, fetchFn = f
116
125
  rmSync(tempBin, { force: true });
117
126
  throw new Error(`SHA256 mismatch: expected ${expectedSha}, got ${actual}`);
118
127
  }
119
- const finalPath = join(destDir, binName);
128
+ const finalPath = join2(destDir, binName);
120
129
  renameSync(tempBin, finalPath);
121
130
  chmodSync(finalPath, 493);
122
131
  } catch (err) {
@@ -135,8 +144,8 @@ function gc(cacheBase, pinnedVersion, prefetchedVersion, currentVersion, logFn)
135
144
  continue;
136
145
  if (keep.has(entry.name))
137
146
  continue;
138
- const versionDir = join(cacheBase, entry.name);
139
- if (existsSync(join(versionDir, ".download-lock")))
147
+ const versionDir = join2(cacheBase, entry.name);
148
+ if (existsSync(join2(versionDir, ".download-lock")))
140
149
  continue;
141
150
  rmSync(versionDir, { recursive: true, force: true });
142
151
  }
@@ -145,14 +154,7 @@ function gc(cacheBase, pinnedVersion, prefetchedVersion, currentVersion, logFn)
145
154
  }
146
155
  }
147
156
 
148
- // ../../packages/plugin-common/src/utils/processes.ts
149
- import { join as join2 } from "node:path";
150
- function windowsSystemBinary(...parts) {
151
- return join2(process.env.SystemRoot || "C:\\Windows", "System32", ...parts);
152
- }
153
- var windowsPowerShell = () => windowsSystemBinary("WindowsPowerShell", "v1.0", "powershell.exe");
154
-
155
- // ../../packages/plugin-common/src/utils/spawn-hidden.ts
157
+ // ../../packages/plugin-common/src/utils/hidden-launcher.ts
156
158
  var HIDDEN_LAUNCHER_FILENAME = "launch-hidden.vbs";
157
159
  var HIDDEN_LAUNCHER_VBS = [
158
160
  "' Launch a program hidden and detached (no console flash). Args: <exe> [args...]",
@@ -167,7 +169,6 @@ var HIDDEN_LAUNCHER_VBS = [
167
169
  ""
168
170
  ].join(`\r
169
171
  `);
170
-
171
172
  // src/platform/windows-path.ts
172
173
  import { spawnSync as spawnSync2 } from "node:child_process";
173
174
  function userPathScript(add, first = false) {
@@ -198,8 +199,8 @@ var addToUserPath = (dir, first = false) => editUserPath(dir, true, first);
198
199
 
199
200
  // src/bootstrap.ts
200
201
  var REPO = "Winding-Labs/zest-cli";
201
- var VERSION = "0.3.1";
202
- var ASSETS = JSON.parse('{"darwin-arm64":{"file":"zest-darwin-arm64.gz","sha256":"f4864fea3346d7a5359d3940ce789737af380908c1e86c0964e83e946499642d"},"darwin-x64":{"file":"zest-darwin-x64.gz","sha256":"778f4eb57a5b0f80573f07bfadf7a21ceda8bc6d80f16ceb6f3215f488633364"},"linux-arm64":{"file":"zest-linux-arm64.gz","sha256":"bbe889f4fd2e5dc90fb02eb2ca35baa1b53d999bc91efcb42c3305fe0946ba6c"},"linux-x64":{"file":"zest-linux-x64.gz","sha256":"02b2752953359cfe215d1cf341b49de12ef51cd2ca52b5b7908b5dde65f1381d"},"win-x64":{"file":"zest-win-x64.exe.zip","sha256":"971f78fe04fd51c5aaa4c8b21183669abbddf1c4d94edaab043adc9a101ab2aa"}}');
202
+ var VERSION = "2.1.0";
203
+ var ASSETS = JSON.parse('{"darwin-arm64":{"file":"zest-darwin-arm64.gz","sha256":"d0b7c3b50e72f10911c421141e4bf9af58df9760fcff57227af1bb008a9cebb1"},"darwin-x64":{"file":"zest-darwin-x64.gz","sha256":"6a2a26f8742b3e5469fed0009edc412112bd8724163710d43084a919f9bc68d9"},"linux-arm64":{"file":"zest-linux-arm64.gz","sha256":"d87a5ce5f612247e8cd15a03eb2ea5a94ba2c6b03cd0fc340a8e77e0d0d1a73d"},"linux-x64":{"file":"zest-linux-x64.gz","sha256":"b547e54f7e76d7c6850af42b48a27c07cc47d4d600dda64ca21d69df452328e0"},"win-x64":{"file":"zest-win-x64.exe.zip","sha256":"15214b5f982fbca7a6a652546e6984de47caab33cf7e8206ab0240beac979ca1"}}');
203
204
  function linkOnPath(target) {
204
205
  const dir = join3(homedir2(), ".local", "bin");
205
206
  const link = join3(dir, "zest");
@@ -257,6 +258,10 @@ function removeOldExecutables(dir) {
257
258
  async function main() {
258
259
  const stable = join3(homedir2(), ".zest", "bin", windows ? "zest.exe" : "zest");
259
260
  const given = process.argv.slice(2);
261
+ if (given.length === 1 && given[0] === "--version") {
262
+ console.log(VERSION);
263
+ return 0;
264
+ }
260
265
  const args = ["install", ...given[0] === "install" ? given.slice(1) : given];
261
266
  if (args.includes("--uninstall")) {
262
267
  if (existsSync2(stable))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@winding-labs/zest",
3
- "version": "0.3.1",
3
+ "version": "2.1.0",
4
4
  "description": "Measure your AI coding sessions with Zest",
5
5
  "type": "module",
6
6
  "bin": {