@theholocron/cli 2.0.0-alpha.7 → 2.0.0-alpha.70

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 CHANGED
@@ -1,3 +1,5 @@
1
+ <!-- editorconfig-checker-disable-file -->
2
+
1
3
  # `@theholocron/cli`
2
4
 
3
5
  The Holocron CLI — a pluggable, capability-based orchestrator for
@@ -5,24 +7,154 @@ spinning up and operating software projects.
5
7
 
6
8
  ## Install
7
9
 
10
+ <!-- prettier-ignore -->
8
11
  ```bash
9
12
  npm i -g @theholocron/cli@alpha
10
13
  holocron --help
14
+
15
+ ```
16
+
17
+ ## Config file
18
+
19
+ Holocron reads `holocron.config.{json,js,ts}` from the project root
20
+ (priority: json → js → ts).
21
+
22
+ **JSON** (simplest):
23
+
24
+ <!-- prettier-ignore -->
25
+ ```jsonc
26
+ // holocron.config.json
27
+ {
28
+ "name": "my-app",
29
+ "providers": {
30
+ "vault": ["1password", { "vault": "my-app" }],
31
+ "source": "github",
32
+ },
33
+ }
34
+
35
+ ```
36
+
37
+ **JS/TS** — use `defineConfig` for autocomplete and type-checking:
38
+
39
+ <!-- prettier-ignore -->
40
+ ```ts
41
+ // holocron.config.ts
42
+ import { defineConfig } from "@theholocron/cli";
43
+
44
+ export default defineConfig({
45
+ name: "my-app",
46
+ providers: {
47
+ vault: ["1password", { vault: "my-app" }],
48
+ source: "github",
49
+ },
50
+ });
51
+
52
+ ```
53
+
54
+ ### Auto-derived fields
55
+
56
+ `name` and `repo.name` are optional. When absent, Holocron fills them
57
+ in at load time:
58
+
59
+ | Field | Derived from | Fallback |
60
+ | ----------- | ---------------------------------------------------- | ------------------ |
61
+ | `name` | `package.json` → `name` field (scope stripped) | directory basename |
62
+ | `repo.name` | `git remote get-url origin` (parsed to `owner/repo`) | not set |
63
+
64
+ A minimal config — for repos with a `package.json` and a GitHub remote
65
+ — only needs `providers`:
66
+
67
+ ### repo options
68
+
69
+ Additional `repo` fields recognised by `holocron setup`:
70
+
71
+ | Field | Type | Description |
72
+ | ----------------- | --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
73
+ | `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`. |
74
+ | `repo.topics` | `string[]` | GitHub topics set on the repository. |
75
+ | `repo.protection` | `"balanced" \| "strict" \| "none"` | Branch-protection preset applied by `holocron setup`. |
76
+ | `repo.properties` | `RepoProperties` | Org-level custom property values synced to the GitHub dashboard. |
77
+
78
+ ### Skills installer
79
+
80
+ `holocron setup` can install shared skills from `@theholocron/skills` into the local repo:
81
+
82
+ ```ts
83
+ export default defineConfig({
84
+ agent: "claude", // "claude" | "codex" | "gemini"
85
+ skills: ["git-safety", "pr-workflow"], // skill names from @theholocron/skills
86
+ providers: { source: "github" },
87
+ });
88
+ ```
89
+
90
+ Skills are copied to `.agents/skills/<name>/` and symlinked at the agent's expected path (e.g. `.claude/skills/<name>`). All installed paths are added to a managed block in `.gitignore` automatically.
91
+
92
+ <!-- prettier-ignore -->
93
+ ```jsonc
94
+ { "providers": { "source": "github" } }
95
+ ```
96
+
97
+ Set `name` explicitly whenever the derived value would be wrong: content
98
+ repos without a `package.json` (e.g. `.github`) will fall back to the
99
+ directory basename, which may not match what your vault or deployment
100
+ provider expects as a project identifier.
101
+
102
+ ### Shareable configs
103
+
104
+ **Level 1 — per-capability config packages.** Reference a published
105
+ package in any provider slot and Holocron resolves its bundled
106
+ `{ provider, options }` automatically. Per-project options merge on
107
+ top (project wins):
108
+
109
+ <!-- prettier-ignore -->
110
+ ```ts
111
+ providers: {
112
+ vault: '@acme/holocron-vault', // preset only
113
+ source: ['@acme/holocron-github', { repo: 'x' }], // preset + override
114
+ }
115
+
116
+ ```
117
+
118
+ A capability config package exports a `CapabilityConfigPackage` default:
119
+
120
+ <!-- prettier-ignore -->
121
+ ```ts
122
+ import type { CapabilityConfigPackage } from "@theholocron/cli";
123
+ export default {
124
+ provider: "1password",
125
+ options: { vault: "acme-app" },
126
+ } satisfies CapabilityConfigPackage;
127
+
128
+ ```
129
+
130
+ **Level 2 — whole-config presets.** Because the config file can be
131
+ JS/TS, a shared base is just an import:
132
+
133
+ <!-- prettier-ignore -->
134
+ ```ts
135
+ // holocron.config.ts
136
+ import { acmeConfig } from "@acme/holocron-config";
137
+ export default acmeConfig;
138
+
11
139
  ```
12
140
 
13
141
  ## What's in here
14
142
 
15
143
  - `src/capabilities/` — the 14 capability interfaces that providers
16
- implement
17
- - `src/config.ts` — `holocron.config.json` parser + plugin resolution
144
+ implement
145
+ - `src/config.ts` — config schema, `defineConfig`, `resolveConfig`,
146
+ `CapabilityConfigPackage`
147
+ - `src/load-config.ts` — `loadConfig` — reads JSON/JS/TS config files
148
+ - `src/define-config.ts` — `defineConfig` typed pass-through
149
+ - `src/loader.ts` — `PluginLoader` — dynamic-imports plugins, resolves
150
+ capability config packages, builds the capability registry
18
151
  - `src/cli.ts` — yargs entry, dispatches subcommands
19
- - `src/commands/` — `setup`, `doctor`, `deploy`, `secret set`,
20
- `secrets sync`, `npm publish-initial`
152
+ - `src/commands/` — `setup`, `sync`, `doctor`, `deploy`, `secret set`,
153
+ `secrets sync`, `npm publish-initial`, `sync-github`, `upgrade node`,
154
+ `plugin create`, `auth`
21
155
 
22
156
  ## Status
23
157
 
24
- **`v2.0.0-alpha.0`** — published on npm under the `alpha` dist-tag.
25
- [Release notes](https://github.com/theholocron/holocron/releases/tag/v2.0.0-alpha.0).
26
- Design in
27
- [`.notes/tech-architecture.spec.md`](../../.notes/tech-architecture.spec.md).
28
- APIs may still shift before stable v2.0.0.
158
+ Published on npm under the `alpha` dist-tag. APIs may still shift before
159
+ stable v2.0.0. Design in
160
+ [`.notes/archive/tech-architecture.spec.md`](../../.notes/archive/tech-architecture.spec.md).