@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 +3 -3
- package/bin/zest.js +9 -5
- package/package.json +1 -1
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
|
|
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
|
|
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
|
-
|
|
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(
|
|
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
|
|
199
|
-
var ASSETS = JSON.parse('{"darwin-arm64":{"file":"zest-darwin-arm64.gz","sha256":"
|
|
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
|
|
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;
|