@usezombie/zombiectl 0.3.0 → 0.3.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 +70 -58
- package/package.json +1 -1
- package/src/cli.js +1 -1
- package/test/banner.unit.test.js +20 -20
- package/test/help.test.js +4 -4
package/README.md
CHANGED
|
@@ -1,76 +1,88 @@
|
|
|
1
1
|
# zombiectl
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The official CLI for [UseZombie](https://usezombie.com).
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
-
|
|
8
|
-
- `ZOMBIE_STATE_DIR` overrides the base directory for tests or custom automation
|
|
5
|
+
Manage workspaces, trigger runs, monitor agents, and operate your UseZombie deployment from the terminal.
|
|
6
|
+
|
|
7
|
+
> **Pre-release** — UseZombie is in pre-release. APIs, CLI, and behavior may change without notice before general availability. This package is published under the `next` dist-tag.
|
|
9
8
|
|
|
10
9
|
## Install
|
|
11
10
|
|
|
12
11
|
```bash
|
|
13
|
-
npm install -g @usezombie/zombiectl
|
|
14
|
-
zombiectl --help
|
|
12
|
+
npm install -g @usezombie/zombiectl@next
|
|
15
13
|
```
|
|
16
14
|
|
|
17
|
-
##
|
|
18
|
-
|
|
19
|
-
Common flows (installed binary):
|
|
15
|
+
## Quick start
|
|
20
16
|
|
|
21
17
|
```bash
|
|
18
|
+
# Authenticate with your UseZombie account
|
|
22
19
|
zombiectl login
|
|
20
|
+
|
|
21
|
+
# Add a GitHub repository as a workspace
|
|
23
22
|
zombiectl workspace add https://github.com/org/repo
|
|
23
|
+
|
|
24
|
+
# Sync specs and trigger a run
|
|
24
25
|
zombiectl specs sync
|
|
25
26
|
zombiectl run
|
|
26
|
-
zombiectl run status <run_id>
|
|
27
|
-
zombiectl doctor --json
|
|
28
|
-
```
|
|
29
27
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
zombiectl agent profile <agent-id>
|
|
34
|
-
zombiectl agent improvement-report <agent-id>
|
|
35
|
-
zombiectl agent proposals <agent-id>
|
|
36
|
-
zombiectl agent proposals <agent-id> veto <proposal-id> --reason "operator pause"
|
|
28
|
+
# Check your environment
|
|
29
|
+
zombiectl doctor
|
|
37
30
|
```
|
|
38
31
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
- `--
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
32
|
+
## Features
|
|
33
|
+
|
|
34
|
+
- **Workspaces** — add, switch, and manage GitHub-connected workspaces
|
|
35
|
+
- **Runs** — trigger, list, and cancel agent runs
|
|
36
|
+
- **Specs** — sync and initialize specifications
|
|
37
|
+
- **Agent operations** — view profiles, improvement reports, and proposals
|
|
38
|
+
- **Diagnostics** — `doctor` command validates your environment
|
|
39
|
+
- **JSON output** — `--json` flag for scripts and CI/CD pipelines
|
|
40
|
+
|
|
41
|
+
## Commands
|
|
42
|
+
|
|
43
|
+
| Command | Description |
|
|
44
|
+
|---------|-------------|
|
|
45
|
+
| `login` | Authenticate with UseZombie |
|
|
46
|
+
| `logout` | Clear stored credentials |
|
|
47
|
+
| `workspace add <url>` | Connect a GitHub repository |
|
|
48
|
+
| `specs sync` | Sync specifications from the API |
|
|
49
|
+
| `spec init` | Initialize a new spec |
|
|
50
|
+
| `run` | Trigger a run |
|
|
51
|
+
| `runs list` | List run history |
|
|
52
|
+
| `runs cancel <id>` | Cancel an in-flight run |
|
|
53
|
+
| `agent profile <id>` | View agent profile |
|
|
54
|
+
| `agent improvement-report <id>` | View improvement report |
|
|
55
|
+
| `agent proposals <id>` | List agent proposals |
|
|
56
|
+
| `doctor` | Run environment diagnostics |
|
|
57
|
+
| `doctor --json` | Diagnostics in JSON format |
|
|
58
|
+
|
|
59
|
+
## Global flags
|
|
60
|
+
|
|
61
|
+
| Flag | Description |
|
|
62
|
+
|------|-------------|
|
|
63
|
+
| `--api <url>` | API base URL |
|
|
64
|
+
| `--json` | Machine-readable JSON output |
|
|
65
|
+
| `--no-open` | Do not auto-open browser on login |
|
|
66
|
+
| `--no-input` | Disable interactive prompts |
|
|
67
|
+
| `--version` | Print version and exit |
|
|
68
|
+
| `--help` | Show help text |
|
|
69
|
+
|
|
70
|
+
## Configuration
|
|
71
|
+
|
|
72
|
+
| Item | Path |
|
|
73
|
+
|------|------|
|
|
74
|
+
| Credentials | `~/.config/zombiectl/credentials.json` |
|
|
75
|
+
| Workspaces | `~/.config/zombiectl/workspaces.json` |
|
|
76
|
+
|
|
77
|
+
Override the config directory with `ZOMBIE_STATE_DIR`.
|
|
78
|
+
|
|
79
|
+
## Links
|
|
80
|
+
|
|
81
|
+
- [Documentation](https://docs.usezombie.com)
|
|
82
|
+
- [Website](https://usezombie.com)
|
|
83
|
+
- [GitHub](https://github.com/usezombie/usezombie)
|
|
84
|
+
- [Discord](https://discord.gg/H9hH2nqQjh)
|
|
85
|
+
|
|
86
|
+
## License
|
|
87
|
+
|
|
88
|
+
MIT
|
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -29,7 +29,7 @@ import { suggestCommand } from "./program/suggest.js";
|
|
|
29
29
|
import { requireAuth, AUTH_FAIL_MESSAGE } from "./program/auth-guard.js";
|
|
30
30
|
import { createCoreHandlers } from "./commands/core.js";
|
|
31
31
|
|
|
32
|
-
export const VERSION = "0.3.
|
|
32
|
+
export const VERSION = "0.3.1";
|
|
33
33
|
|
|
34
34
|
export { parseGlobalArgs };
|
|
35
35
|
|
package/test/banner.unit.test.js
CHANGED
|
@@ -257,19 +257,19 @@ describe("printPreReleaseWarning — T7: regression guards", () => {
|
|
|
257
257
|
describe("printBanner — T1: happy path", () => {
|
|
258
258
|
test("color mode writes version to stream", () => {
|
|
259
259
|
const out = makeBufferStream();
|
|
260
|
-
printBanner(out.stream,
|
|
261
|
-
expect(stripAnsi(out.read())).toContain(
|
|
260
|
+
printBanner(out.stream, VERSION, {});
|
|
261
|
+
expect(stripAnsi(out.read())).toContain(`zombiectl v${VERSION}`);
|
|
262
262
|
});
|
|
263
263
|
|
|
264
264
|
test("noColor mode writes plain version line", () => {
|
|
265
265
|
const out = makeBufferStream();
|
|
266
|
-
printBanner(out.stream,
|
|
267
|
-
expect(out.read()).toBe("zombiectl v0.3.
|
|
266
|
+
printBanner(out.stream, VERSION, { noColor: true });
|
|
267
|
+
expect(out.read()).toBe("zombiectl v0.3.1\n");
|
|
268
268
|
});
|
|
269
269
|
|
|
270
270
|
test("jsonMode suppresses all output", () => {
|
|
271
271
|
const out = makeBufferStream();
|
|
272
|
-
printBanner(out.stream,
|
|
272
|
+
printBanner(out.stream, VERSION, { jsonMode: true });
|
|
273
273
|
expect(out.read()).toBe("");
|
|
274
274
|
});
|
|
275
275
|
});
|
|
@@ -289,13 +289,13 @@ describe("printBanner — T2: edge cases", () => {
|
|
|
289
289
|
|
|
290
290
|
test("no opts argument uses defaults (color mode)", () => {
|
|
291
291
|
const out = makeBufferStream();
|
|
292
|
-
printBanner(out.stream, "0.3.
|
|
292
|
+
printBanner(out.stream, "0.3.1");
|
|
293
293
|
expect(out.read().length).toBeGreaterThan(0);
|
|
294
294
|
});
|
|
295
295
|
|
|
296
296
|
test("empty opts uses defaults (color mode)", () => {
|
|
297
297
|
const out = makeBufferStream();
|
|
298
|
-
printBanner(out.stream,
|
|
298
|
+
printBanner(out.stream, VERSION, {});
|
|
299
299
|
expect(out.read().length).toBeGreaterThan(0);
|
|
300
300
|
});
|
|
301
301
|
});
|
|
@@ -303,45 +303,45 @@ describe("printBanner — T2: edge cases", () => {
|
|
|
303
303
|
describe("printBanner — T4: output fidelity", () => {
|
|
304
304
|
test("color mode output contains ANSI escape codes", () => {
|
|
305
305
|
const out = makeBufferStream();
|
|
306
|
-
printBanner(out.stream,
|
|
306
|
+
printBanner(out.stream, VERSION, {});
|
|
307
307
|
expect(out.read()).toMatch(/\x1b\[/);
|
|
308
308
|
});
|
|
309
309
|
|
|
310
310
|
test("color mode output contains box-drawing character", () => {
|
|
311
311
|
const out = makeBufferStream();
|
|
312
|
-
printBanner(out.stream,
|
|
312
|
+
printBanner(out.stream, VERSION, {});
|
|
313
313
|
expect(out.read()).toContain("\u2500"); // ─ horizontal bar
|
|
314
314
|
});
|
|
315
315
|
|
|
316
316
|
test("color mode output contains tagline 'autonomous agent cli'", () => {
|
|
317
317
|
const out = makeBufferStream();
|
|
318
|
-
printBanner(out.stream,
|
|
318
|
+
printBanner(out.stream, VERSION, {});
|
|
319
319
|
expect(stripAnsi(out.read())).toContain("autonomous agent cli");
|
|
320
320
|
});
|
|
321
321
|
|
|
322
322
|
test("noColor mode output contains no ANSI codes", () => {
|
|
323
323
|
const out = makeBufferStream();
|
|
324
|
-
printBanner(out.stream,
|
|
324
|
+
printBanner(out.stream, VERSION, { noColor: true });
|
|
325
325
|
expect(out.read()).not.toMatch(/\x1b\[/);
|
|
326
326
|
});
|
|
327
327
|
|
|
328
328
|
test("noColor mode output is exactly 'zombiectl v{version}\\n'", () => {
|
|
329
329
|
const out = makeBufferStream();
|
|
330
|
-
printBanner(out.stream,
|
|
331
|
-
expect(out.read()).toBe("zombiectl v0.3.
|
|
330
|
+
printBanner(out.stream, VERSION, { noColor: true });
|
|
331
|
+
expect(out.read()).toBe("zombiectl v0.3.1\n");
|
|
332
332
|
});
|
|
333
333
|
});
|
|
334
334
|
|
|
335
335
|
describe("printBanner — T7: regression guards", () => {
|
|
336
336
|
test("noColor plain format pinned — regression guard", () => {
|
|
337
337
|
const out = makeBufferStream();
|
|
338
|
-
printBanner(out.stream,
|
|
339
|
-
expect(out.read()).toBe("zombiectl v0.3.
|
|
338
|
+
printBanner(out.stream, VERSION, { noColor: true });
|
|
339
|
+
expect(out.read()).toBe("zombiectl v0.3.1\n");
|
|
340
340
|
});
|
|
341
341
|
|
|
342
342
|
test("color mode contains zombie emoji 🧟", () => {
|
|
343
343
|
const out = makeBufferStream();
|
|
344
|
-
printBanner(out.stream,
|
|
344
|
+
printBanner(out.stream, VERSION, {});
|
|
345
345
|
expect(out.read()).toContain("\u{1F9DF}");
|
|
346
346
|
});
|
|
347
347
|
});
|
|
@@ -356,8 +356,8 @@ describe("VERSION — T7 + T12: constant matches package.json", () => {
|
|
|
356
356
|
expect(VERSION).toBe(pkg.version);
|
|
357
357
|
});
|
|
358
358
|
|
|
359
|
-
test("VERSION is
|
|
360
|
-
expect(VERSION).
|
|
359
|
+
test("VERSION is a valid semver string", () => {
|
|
360
|
+
expect(VERSION).toMatch(/^\d+\.\d+\.\d+$/);
|
|
361
361
|
});
|
|
362
362
|
});
|
|
363
363
|
|
|
@@ -413,8 +413,8 @@ describe("ttyOnly flag — T6: integration via runCli", () => {
|
|
|
413
413
|
stderr: makeTtyBufferStream().stream,
|
|
414
414
|
env: { NO_COLOR: "1" },
|
|
415
415
|
});
|
|
416
|
-
expect(out1.read()).toContain(
|
|
417
|
-
expect(out2.read()).toContain(
|
|
416
|
+
expect(out1.read()).toContain(`zombiectl v${VERSION}`);
|
|
417
|
+
expect(out2.read()).toContain(`zombiectl v${VERSION}`);
|
|
418
418
|
});
|
|
419
419
|
});
|
|
420
420
|
|
package/test/help.test.js
CHANGED
|
@@ -3,7 +3,7 @@ import fs from "node:fs/promises";
|
|
|
3
3
|
import os from "node:os";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { Writable } from "node:stream";
|
|
6
|
-
import { runCli } from "../src/cli.js";
|
|
6
|
+
import { runCli, VERSION } from "../src/cli.js";
|
|
7
7
|
|
|
8
8
|
function bufferStream() {
|
|
9
9
|
let data = "";
|
|
@@ -245,7 +245,7 @@ describe("version output", () => {
|
|
|
245
245
|
env: { ...process.env },
|
|
246
246
|
});
|
|
247
247
|
expect(code).toBe(0);
|
|
248
|
-
expect(out.read()).toContain(
|
|
248
|
+
expect(out.read()).toContain(`zombiectl v${VERSION}`);
|
|
249
249
|
});
|
|
250
250
|
|
|
251
251
|
test("--version --json suppresses banner", async () => {
|
|
@@ -258,7 +258,7 @@ describe("version output", () => {
|
|
|
258
258
|
});
|
|
259
259
|
expect(code).toBe(0);
|
|
260
260
|
const parsed = JSON.parse(out.read());
|
|
261
|
-
expect(parsed.version).toBe(
|
|
261
|
+
expect(parsed.version).toBe(VERSION);
|
|
262
262
|
});
|
|
263
263
|
|
|
264
264
|
test("--version with NO_COLOR shows plain text", async () => {
|
|
@@ -271,6 +271,6 @@ describe("version output", () => {
|
|
|
271
271
|
});
|
|
272
272
|
expect(code).toBe(0);
|
|
273
273
|
const output = out.read();
|
|
274
|
-
expect(output).toContain(
|
|
274
|
+
expect(output).toContain(`zombiectl v${VERSION}`);
|
|
275
275
|
});
|
|
276
276
|
});
|