@theholocron/cli 5.0.0-alpha.129 → 5.0.0-alpha.133
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 +48 -40
- package/dist/cli.mjs +810 -594
- package/dist/cli.mjs.map +1 -1
- package/dist/index.d.mts +21 -21
- package/dist/index.mjs +5 -5
- package/dist/plugin/capabilities.d.mts +49 -3
- package/dist/plugin/capabilities.mjs +1 -0
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -17,17 +17,25 @@ holocron --help
|
|
|
17
17
|
## Interactive mode
|
|
18
18
|
|
|
19
19
|
Run `holocron` with no command, a parent command with no subcommand
|
|
20
|
-
(`holocron auth`, `holocron
|
|
21
|
-
missing a required positional (`holocron deploy`, `holocron
|
|
22
|
-
you get a prompt instead of a `--help` dead end
|
|
20
|
+
(`holocron auth`, `holocron repo`, `holocron repo upgrade`, …), or a leaf command
|
|
21
|
+
missing a required positional (`holocron deploy`, `holocron secrets set`), and
|
|
22
|
+
you get a prompt instead of a `--help` dead end.
|
|
23
|
+
|
|
24
|
+
The menu mirrors the command tree: each level shows only the next word, and a
|
|
25
|
+
group (marked `›`) opens its own submenu, as deep as the commands nest. Nothing
|
|
26
|
+
is shown as a `<command> <subcommand>` path — `config show` is `config ›` then
|
|
27
|
+
`show`. Every submenu has a `← back` item, and a command that is also a group
|
|
28
|
+
(`repo sync`, `deploy`) has a `(run it)` item at the top of its submenu. Typing
|
|
29
|
+
searches the whole tree — `upgrade` at the top finds the `repo` group — with
|
|
30
|
+
name matches ranked above description matches.
|
|
23
31
|
|
|
24
32
|
```console
|
|
25
33
|
$ holocron
|
|
26
|
-
? What would you like to do? ›
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
?
|
|
34
|
+
? What would you like to do? › repo
|
|
35
|
+
❯ repo ›
|
|
36
|
+
? repo — choose a subcommand: › upgrade
|
|
37
|
+
? repo upgrade — choose a subcommand: › node
|
|
38
|
+
? Target Node.js major version: › 24
|
|
31
39
|
```
|
|
32
40
|
|
|
33
41
|
The picked command spawns as a normal `holocron <command> …` invocation —
|
|
@@ -54,11 +62,11 @@ entirely, straight to the real run, for when you already know what you want.
|
|
|
54
62
|
|
|
55
63
|
Every command is tagged with how much of a repo it needs:
|
|
56
64
|
|
|
57
|
-
| Context | Needs | Examples
|
|
58
|
-
| ------------ | -------------------------------------------------------- |
|
|
59
|
-
| `global` | the CLI binary alone | `version`, `clone`, `new`, `upgrade
|
|
60
|
-
| `repo-aware` | `./holocron.config`, walking up from cwd, no plugins | `run`, `run ci`, `config show`, `sync
|
|
61
|
-
| `workspace` | the `@theholocron/holocron-plugin-*` packages resolvable | `doctor`, `setup`, `sync`, `secrets
|
|
65
|
+
| Context | Needs | Examples |
|
|
66
|
+
| ------------ | -------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
|
|
67
|
+
| `global` | the CLI binary alone | `version`, `clone`, `new repo` / `plugin`, `repo upgrade …`, `auth set` / `check`, `package …`, `run lint commit-msg`, `skills …` |
|
|
68
|
+
| `repo-aware` | `./holocron.config`, walking up from cwd, no plugins | `run`, `run ci`, `config show`, `repo sync readme`, `deploy on-release` |
|
|
69
|
+
| `workspace` | the `@theholocron/holocron-plugin-*` packages resolvable | `doctor`, `repo setup`, `repo sync`, `secrets …`, `deploy`, `sync github` |
|
|
62
70
|
|
|
63
71
|
A `workspace` command run from a bare global install (no plugins next to the
|
|
64
72
|
CLI) fails with one actionable line — install the plugins as devDependencies or
|
|
@@ -133,18 +141,18 @@ A minimal config — for repos with a `package.json` and a GitHub remote
|
|
|
133
141
|
|
|
134
142
|
### repo options
|
|
135
143
|
|
|
136
|
-
Additional `repo` fields recognised by `holocron setup`:
|
|
144
|
+
Additional `repo` fields recognised by `holocron repo setup`:
|
|
137
145
|
|
|
138
|
-
| Field | Type | Description
|
|
139
|
-
| ----------------- | --------------------------------------- |
|
|
140
|
-
| `repo.teams` | `Array<string \| { slug, permission }>` | GitHub teams granted repo access. String shorthand defaults to `push` (Write). `holocron setup` also writes `.github/CODEOWNERS` for teams with `push`/`maintain`/`admin`. |
|
|
141
|
-
| `repo.topics` | `string[]` | GitHub topics set on the repository.
|
|
142
|
-
| `repo.protection` | `"balanced" \| "strict" \| "none"` | Branch-protection preset applied by `holocron setup`. For `"strict"`, the required status checks are derived from the task manifest — see below. |
|
|
143
|
-
| `repo.properties` | `RepoProperties` | Org-level custom property values synced to the GitHub dashboard.
|
|
146
|
+
| Field | Type | Description |
|
|
147
|
+
| ----------------- | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
148
|
+
| `repo.teams` | `Array<string \| { slug, permission }>` | GitHub teams granted repo access. String shorthand defaults to `push` (Write). `holocron repo setup` also writes `.github/CODEOWNERS` for teams with `push`/`maintain`/`admin`. |
|
|
149
|
+
| `repo.topics` | `string[]` | GitHub topics set on the repository. |
|
|
150
|
+
| `repo.protection` | `"balanced" \| "strict" \| "none"` | Branch-protection preset applied by `holocron repo setup`. For `"strict"`, the required status checks are derived from the task manifest — see below. |
|
|
151
|
+
| `repo.properties` | `RepoProperties` | Org-level custom property values synced to the GitHub dashboard. |
|
|
144
152
|
|
|
145
153
|
### Custom properties synced to GitHub
|
|
146
154
|
|
|
147
|
-
`holocron setup` and `holocron sync` both call `syncProperties()` with two
|
|
155
|
+
`holocron repo setup` and `holocron repo sync` both call `syncProperties()` with two
|
|
148
156
|
kinds of fields — always one-way (`holocron.config.ts` → resolved →
|
|
149
157
|
properties; properties are never a second editable source of truth):
|
|
150
158
|
|
|
@@ -190,7 +198,7 @@ posts, instead of reporting pass/fail.
|
|
|
190
198
|
|
|
191
199
|
### Required status checks (`protection: "strict"`)
|
|
192
200
|
|
|
193
|
-
`holocron setup` builds the branch-protection required-check list from the
|
|
201
|
+
`holocron repo setup` builds the branch-protection required-check list from the
|
|
194
202
|
manifest, not a hand-maintained array:
|
|
195
203
|
|
|
196
204
|
- `"DCO"` (hard-prepended), then
|
|
@@ -216,10 +224,10 @@ The generated ruleset also sets `require_extra_approval_for_unattributed_changes
|
|
|
216
224
|
false` — with `required_approving_review_count: 0` and a single maintainer, the
|
|
217
225
|
GitHub default (`true`) is an unsatisfiable block on any PR with an
|
|
218
226
|
unverified/unattributed commit. Repository-admin bypass still covers the real
|
|
219
|
-
risk. And the `codecov.yml` `holocron setup` writes carries `if_not_found:
|
|
227
|
+
risk. And the `codecov.yml` `holocron repo setup` writes carries `if_not_found:
|
|
220
228
|
success` on every status default, so an infra-only PR (dep bump, config,
|
|
221
229
|
lockfile — no coverable change) passes instead of hanging on a `codecov/*`
|
|
222
|
-
required check that never posts. A re-run of `holocron setup` backfills both into
|
|
230
|
+
required check that never posts. A re-run of `holocron repo setup` backfills both into
|
|
223
231
|
an existing repo.
|
|
224
232
|
|
|
225
233
|
### Default branch (`repo.defaultBranch`)
|
|
@@ -231,7 +239,7 @@ export default defineConfig({
|
|
|
231
239
|
});
|
|
232
240
|
```
|
|
233
241
|
|
|
234
|
-
`holocron setup` syncs GitHub's repo-level default branch (`HEAD`) — what a
|
|
242
|
+
`holocron repo setup` syncs GitHub's repo-level default branch (`HEAD`) — what a
|
|
235
243
|
fresh clone checks out, what `gh pr create`/the compare UI target by default,
|
|
236
244
|
and what Sentinel's `validateConfig()` reads (it only ever reads config from
|
|
237
245
|
the repo's default branch, never a PR ref — a deliberate security boundary).
|
|
@@ -252,7 +260,7 @@ export default defineConfig({
|
|
|
252
260
|
});
|
|
253
261
|
```
|
|
254
262
|
|
|
255
|
-
`holocron setup` writes `.husky/pre-push` (runs `holocron run ci` before every
|
|
263
|
+
`holocron repo setup` writes `.husky/pre-push` (runs `holocron run ci` before every
|
|
256
264
|
push) and `.husky/pre-commit` (runs `gitleaks protect --staged` + `lint-staged`
|
|
257
265
|
before every commit — scoped to staged changes, not the whole history, so a
|
|
258
266
|
past false positive can't permanently block future commits) and sets
|
|
@@ -263,7 +271,7 @@ setup --hooks` / `--no-hooks` override per run. Bypass one push with `git push
|
|
|
263
271
|
|
|
264
272
|
### Task scripts
|
|
265
273
|
|
|
266
|
-
`holocron sync` reconciles `package.json#scripts` from the `tasks` manifest
|
|
274
|
+
`holocron repo sync` reconciles `package.json#scripts` from the `tasks` manifest
|
|
267
275
|
(merge, never clobber — only the managed keys are touched):
|
|
268
276
|
|
|
269
277
|
```ts
|
|
@@ -299,7 +307,7 @@ export default defineConfig({
|
|
|
299
307
|
`holocron.config`'s `tasks` — **task arrays concatenate**
|
|
300
308
|
(`holocron.config` first), the dedicated file **wins on scalars**,
|
|
301
309
|
`extraRequiredChecks` concatenate. `holocron run` / `holocron run ci` /
|
|
302
|
-
`holocron setup` / `holocron sync` all read the merged result, so the
|
|
310
|
+
`holocron repo setup` / `holocron repo sync` all read the merged result, so the
|
|
303
311
|
split is transparent. Useful for keeping the capability/provider config
|
|
304
312
|
and the "what this repo runs" manifest in separate files (this repo does).
|
|
305
313
|
|
|
@@ -326,10 +334,10 @@ job execute the same thing — at a turbo root both are
|
|
|
326
334
|
`turbo run test -- --coverage` (the registry's org-default flags flow through
|
|
327
335
|
turbo's `--`).
|
|
328
336
|
|
|
329
|
-
### `holocron deploy
|
|
337
|
+
### `holocron deploy on-release`
|
|
330
338
|
|
|
331
339
|
```bash
|
|
332
|
-
holocron deploy
|
|
340
|
+
holocron deploy on-release [--channel <alpha|main>] [--from <commit>] [--to <commit>] [--dry-run]
|
|
333
341
|
```
|
|
334
342
|
|
|
335
343
|
Deploys every workspace package whose own `holocron.config` declares
|
|
@@ -394,7 +402,7 @@ export default defineConfig({
|
|
|
394
402
|
|
|
395
403
|
### Skills installer
|
|
396
404
|
|
|
397
|
-
`holocron setup` can install shared skills from `@theholocron/skills` into the local repo:
|
|
405
|
+
`holocron repo setup` can install shared skills from `@theholocron/skills` into the local repo:
|
|
398
406
|
|
|
399
407
|
```ts
|
|
400
408
|
export default defineConfig({
|
|
@@ -457,10 +465,10 @@ export default acmeConfig;
|
|
|
457
465
|
|
|
458
466
|
## Upgrading
|
|
459
467
|
|
|
460
|
-
- **`holocron upgrade node <to>`** — patches every Node.js version pin
|
|
468
|
+
- **`holocron repo upgrade node <to>`** — patches every Node.js version pin
|
|
461
469
|
(`engines.node`, `.nvmrc`, `.node-version`, `.github/workflows/*`,
|
|
462
470
|
`Dockerfile`, `.tool-versions`) to a new major.
|
|
463
|
-
- **`holocron upgrade deps`** — bumps every `@theholocron/*` pin in
|
|
471
|
+
- **`holocron repo upgrade deps`** — bumps every `@theholocron/*` pin in
|
|
464
472
|
`pnpm-workspace.yaml` (`catalog:` and every named `catalogs.*`) to its latest
|
|
465
473
|
published version, then migrates `holocron.config.ts` from the 7.x preset
|
|
466
474
|
shape (`const { repo, workflows } = node()` + `repo.requiredChecks` +
|
|
@@ -598,8 +606,8 @@ the local override exists to exempt.
|
|
|
598
606
|
|
|
599
607
|
## What's in here
|
|
600
608
|
|
|
601
|
-
- `src/capabilities
|
|
602
|
-
implement
|
|
609
|
+
- `src/plugin/capabilities.ts` — the 18 capability interfaces that
|
|
610
|
+
providers implement
|
|
603
611
|
- `src/config.ts` — config schema, `defineConfig`, `resolveConfig`,
|
|
604
612
|
`CapabilityConfigPackage`
|
|
605
613
|
- `src/config/load-config.ts` — `loadConfig` — reads `holocron.config.*`
|
|
@@ -611,14 +619,14 @@ the local override exists to exempt.
|
|
|
611
619
|
capability config packages, builds the capability registry
|
|
612
620
|
- `src/cli.ts` — yargs entry, dispatches subcommands. `holocron run` / `ci` are
|
|
613
621
|
delegated to [`@theholocron/astromech`](../astromech) (`createAstromech`).
|
|
614
|
-
`holocron sync` / `holocron setup` write each repo's `.github/workflows/*.yml`
|
|
615
|
-
thin callers from `astromech.thinCallers()`; `holocron sync
|
|
622
|
+
`holocron repo sync` / `holocron repo setup` write each repo's `.github/workflows/*.yml`
|
|
623
|
+
thin callers from `astromech.thinCallers()`; `holocron sync github` pushes the
|
|
616
624
|
reusable `workflow_call` implementations + composite actions from
|
|
617
625
|
`astromech.reusableTemplates()` to `theholocron/.github` (a pure sync target —
|
|
618
626
|
never hand-edit its `.github/workflows/*`).
|
|
619
|
-
- `src/commands/` — `setup`, `sync`, `doctor`, `deploy`, `
|
|
620
|
-
`secrets sync`, `publish`, `bump-versions`, `sync
|
|
621
|
-
`upgrade deps`, `plugin
|
|
627
|
+
- `src/commands/` — `repo setup`, `repo sync`, `doctor`, `deploy`, `secrets set`,
|
|
628
|
+
`secrets sync`, `package publish`, `package bump-versions`, `sync github`,
|
|
629
|
+
`repo upgrade node`, `repo upgrade deps`, `new plugin`, `auth`
|
|
622
630
|
- `src/interactive-menu.ts` — the interactive fallback: `COMMAND_REGISTRY`,
|
|
623
631
|
`launchMenu` (Layers 1–2, picks + spawns a fresh `holocron <command>`),
|
|
624
632
|
`promptForPositionals` (Layer 3, called inline from each leaf command's
|