@hlix/cli 0.5.6 → 0.7.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.
- package/README.md +2 -2
- package/THIRD_PARTY_NOTICES +523 -1608
- package/dist/index-zbtvn1j2.js +261 -0
- package/dist/index.js +4 -4
- package/dist/main-bk7pvnwh.js +141 -0
- package/dist/package-d2qfdjga.js +2 -0
- package/package.json +10 -7
- package/skills/hlix/SKILL.md +71 -15
- package/dist/index-8g4x8tv8.js +0 -213
- package/dist/main-g9zc6npj.js +0 -67
- package/dist/package-q1pwa5fr.js +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
var s="@hlix/cli",i="0.7.0",n="SEE LICENSE IN LICENSE",a="Hlix Code and the hlix control-plane CLI.",r=["hlix","cli","agents"],l="https://hlix.ai",p="module",o="./dist/index.js",c={hlix:"./dist/index.js"},d=["dist","skills","LICENSE","THIRD_PARTY_NOTICES"],u={node:">=22.19.0"},m={access:"public"},b={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"},h={"@earendil-works/pi-tui":"0.85.1","@mastra/acp":"^0.4.1","@mastra/core":"1.71.0","@mastra/docker":"^0.9.0","@mastra/libsql":"1.23.0","@mastra/mcp":"2.1.0","@mastra/memory":"1.30.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.5.4"},g={"@hlix/sdk":"^0.2.0","@hlix/shared":"*","@types/bun":"latest",typescript:"^7.0.2"},k={name:s,version:i,license:n,description:a,keywords:r,homepage:l,type:p,main:o,bin:c,files:d,engines:u,publishConfig:m,scripts:b,dependencies:h,devDependencies:g};export{c as bin,k as default,h as dependencies,a as description,g as devDependencies,u as engines,d as files,l as homepage,r as keywords,n as license,o as main,s as name,m as publishConfig,b as scripts,p as type,i as version};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hlix/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"description": "Hlix Code and the hlix control-plane CLI.",
|
|
6
6
|
"keywords": [
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
|
30
30
|
"build": "rm -rf dist && bun build src/index.ts --outdir dist --target node --format esm --splitting --packages external --minify --banner '#!/usr/bin/env node'",
|
|
31
|
-
"test": "bun test
|
|
31
|
+
"test": "bun test src --path-ignore-patterns \"**/*.integration.test.ts\" --timeout 20000",
|
|
32
32
|
"typecheck": "tsc --noEmit",
|
|
33
33
|
"prepublishOnly": "bun run typecheck && bun run build && bun run test",
|
|
34
34
|
"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"
|
|
@@ -36,13 +36,16 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@earendil-works/pi-tui": "0.85.1",
|
|
38
38
|
"@mastra/acp": "^0.4.1",
|
|
39
|
-
"@mastra/core": "1.
|
|
40
|
-
"@mastra/docker": "^0.
|
|
41
|
-
"@mastra/libsql": "1.
|
|
42
|
-
"@mastra/mcp": "1.
|
|
43
|
-
"@mastra/memory": "1.
|
|
39
|
+
"@mastra/core": "1.71.0",
|
|
40
|
+
"@mastra/docker": "^0.9.0",
|
|
41
|
+
"@mastra/libsql": "1.23.0",
|
|
42
|
+
"@mastra/mcp": "2.1.0",
|
|
43
|
+
"@mastra/memory": "1.30.0",
|
|
44
44
|
"ignore": "7.0.8",
|
|
45
|
+
"jsonc-parser": "3.3.1",
|
|
45
46
|
"openapi-fetch": "^0.17.0",
|
|
47
|
+
"smol-toml": "1.8.0",
|
|
48
|
+
"yaml": "2.9.0",
|
|
46
49
|
"zod": "4.5.4"
|
|
47
50
|
},
|
|
48
51
|
"devDependencies": {
|
package/skills/hlix/SKILL.md
CHANGED
|
@@ -187,12 +187,14 @@ hlix standards [--json] # instruction files, skills, commands, MCP
|
|
|
187
187
|
hlix rules [--edit] [--global] [--json] # the rules files the coding agent reads; --edit opens one in $EDITOR
|
|
188
188
|
hlix projects list [--json] # projects in the workspace
|
|
189
189
|
hlix projects get [project-id] [--json]
|
|
190
|
+
hlix projects delete <id|name> [--yes] [--json]
|
|
190
191
|
hlix init [folder] [--project <id>] [--json] # create committed project configuration; --project binds an existing cloud project
|
|
191
192
|
hlix terminal [project-id] [--print] [--web] [--json] # shell into the project's Coding Workspace (ssh here, or the browser terminal)
|
|
192
|
-
hlix import [folder] [--dry-run] [--env-file <path>] [--history preserve] [--yes] [--json]
|
|
193
|
+
hlix import [folder] [--dry-run] [--env-file <path>] [--history preserve|sanitize] [--include <path>] [--no-connect-origin] [--attach] [--yes] [--json]
|
|
193
194
|
hlix sync [--dry-run] [--json] # push or pull when only one side changed
|
|
194
195
|
hlix pull [--force] [--yes] [--dry-run] [--json]
|
|
195
196
|
hlix push [--dry-run] [--json] # compare-and-swap a new immutable revision
|
|
197
|
+
hlix mirror [--once] [--json] # keep this folder a live mirror of the cloud files
|
|
196
198
|
hlix skill import <SKILL.md|folder> [--name <slug>] [--json]
|
|
197
199
|
hlix agent import <markdown-file> [--name <name>] [--runtime <runtime>] [--duty <duty>] [--json]
|
|
198
200
|
hlix mcp import <.mcp.json> [--server <name>] [--allow-stdio] [--json]
|
|
@@ -222,14 +224,24 @@ agent/skill/MCP resources, and Git-history findings, but never secret values.
|
|
|
222
224
|
Hlix collects every project-local dotenv and credential file. It applies the
|
|
223
225
|
standard development dotenv precedence automatically and preserves every other
|
|
224
226
|
profile encrypted; `--env-file` is an explicit override.
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
227
|
+
Git history is preserved by default. Possible historical secrets are warnings,
|
|
228
|
+
with at most five redacted commit-and-file findings. To leave old commits out,
|
|
229
|
+
use `--history sanitize` to upload a current-tree snapshot without changing local Git history. `--history preserve`
|
|
230
|
+
and the legacy `--history abort-on-findings` remain accepted; neither blocks on
|
|
231
|
+
historical findings. Nested repositories and declared submodules import their
|
|
232
|
+
working files without their own Git metadata or history. Ignored nested
|
|
233
|
+
repositories are skipped silently.
|
|
234
|
+
|
|
235
|
+
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.
|
|
236
|
+
|
|
237
|
+
Never delete .git folders or files to get past this; use .hlixignore instead.
|
|
238
|
+
|
|
239
|
+
The human scan report is ordered: uploaded / skipped / secrets / warnings /
|
|
240
|
+
blocked. The secrets line says files move encrypted. Protected working-tree files are named individually; their values are
|
|
241
|
+
never printed. The JSON dry run retains the full environment and file report.
|
|
242
|
+
The upload manifest summarizes skip lists longer than 5,000 entries; local
|
|
243
|
+
reports and push protection retain every skipped path.
|
|
244
|
+
|
|
233
245
|
Current environment values are sent only in the authenticated finalization
|
|
234
246
|
request and stored encrypted; they are never placed in the Git bundle.
|
|
235
247
|
|
|
@@ -240,6 +252,18 @@ review `--dry-run`, then pass `--yes`; it never bypasses a scan blocker. A
|
|
|
240
252
|
declined prompt exits as `cancelled`, while a caller that cannot prompt exits
|
|
241
253
|
as `approval_required`.
|
|
242
254
|
|
|
255
|
+
When the folder's Git `origin` remote (or its sole remote) is a GitHub
|
|
256
|
+
repository, `import` checks it against the workspace: unowned and reachable
|
|
257
|
+
through a GitHub App installation here, it is connected to the new project
|
|
258
|
+
automatically, no question asked. Already attached to another project in this
|
|
259
|
+
workspace, an interactive import asks whether to bind this folder there
|
|
260
|
+
instead of creating a duplicate; `--yes`, `--json`, and any non-interactive
|
|
261
|
+
run never attach on their own — they import repo-less and print a line
|
|
262
|
+
naming the owning project, and `--attach` is the explicit, promptless opt-in
|
|
263
|
+
that does the binding in any mode. No match, an unparseable remote, or a
|
|
264
|
+
non-GitHub host changes nothing and is never a blocker. `--no-connect-origin`
|
|
265
|
+
skips this whole check.
|
|
266
|
+
|
|
243
267
|
Agent, skill, and MCP files found during a project scan stay quarantined until
|
|
244
268
|
one of the explicit import commands above is run. Skill content and agents are
|
|
245
269
|
scoped to the bound project. MCP imports send environment key names only;
|
|
@@ -258,8 +282,7 @@ the project already has cloud files, `hlix pull` brings them down and becomes
|
|
|
258
282
|
that base. If it has none — a project created in the dashboard — `hlix push`
|
|
259
283
|
(or `hlix sync`) uploads the folder as revision 1 and builds the project's
|
|
260
284
|
Coding Workspace from it. Only a project with no revision at all can be
|
|
261
|
-
bootstrapped that way: a
|
|
262
|
-
folder with no base whose project does have a revision (pull first). `hlix
|
|
285
|
+
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
|
|
263
286
|
pull` on a project with no cloud files exits `not_found` and names the way
|
|
264
287
|
forward.
|
|
265
288
|
|
|
@@ -274,6 +297,19 @@ A `--json` or non-interactive caller cannot answer, so it exits
|
|
|
274
297
|
`approval_required` pointing at `--dry-run`; a declined prompt exits `cancelled`.
|
|
275
298
|
`--force` without local changes replaces nothing and does not prompt.
|
|
276
299
|
|
|
300
|
+
`mirror` makes the folder follow the project's cloud Coding Workspace: it
|
|
301
|
+
catches up once, then pulls whenever the cloud's files move (a task merged,
|
|
302
|
+
another machine pushed, a cloud Hlix Code session edited) and pushes whenever
|
|
303
|
+
a file here is saved. Every change still lands as a revision. When both sides
|
|
304
|
+
changed the same file, the cloud's version wins and the local one is kept
|
|
305
|
+
beside it as `<file>.local-<timestamp>`, named in a `mirror:` line. `.env` and
|
|
306
|
+
the other protected files never move: unlike `pull`, the mirror never writes
|
|
307
|
+
them here, and unlike `push`, a mirror push keeps the cloud's exactly as they
|
|
308
|
+
were — change secrets with `hlix secrets`, or an explicit `hlix push`. `--once` does the catch-up pass and exits;
|
|
309
|
+
`--json` prints one envelope per line (JSONL): `{ caughtUp, generation }` once the
|
|
310
|
+
catch-up is done, then one per pass that moved something. Interactive
|
|
311
|
+
`hlix` in a bound folder runs the same mirror while its cloud session is open.
|
|
312
|
+
|
|
277
313
|
## Machine output
|
|
278
314
|
|
|
279
315
|
`--json` is a stable contract. Human output is not — do not parse it.
|
|
@@ -300,7 +336,7 @@ Branch on `error.code`, never on `error.message`. Codes: `unauthenticated`,
|
|
|
300
336
|
`forbidden`, `not_found`, `conflict`, `invalid_request`, `bad_request`,
|
|
301
337
|
`rate_limited`, `not_implemented`, `server_error`, `unreachable`,
|
|
302
338
|
`missing_argument`, `invalid_usage`, `approval_required`, `cancelled`, `unknown_command`,
|
|
303
|
-
`workspace_mismatch`, `not_initialized`, `scan_blocked`,
|
|
339
|
+
`workspace_mismatch`, `not_initialized`, `scan_blocked`,
|
|
304
340
|
`workspace_required`, `invalid_base_url`, `missing_credential`, `unknown`.
|
|
305
341
|
|
|
306
342
|
That list is the complete set — `skill.test.ts` compares it against every code
|
|
@@ -311,9 +347,9 @@ Transport-only inspection commands pass the API response through unchanged.
|
|
|
311
347
|
Local project commands such as `import`, `push`, `pull`, and `sync` return the
|
|
312
348
|
documented local result shape. The CLI selects columns for the human table only.
|
|
313
349
|
|
|
314
|
-
`tasks watch --json`
|
|
315
|
-
envelope per line** (JSONL), because a live
|
|
316
|
-
document. Read
|
|
350
|
+
`tasks watch --json` and `mirror --json` (without `--once`) are the exceptions
|
|
351
|
+
to "one document": they emit **one envelope per line** (JSONL), because a live
|
|
352
|
+
stream cannot be a single JSON document. Read them line by line.
|
|
317
353
|
|
|
318
354
|
## Exit codes
|
|
319
355
|
|
|
@@ -365,3 +401,23 @@ of yours.
|
|
|
365
401
|
- **No `tasks logs`.** The log endpoint is not part of the published API
|
|
366
402
|
contract, and there is no log stream to follow. `tasks watch` streams task
|
|
367
403
|
*status*, which is a different thing and is named accordingly.
|
|
404
|
+
|
|
405
|
+
### Import recovery and project deletion
|
|
406
|
+
|
|
407
|
+
An interrupted import resumes the saved session in `.hlix/import.json` on the
|
|
408
|
+
next `hlix import` in that folder. Keep that file and `.hlix/import.bundle`
|
|
409
|
+
until it succeeds. A finalize timeout polls the same import for up to ten
|
|
410
|
+
minutes; rerun the command if the wait ends. Secret values are re-read from
|
|
411
|
+
local files only if finalization has not started. Restore changed files before
|
|
412
|
+
resuming an upload; completed imports bind without rescanning. If the server
|
|
413
|
+
confirms an unfinished session has expired, the CLI discards its saved recovery
|
|
414
|
+
files, reports it, and starts a fresh import. A completed or still-finalizing
|
|
415
|
+
session is never replaced just because its upload deadline passed.
|
|
416
|
+
|
|
417
|
+
`hlix projects delete <id|name>` prints the selected project's name
|
|
418
|
+
before deleting it. Names must match exactly and be unique; otherwise use the
|
|
419
|
+
ID. Interactive deletion asks for confirmation. Non-interactive deletion,
|
|
420
|
+
`--json`, and deletion of this folder's bound project require `--yes`.
|
|
421
|
+
Deletion removes the cloud project; local files are kept.
|
|
422
|
+
|
|
423
|
+
`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.
|