@eventmodelers/cli 1.0.12 → 1.0.13

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.
Files changed (3) hide show
  1. package/README.md +4 -1
  2. package/cli.js +13 -2
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -312,13 +312,16 @@ npx @eventmodelers/cli listen --port 4000 # same, on a different port
312
312
  ```bash
313
313
  npx @eventmodelers/cli re-init # refresh the installed build kit (.build-kit/) + its skills
314
314
  npx @eventmodelers/cli re-init --modeling # refresh the modeling kit (.agent-modeling-kit/) + its skills
315
+ npx @eventmodelers/cli re-init --stack supabase # override which stack to refresh from (manifest missing/stale, or switching stacks)
315
316
  ```
316
317
 
317
318
  `re-init` re-runs `init` against whichever stack `install-manifest.json` says was installed (no need to pass `--stack` again), but skips step 2 of `init` entirely — the root project scaffold (`package.json`, `src/`, `server.ts`, `docker-compose.yml`, etc.) and the root `CLAUDE.md` router are never touched. Use it after upgrading the CLI to pick up fixes to `ralph.js`/`ralph.sh`/skills without re-scaffolding a project you've since built on top of.
318
319
 
320
+ Pass `--stack <name>` to override the stack instead of relying on the manifest — useful if the manifest is missing/stale, or you want to point a `.build-kit` install at a different built-in stack's templates. It's mutually exclusive with `--modeling`.
321
+
319
322
  Credentials are left alone unless you pass `--force` — same rule `init` already follows when everything required is already configured. `--global` defaults to however skills were originally installed; pass it explicitly to move them.
320
323
 
321
- If the kit dir predates install-manifest.json tracking, or was installed via `init --git <url>` (a community/custom stack, not one of the built-in `STACKS` keys), `re-init` can't tell what to re-copy and tells you to re-run the original `init` command by hand instead.
324
+ If the kit dir predates install-manifest.json tracking, or was installed via `init --git <url>` (a community/custom stack, not one of the built-in `STACKS` keys), and you don't pass `--stack` yourself, `re-init` can't tell what to re-copy and tells you to re-run the original `init` command by hand instead.
322
325
 
323
326
  ### Uninstall
324
327
 
package/cli.js CHANGED
@@ -1635,12 +1635,23 @@ credentialFlags(program
1635
1635
  .command('re-init')
1636
1636
  .description('Refresh an already-installed kit from the current CLI version — re-copies skills and the kit dir (.build-kit or .agent-modeling-kit) so you pick up script/skill updates after upgrading. Unlike `init`, never touches the project root scaffold or the root CLAUDE.md router, and leaves existing credentials alone unless --force is passed.')
1637
1637
  .option('--modeling', 'Refresh the modeling kit (.agent-modeling-kit) instead of a build kit')
1638
+ .option('--stack <name>', `Override which stack to refresh from (${Object.keys(REINITIABLE_STACKS).join(', ')}) instead of the one recorded in install-manifest.json — use this when the manifest is missing/stale, or to switch a .build-kit install to a different stack`)
1638
1639
  .option('--global', 'Re-install skills into ~/.claude/skills/ instead of the project — defaults to however they were originally installed')
1639
1640
  .option('-f, --force', 'Re-prompt for credentials even if a config already has everything required — overwrites the existing config.json'))
1640
1641
  .action(async (opts, command) => {
1641
1642
  const globalOpts = command.optsWithGlobals();
1642
1643
  const targetDir = process.cwd();
1643
1644
 
1645
+ if (opts.modeling && opts.stack) {
1646
+ console.error('❌ --modeling and --stack are mutually exclusive — pick one.');
1647
+ process.exit(1);
1648
+ }
1649
+
1650
+ if (opts.stack && !REINITIABLE_STACKS[opts.stack]) {
1651
+ console.error(`❌ Unknown stack "${opts.stack}". Available: ${Object.keys(REINITIABLE_STACKS).join(', ')}`);
1652
+ process.exit(1);
1653
+ }
1654
+
1644
1655
  const kitDirName = opts.modeling ? MODELING_KIT.kitDirName : STACKS.node.kitDirName;
1645
1656
  const kitDir = join(targetDir, kitDirName);
1646
1657
 
@@ -1650,12 +1661,12 @@ credentialFlags(program
1650
1661
  }
1651
1662
 
1652
1663
  const manifest = readJsonSafe(join(kitDir, '.eventmodelers', 'install-manifest.json'));
1653
- const stackKey = opts.modeling ? MODELING_KIT.key : manifest.stack;
1664
+ const stackKey = opts.modeling ? MODELING_KIT.key : (opts.stack || manifest.stack);
1654
1665
  const stackCfg = stackKey ? REINITIABLE_STACKS[stackKey] : null;
1655
1666
 
1656
1667
  if (!stackCfg) {
1657
1668
  console.error(`❌ Can't tell which stack ${relative(targetDir, kitDir)} was installed from (${manifest.stack ? `"${manifest.stack}" isn't one re-init recognizes — likely a --git community stack` : 'its install manifest predates this tracking, or is missing'}).`);
1658
- console.error(' Re-run the original `init --git <url> --stack <name>` command by hand instead.');
1669
+ console.error(' Pass --stack <name> explicitly, or re-run the original `init --git <url> --stack <name>` command by hand instead.');
1659
1670
  process.exit(1);
1660
1671
  }
1661
1672
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eventmodelers/cli",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "description": "Eventmodelers CLI — real-time Claude agent + skills for Claude Code, for any stack (Node, Supabase, Axon, Cratis, or modeling-only)",
5
5
  "type": "module",
6
6
  "bin": {