@winding-labs/zest 0.1.0 → 0.2.1

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
@@ -1,18 +1,18 @@
1
1
  # Zest CLI
2
2
 
3
- Measure your AI coding sessions with [Zest](https://meetzest.com). One command installs the Zest CLI, signs you in, and collects new Claude Code and Codex sessions in the background:
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):
4
4
 
5
5
  ```sh
6
6
  npx @winding-labs/zest
7
7
  ```
8
8
 
9
- 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. The collector starts with each Claude Code and Codex session and stops after the last one closes; `zest start` keeps it running until `zest stop`.
9
+ 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. The CLI's own collector runs only for a tool moved to it with `zest enable` (an opt-in still in testing): it starts with that tool's sessions and stops after the last one closes.
10
10
 
11
11
  - `zest status` — sign-in, collector and per-tool state
12
12
  - `zest update` — update now (the CLI also updates itself; set `ZEST_NO_AUTO_UPDATE=1` to turn that off)
13
13
  - `zest pause` / `zest resume` — stop or restart uploads
14
14
  - `npx @winding-labs/zest --uninstall` — stop collecting and remove the hooks, shims and the binary
15
15
 
16
- If a tool already has the Zest plugin, the installer uploads what the plugin still holds and turns it off, so sessions are never collected twice. Only sessions started after setup are collected.
16
+ Each plugin signs in once inside its tool; the installer prints the command. `zest enable <tool> --replace-plugin` moves a tool to the CLI instead: it uploads what the plugin still holds and turns it off, so sessions are never collected twice. Only sessions started after setup are collected.
17
17
 
18
18
  Binaries for each release are attached to this repository's [releases](https://github.com/Winding-Labs/zest-cli/releases).
package/bin/zest.js CHANGED
@@ -34,7 +34,7 @@ import {
34
34
  writeFileSync
35
35
  } from "node:fs";
36
36
  import { homedir } from "node:os";
37
- import { dirname, join, resolve, sep } from "node:path";
37
+ import { dirname, join, resolve, sep, win32 } from "node:path";
38
38
  import { pipeline } from "node:stream/promises";
39
39
  import { createGunzip } from "node:zlib";
40
40
  function getCacheBase(namespace) {
@@ -59,6 +59,9 @@ function getPlatformKey() {
59
59
  function getBinaryName(prefix, platform) {
60
60
  return platform === "win-x64" ? `${prefix}win-x64.exe` : `${prefix}${platform}`;
61
61
  }
62
+ function zipTar(platform = process.platform, systemRoot = process.env.SystemRoot) {
63
+ return platform === "win32" ? win32.join(systemRoot ?? "C:\\Windows", "System32", "tar.exe") : "tar";
64
+ }
62
65
  function extractZipToFile(zipPath, destPath) {
63
66
  const unzip = spawnSync("unzip", ["-p", zipPath], {
64
67
  encoding: "buffer",
@@ -68,7 +71,7 @@ function extractZipToFile(zipPath, destPath) {
68
71
  writeFileSync(destPath, unzip.stdout);
69
72
  return;
70
73
  }
71
- const tar = spawnSync("tar", ["-xOf", zipPath], {
74
+ const tar = spawnSync(zipTar(), ["-xOf", zipPath], {
72
75
  encoding: "buffer",
73
76
  maxBuffer: 256 * 1024 * 1024
74
77
  });
@@ -195,8 +198,8 @@ var addToUserPath = (dir, first = false) => editUserPath(dir, true, first);
195
198
 
196
199
  // src/bootstrap.ts
197
200
  var REPO = "Winding-Labs/zest-cli";
198
- var VERSION = "0.1.0";
199
- var ASSETS = JSON.parse('{"darwin-arm64":{"file":"zest-darwin-arm64.gz","sha256":"d1634c3406263b227821b55cb03331022dbf8ec45c45346126134f0a173be084"},"darwin-x64":{"file":"zest-darwin-x64.gz","sha256":"885d97f23f61b60c79feeda449a541e77ee24ece3d2faf5f2aafea943d8826ca"},"linux-arm64":{"file":"zest-linux-arm64.gz","sha256":"64cb6eeafd7e97565588e1759a49fa23dcc2a1adbb7871b2b8c484d547165797"},"linux-x64":{"file":"zest-linux-x64.gz","sha256":"6be401efabb3913a6e4e4867eaa3754cbe56e7ef800ebe162b8f2215626dbe8c"},"win-x64":{"file":"zest-win-x64.exe.zip","sha256":"9c62d478114cbb56ffe2eac1978d34093bb447d92715459e3ebd1b8ddfb12c6b"}}');
201
+ var VERSION = "0.2.1";
202
+ var ASSETS = JSON.parse('{"darwin-arm64":{"file":"zest-darwin-arm64.gz","sha256":"9aa92d108655dc41bfe41f3da421098523dd54338294dc57fdf5bc65d304f0e7"},"darwin-x64":{"file":"zest-darwin-x64.gz","sha256":"96ac36d3fe75a7d6af98fb84572f9d2c7fe0221b272896d630ddda9e7e2ced35"},"linux-arm64":{"file":"zest-linux-arm64.gz","sha256":"6042e0dbaadacc8b5eb465f44f32b8c5741500eec0d19709cfa883089902fe0e"},"linux-x64":{"file":"zest-linux-x64.gz","sha256":"9f551337633c68a283e3382d6b7384c7c4c13b0e1015a5644f4970f87c8f79a6"},"win-x64":{"file":"zest-win-x64.exe.zip","sha256":"07c0a2e10f5631b66a3422bda827307061779c40376dbe21098a38429fa4dffb"}}');
200
203
  function linkOnPath(target) {
201
204
  const dir = join3(homedir2(), ".local", "bin");
202
205
  const link = join3(dir, "zest");
@@ -253,7 +256,8 @@ function removeOldExecutables(dir) {
253
256
  }
254
257
  async function main() {
255
258
  const stable = join3(homedir2(), ".zest", "bin", windows ? "zest.exe" : "zest");
256
- const args = ["install", ...process.argv.slice(2)];
259
+ const given = process.argv.slice(2);
260
+ const args = ["install", ...given[0] === "install" ? given.slice(1) : given];
257
261
  if (args.includes("--uninstall")) {
258
262
  if (existsSync2(stable))
259
263
  return spawnSync3(stable, args, { stdio: "inherit" }).status ?? 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@winding-labs/zest",
3
- "version": "0.1.0",
3
+ "version": "0.2.1",
4
4
  "description": "Measure your AI coding sessions with Zest",
5
5
  "type": "module",
6
6
  "bin": {