@xluos/dev-assets-cli 0.2.0 → 0.3.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 CHANGED
@@ -124,6 +124,13 @@ dev-assets install-hooks codex --global # writes ~/.codex/hooks.jso
124
124
  dev-assets install-hooks claude --global # writes ~/.claude/settings.json
125
125
  ```
126
126
 
127
+ Install for both agents at once with `--all`:
128
+
129
+ ```bash
130
+ dev-assets install-hooks --all # both agents, repo-scoped
131
+ dev-assets install-hooks --all --global # both agents, user-level
132
+ ```
133
+
127
134
  Without a global CLI install, run via `npx` (downloads on demand):
128
135
 
129
136
  ```bash
package/bin/dev-assets.js CHANGED
@@ -157,8 +157,7 @@ function commandHook(positional, options) {
157
157
  runHookAction(action, repoRoot);
158
158
  }
159
159
 
160
- function commandInstallHooks(positional, options) {
161
- const agent = positional[0] || options.agent || "codex";
160
+ function installHooksForAgent(agent, options) {
162
161
  const isGlobal = Boolean(options.global);
163
162
  const template = loadJson(templatePathForAgent(agent));
164
163
  let targetPath;
@@ -177,13 +176,21 @@ function commandInstallHooks(positional, options) {
177
176
  writeJson(targetPath, merged);
178
177
  const report = { agent, scope, target: targetPath, events: Object.keys(template.hooks || {}) };
179
178
  if (repoRoot) report.repo_root = repoRoot;
180
- process.stdout.write(`${JSON.stringify(report, null, 2)}\n`);
179
+ return report;
180
+ }
181
+
182
+ function commandInstallHooks(positional, options) {
183
+ const isAll = Boolean(options.all);
184
+ const agents = isAll ? ["codex", "claude"] : [positional[0] || options.agent || "codex"];
185
+ const reports = agents.map((agent) => installHooksForAgent(agent, options));
186
+ process.stdout.write(`${JSON.stringify(isAll ? reports : reports[0], null, 2)}\n`);
181
187
  }
182
188
 
183
189
  function printHelp() {
184
190
  process.stdout.write(`Usage:
185
191
  dev-assets hook <session-start|pre-compact|stop|session-end> [--repo PATH]
186
192
  dev-assets install-hooks <codex|claude> [--repo PATH] [--global]
193
+ dev-assets install-hooks --all [--repo PATH] [--global]
187
194
 
188
195
  Environment:
189
196
  DEV_ASSETS_ROOT defaults to ${DEFAULT_STORAGE_ROOT}
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@xluos/dev-assets-cli",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "CLI for dev-assets hooks and repo-local setup",
5
5
  "license": "MIT",
6
6
  "scripts": {
7
7
  "check": "node scripts/npm/check-package.mjs",
8
8
  "build": "node scripts/npm/build-package.mjs",
9
9
  "pack:dry-run": "npm pack --dry-run",
10
- "publish:dry-run": "npm publish --access public --dry-run",
11
- "publish:npm": "npm publish --access public",
10
+ "publish:dry-run": "npm publish --access public --registry https://registry.npmjs.org --dry-run",
11
+ "publish:npm": "npm publish --access public --registry https://registry.npmjs.org",
12
12
  "prepublishOnly": "npm run check"
13
13
  },
14
14
  "bin": {