@hlix/cli 0.7.2 → 1.0.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.
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ var s="@hlix/cli",e="1.0.0",n="SEE LICENSE IN LICENSE",a="Hlix Code and the hlix control-plane CLI.",r=["hlix","cli","agents"],l="https://hlix.ai",c="module",p="./dist/index.js",o={hlix:"./bin/hlix"},b=["bin","install.cjs","dist","skills","LICENSE","THIRD_PARTY_NOTICES"],u={node:">=22.19.0"},d={access:"public"},h={build:"rm -rf dist && bun build src/index.ts --outdir dist --target node --format esm --splitting --packages external --minify --banner '#!/usr/bin/env node'",test:'bun test src --path-ignore-patterns "**/*.integration.test.ts" --timeout 20000',typecheck:"tsc --noEmit",prepublishOnly:"bun run typecheck && bun run build && bun run test","test:integration":"NODE_ENV=test bun run ../../apps/backend/scripts/with-aimock.ts -- bun run ../../apps/backend/scripts/with-test-db.ts -- bun test --isolate --preload ../../apps/backend/test/helpers/pool-lifecycle.ts --timeout 60000 .integration.test.ts","build:binary":"bun run scripts/build-binary.ts","test:binary":"bun run build:binary && HLIX_TEST_BINARY=dist-native/hlix bun test src/__tests__/binary.test.ts --timeout 60000 && bun run scripts/smoke-binary.ts","test:integration:binary":"bun run build:binary && HLIX_TEST_BINARY=dist-native/hlix NODE_ENV=test bun run ../../apps/backend/scripts/with-aimock.ts -- bun run ../../apps/backend/scripts/with-test-db.ts -- bun test --isolate --preload ../../apps/backend/test/helpers/pool-lifecycle.ts --timeout 60000 src/__tests__/auth.integration.test.ts",postinstall:"node install.cjs"},m={"@agentclientprotocol/sdk":"1.7.0","@earendil-works/pi-tui":"0.85.1","@mastra/acp":"^0.4.2","@mastra/core":"1.74.0","@mastra/docker":"^0.9.2","@mastra/libsql":"1.25.0","@mastra/mcp":"2.1.2","@mastra/memory":"1.35.0",ignore:"7.0.8","jsonc-parser":"3.3.1","openapi-fetch":"^0.17.0","smol-toml":"1.8.0",yaml:"2.9.0",zod:"4.6.5"},x={"@hlix/sdk":"^1.0.0","@hlix/shared":"*","@types/bun":"latest",typescript:"^7.0.2"},y={"@hlix/cli-darwin-arm64":"1.0.0","@hlix/cli-darwin-x64":"1.0.0","@hlix/cli-linux-x64":"1.0.0","@hlix/cli-linux-arm64":"1.0.0"},k={name:s,version:e,license:n,description:a,keywords:r,homepage:l,type:c,main:p,bin:o,files:b,engines:u,publishConfig:d,scripts:h,dependencies:m,devDependencies:x,optionalDependencies:y};export{o as bin,k as default,m as dependencies,a as description,x as devDependencies,u as engines,b as files,l as homepage,r as keywords,n as license,p as main,s as name,y as optionalDependencies,d as publishConfig,h as scripts,c as type,e as version};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hlix/cli",
3
- "version": "0.7.2",
3
+ "version": "1.0.0",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "description": "Hlix Code and the hlix control-plane CLI.",
6
6
  "keywords": [
@@ -35,35 +35,36 @@
35
35
  "prepublishOnly": "bun run typecheck && bun run build && bun run test",
36
36
  "test:integration": "NODE_ENV=test bun run ../../apps/backend/scripts/with-aimock.ts -- bun run ../../apps/backend/scripts/with-test-db.ts -- bun test --isolate --preload ../../apps/backend/test/helpers/pool-lifecycle.ts --timeout 60000 .integration.test.ts",
37
37
  "build:binary": "bun run scripts/build-binary.ts",
38
- "test:binary": "bun run build:binary && HLIX_TEST_BINARY=dist-native/hlix bun test src/binary.test.ts --timeout 60000 && bun run scripts/smoke-binary.ts",
39
- "test:integration:binary": "bun run build:binary && HLIX_TEST_BINARY=dist-native/hlix NODE_ENV=test bun run ../../apps/backend/scripts/with-aimock.ts -- bun run ../../apps/backend/scripts/with-test-db.ts -- bun test --isolate --preload ../../apps/backend/test/helpers/pool-lifecycle.ts --timeout 60000 src/sync.integration.test.ts src/auth.integration.test.ts",
38
+ "test:binary": "bun run build:binary && HLIX_TEST_BINARY=dist-native/hlix bun test src/__tests__/binary.test.ts --timeout 60000 && bun run scripts/smoke-binary.ts",
39
+ "test:integration:binary": "bun run build:binary && HLIX_TEST_BINARY=dist-native/hlix NODE_ENV=test bun run ../../apps/backend/scripts/with-aimock.ts -- bun run ../../apps/backend/scripts/with-test-db.ts -- bun test --isolate --preload ../../apps/backend/test/helpers/pool-lifecycle.ts --timeout 60000 src/__tests__/auth.integration.test.ts",
40
40
  "postinstall": "node install.cjs"
41
41
  },
42
42
  "dependencies": {
43
+ "@agentclientprotocol/sdk": "1.7.0",
43
44
  "@earendil-works/pi-tui": "0.85.1",
44
- "@mastra/acp": "^0.4.1",
45
- "@mastra/core": "1.71.0",
46
- "@mastra/docker": "^0.9.0",
47
- "@mastra/libsql": "1.23.0",
48
- "@mastra/mcp": "2.1.0",
49
- "@mastra/memory": "1.30.0",
45
+ "@mastra/acp": "^0.4.2",
46
+ "@mastra/core": "1.74.0",
47
+ "@mastra/docker": "^0.9.2",
48
+ "@mastra/libsql": "1.25.0",
49
+ "@mastra/mcp": "2.1.2",
50
+ "@mastra/memory": "1.35.0",
50
51
  "ignore": "7.0.8",
51
52
  "jsonc-parser": "3.3.1",
52
53
  "openapi-fetch": "^0.17.0",
53
54
  "smol-toml": "1.8.0",
54
55
  "yaml": "2.9.0",
55
- "zod": "4.5.4"
56
+ "zod": "4.6.5"
56
57
  },
57
58
  "devDependencies": {
58
- "@hlix/sdk": "^0.3.0",
59
+ "@hlix/sdk": "^1.0.0",
59
60
  "@hlix/shared": "*",
60
61
  "@types/bun": "latest",
61
62
  "typescript": "^7.0.2"
62
63
  },
63
64
  "optionalDependencies": {
64
- "@hlix/cli-darwin-arm64": "0.7.2",
65
- "@hlix/cli-darwin-x64": "0.7.2",
66
- "@hlix/cli-linux-x64": "0.7.2",
67
- "@hlix/cli-linux-arm64": "0.7.2"
65
+ "@hlix/cli-darwin-arm64": "1.0.0",
66
+ "@hlix/cli-darwin-x64": "1.0.0",
67
+ "@hlix/cli-linux-x64": "1.0.0",
68
+ "@hlix/cli-linux-arm64": "1.0.0"
68
69
  }
69
70
  }
@@ -157,7 +157,7 @@ Secrets are agency-only on every route. A client collaborator gets `forbidden`.
157
157
  hlix cycles create <project-id> --title <t> --description <d> [--json]
158
158
  hlix tasks create <project-id> --description <d> [--title <t>] [--json]
159
159
  hlix harness get [project-id] [--json]
160
- hlix harness set <hlix|claude-code|codex|cursor-agent> [project-id] [--org] [--json]
160
+ hlix harness set <hlix|claude-code|codex|cursor-agent|opencode|goose|qwen-code|pi> [project-id] [--org] [--json]
161
161
  hlix harness clear [project-id] [--org] [--json]
162
162
  ```
163
163
 
@@ -189,13 +189,15 @@ hlix rules [--edit] [--global] [--json] # the rules files the coding agent rea
189
189
  hlix projects list [--json] # projects in the workspace
190
190
  hlix projects get [project-id] [--json]
191
191
  hlix projects delete <id|name> [--yes] [--json]
192
+ hlix projects watch [--project <id>] [--json] # stream the project manager's feed until stopped
193
+ hlix projects message [--project <id>] <text> [--json] # send the project manager a message, print its answer
192
194
  hlix init [folder] [--project <id>] [--json] # create committed project configuration; --project binds an existing cloud project
193
195
  hlix terminal [project-id] [--print] [--web] [--json] # shell into the project's Coding Workspace (ssh here, or the browser terminal)
194
- hlix import [folder] [--dry-run] [--env-file <path>] [--history preserve|sanitize] [--include <path>] [--no-connect-origin] [--attach] [--yes] [--json]
196
+ hlix import [folder] [--dry-run] [--env-file <path>] [--history preserve|sanitize] [--include <path>] [--yes] [--json]
195
197
  hlix sync [--dry-run] [--json] # push or pull when only one side changed
196
- hlix pull [--force] [--yes] [--dry-run] [--json]
197
- hlix push [--dry-run] [--json] # compare-and-swap a new immutable revision
198
- hlix mirror [--once] [--json] # keep this folder a live mirror of the cloud files
198
+ hlix pull [--dry-run] [--json]
199
+ hlix push [--dry-run] [--json] # push with an expected Git head
200
+ hlix mirror [--json] # keep this folder a live mirror of the cloud files
199
201
  hlix skill import <SKILL.md|folder> [--name <slug>] [--json]
200
202
  hlix agent import <markdown-file> [--name <name>] [--runtime <runtime>] [--duty <duty>] [--json]
201
203
  hlix mcp import <.mcp.json> [--server <name>] [--allow-stdio] [--json]
@@ -217,99 +219,26 @@ the command itself always exits 0. An argument error — an unknown flag, a stra
217
219
  positional, a `--cwd` that is not a directory — is still exit 2, because it is
218
220
  rejected before `status` runs at all.
219
221
 
220
- `tasks list` and `projects get` default to the project this folder is bound to,
221
- so both are usable with no arguments inside an imported project.
222
-
223
- Run `hlix import --dry-run` first. The report names secret **keys**, quarantined
224
- agent/skill/MCP resources, and Git-history findings, but never secret values.
225
- Hlix collects every project-local dotenv and credential file. It applies the
226
- standard development dotenv precedence automatically and preserves every other
227
- profile encrypted; `--env-file` is an explicit override.
228
- Git history is preserved by default. Possible historical secrets are warnings,
229
- with at most five redacted commit-and-file findings. To leave old commits out,
230
- use `--history sanitize` to upload a current-tree snapshot without changing local Git history. `--history preserve`
231
- and the legacy `--history abort-on-findings` remain accepted; neither blocks on
232
- historical findings. Nested repositories and declared submodules import their
233
- working files without their own Git metadata or history. Ignored nested
234
- repositories are skipped silently.
235
-
236
- Ordinary files over the upload limit are skipped with a named hint. If needed, history is omitted, then the largest folders are skipped until the snapshot fits. Import, init, and push refresh a marked Hlix-managed block in `.hlixignore` from shared stack detection and verified local generated paths. Personal lines outside the block are preserved byte-for-byte; `!` overrides outside the block take precedence even above it. Automatic rules never cover tracked files or secrets. Declared tools identify untracked build output without generation comments: Vite literal build.outDir or dist, Next .next (plus out for a default static export), Nuxt .nuxt/.output, Astro dist, Turbo .turbo, TypeScript literal tsconfig outDir, Webpack/Parcel dist defaults, and Rollup configured output.dir. Python build/dist/egg-info needs a declared build backend. Resolve output paths per package and configured root, applying recognized build-command output flags first. Unresolved root/config/CLI overrides disable inference for that tool rather than reverting to a default; configuration code is never executed. Track authored files in declared output directories or use ! overrides to keep them visible. Composer vendor requires a valid lockfile; local path dependencies stay visible. Untracked agent scratch and external nested repos are eligible only when they are not project source. Unknown paths stay visible. A refresh removes broad rules for folders that acquired tracked files or secrets; source outside declared build outputs stays visible. Human output adds one line: `Hlix ignored 6 generated folders — see .hlixignore`. Dry runs do not refresh files, and linked ignore targets or malformed blocks are left untouched. Folders with a managed block use these rules instead of blanket generated-directory exclusions. `--include <path>` restores one ignored path and persists it for later push/sync scans, subject to upload limits; it never includes Git metadata or bypasses secret protection. Push leaves the cloud unchanged when skipping would remove an existing cloud file. Symlinked `.hlixignore` files are read from their targets; an unreadable target leaves uploads unchanged with a permission warning.
237
-
238
- Never delete .git folders or files to get past this; use .hlixignore instead.
239
-
240
- The human scan report is ordered: uploaded / skipped / secrets / warnings /
241
- blocked. The secrets line says files move encrypted. Protected working-tree files are named individually; their values are
242
- never printed. The JSON dry run retains the full environment and file report.
243
- The upload manifest summarizes skip lists longer than 5,000 entries; local
244
- reports and push protection retain every skipped path.
245
-
246
- Current environment values are sent only in the authenticated finalization
247
- request and stored encrypted; they are never placed in the Git bundle.
248
-
249
- When the scan finds cloud setup commands, protected files, or quarantined
250
- resources, interactive imports ask for one explicit trust decision before any
251
- project is created or uploaded. Non-interactive and `--json` callers must first
252
- review `--dry-run`, then pass `--yes`; it never bypasses a scan blocker. A
253
- declined prompt exits as `cancelled`, while a caller that cannot prompt exits
254
- as `approval_required`.
255
-
256
- When the folder's Git `origin` remote (or its sole remote) is a GitHub
257
- repository, `import` checks it against the workspace: unowned and reachable
258
- through a GitHub App installation here, it is connected to the new project
259
- automatically, no question asked. Already attached to another project in this
260
- workspace, an interactive import asks whether to bind this folder there
261
- instead of creating a duplicate; `--yes`, `--json`, and any non-interactive
262
- run never attach on their own — they import repo-less and print a line
263
- naming the owning project, and `--attach` is the explicit, promptless opt-in
264
- that does the binding in any mode. No match, an unparseable remote, or a
265
- non-GitHub host changes nothing and is never a blocker. `--no-connect-origin`
266
- skips this whole check.
267
-
268
- Agent, skill, and MCP files found during a project scan stay quarantined until
269
- one of the explicit import commands above is run. Skill content and agents are
270
- scoped to the bound project. MCP imports send environment key names only;
271
- values remain in encrypted project secrets and the generated cloud config uses
272
- `${KEY}` placeholders, including remote authentication headers such as
273
- `Authorization: Bearer ${TOKEN}`. Literal-only headers are refused. Remote MCP URLs must use public HTTPS. Stdio servers
274
- require `--allow-stdio` and run only through a validated direct executable,
275
- never a shell.
276
-
277
- `sync` never guesses through a two-sided conflict. If only local changed it
278
- pushes; if only cloud changed it pulls; if both changed it exits with
279
- `conflict`.
280
-
281
- A folder bound with `hlix init --project <id>` has no local base revision. If
282
- the project already has cloud files, `hlix pull` brings them down and becomes
283
- that base. If it has none — a project created in the dashboard — `hlix push`
284
- (or `hlix sync`) uploads the folder as revision 1 and builds the project's
285
- Coding Workspace from it. Only a project with no revision at all can be
286
- bootstrapped that way: if the cloud already has a revision but this folder has no base, push leaves both copies unchanged and reports that it needs a pull first. `hlix
287
- pull` on a project with no cloud files exits `not_found` and names the way
288
- forward.
289
-
290
- `push`, `pull` and `sync` accept `--dry-run`: it prints the divergence — each
291
- side's generation, and how many files are local-only, cloud-only or differing —
292
- takes no action, and reports the verdict the real command would reach. A dry run
293
- that would end in `conflict` exits 1, as `import --dry-run` does for a blocker.
294
-
295
- `pull --force` is the destructive override, and it now asks before replacing
296
- local files: `--force` states "replace my changes", `--yes` states "do not ask".
297
- A `--json` or non-interactive caller cannot answer, so it exits
298
- `approval_required` pointing at `--dry-run`; a declined prompt exits `cancelled`.
299
- `--force` without local changes replaces nothing and does not prompt.
300
-
301
- `mirror` makes the folder follow the project's cloud Coding Workspace: it
302
- catches up once, then pulls whenever the cloud's files move (a task merged,
303
- another machine pushed, a cloud Hlix Code session edited) and pushes whenever
304
- a file here is saved. Every change still lands as a revision. When both sides
305
- changed the same file, the cloud's version wins and the local one is kept
306
- beside it as `<file>.local-<timestamp>`, named in a `mirror:` line. `.env` and
307
- the other protected files never move: unlike `pull`, the mirror never writes
308
- them here, and unlike `push`, a mirror push keeps the cloud's exactly as they
309
- were — change secrets with `hlix secrets`, or an explicit `hlix push`. `--once` does the catch-up pass and exits;
310
- `--json` prints one envelope per line (JSONL): `{ caughtUp, generation }` once the
311
- catch-up is done, then one per pass that moved something. Interactive
312
- `hlix` in a bound folder runs the same mirror while its cloud session is open.
222
+ `tasks list`, `projects get`, `projects watch` and `projects message` default to
223
+ the project this folder is bound to, so they are usable with no arguments inside
224
+ an imported project.
225
+
226
+ `projects watch` is read-only: cycle and task changes, the decisions the
227
+ project manager makes, its messages and the runs it starts, including the ones
228
+ it starts on its own. It runs until stopped, survives a dropped connection, and
229
+ prints `Cloud work landed` when a cycle finishes or the preview moves.
230
+ `projects message` posts to the same thread the dashboard chat uses; a
231
+ manager busy answering someone else fails it with `conflict` and nothing is sent.
232
+
233
+ Run `hlix import --dry-run` first. The report includes file count, byte count and the number of protected files, without secret values. Review the upload, then use `--yes` to approve it. New projects receive a repository in **HLIX Repos**. Local Git history and origin stay intact.
234
+
235
+ `--history preserve` retains local history after a complete secret scan. If the scan finds potential secrets or cannot complete, review the findings or use `--history sanitize` to upload current files. Source files travel through Git. Protected files use the encrypted secrets channel and never enter the source upload.
236
+
237
+ `push`, `pull` and `sync` compare an immutable commit SHA and local file identities. They refuse to overwrite simultaneous local and remote changes. `--dry-run` reports the intended action. `mirror` checks for changes every 15 seconds and stops when cancelled; conflicts leave both copies intact and require manual resolution. Neither sync nor browsing committed files requires a Coding Workspace to wake up.
238
+
239
+ Import keeps the project binding after an interrupted push. Use `hlix push` to resume against that same repository. A folder bound with `init` can bootstrap an empty repository, or pull an existing repository into an empty local folder. A nonempty local folder with no known base cannot overwrite existing remote source.
240
+
241
+ Import skills, agents and MCP configuration explicitly with the resource commands listed above. They do not execute as a side effect of a source upload.
313
242
 
314
243
  ## Machine output
315
244
 
@@ -319,7 +248,7 @@ catch-up is done, then one per pass that moved something. Interactive
319
248
  {
320
249
  "schemaVersion": 1,
321
250
  "command": "projects list",
322
- "data": [ /* documented command result */ ]
251
+ "data": [/* documented command result */]
323
252
  }
324
253
  ```
325
254
 
@@ -348,18 +277,18 @@ Transport-only inspection commands pass the API response through unchanged.
348
277
  Local project commands such as `import`, `push`, `pull`, and `sync` return the
349
278
  documented local result shape. The CLI selects columns for the human table only.
350
279
 
351
- `tasks watch --json` and `mirror --json` (without `--once`) are the exceptions
280
+ `tasks watch --json`, `projects watch --json` and `mirror --json` (without `--once`) are the exceptions
352
281
  to "one document": they emit **one envelope per line** (JSONL), because a live
353
282
  stream cannot be a single JSON document. Read them line by line.
354
283
 
355
284
  ## Exit codes
356
285
 
357
- | Code | Meaning |
358
- | --- | --- |
359
- | 0 | Success |
360
- | 1 | The command ran and failed |
361
- | 2 | Usage error — unknown command, bad flags, missing argument |
362
- | 3 | Authentication or permission failure |
286
+ | Code | Meaning |
287
+ | ---- | ---------------------------------------------------------- |
288
+ | 0 | Success |
289
+ | 1 | The command ran and failed |
290
+ | 2 | Usage error — unknown command, bad flags, missing argument |
291
+ | 3 | Authentication or permission failure |
363
292
 
364
293
  ## Hlix Code, non-interactively
365
294
 
@@ -397,28 +326,12 @@ of yours.
397
326
 
398
327
  - **No execution commands** beyond `cycles create`. Starting a single task is
399
328
  not offered because the API does not implement it: `POST
400
- /v1/api/tasks/{id}/execute` publishes no success response and answers `501`
329
+ /v1/api/tasks/{id}/execute` publishes no success response and answers `501`
401
330
  by design. Work is dispatched by its cycle.
402
331
  - **No `tasks logs`.** The log endpoint is not part of the published API
403
332
  contract, and there is no log stream to follow. `tasks watch` streams task
404
- *status*, which is a different thing and is named accordingly.
333
+ _status_, which is a different thing and is named accordingly.
405
334
 
406
335
  ### Import recovery and project deletion
407
336
 
408
- An interrupted import resumes the saved session in `.hlix/import.json` on the
409
- next `hlix import` in that folder. Keep that file and `.hlix/import.bundle`
410
- until it succeeds. A finalize timeout polls the same import for up to ten
411
- minutes; rerun the command if the wait ends. Secret values are re-read from
412
- local files only if finalization has not started. Restore changed files before
413
- resuming an upload; completed imports bind without rescanning. If the server
414
- confirms an unfinished session has expired, the CLI discards its saved recovery
415
- files, reports it, and starts a fresh import. A completed or still-finalizing
416
- session is never replaced just because its upload deadline passed.
417
-
418
- `hlix projects delete <id|name>` prints the selected project's name
419
- before deleting it. Names must match exactly and be unique; otherwise use the
420
- ID. Interactive deletion asks for confirmation. Non-interactive deletion,
421
- `--json`, and deletion of this folder's bound project require `--yes`.
422
- Deletion removes the cloud project; local files are kept.
423
-
424
- `push --dry-run` reports conflicts with exit 0 and makes no changes. The nonzero conflict verdict described above applies to `pull` and `sync`. Missing local push bindings and unreadable import recovery records likewise produce explicit no-op reports; no replacement project or upload is created.
337
+ An interrupted import keeps its project binding. Retry with `hlix push`; source is stored in HLIX Repos rather than a resumable bundle session. Deleting a project removes its managed repository and encrypted project files.