@darkrei08/setup-ai 3.0.5 → 3.2.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
@@ -3,9 +3,9 @@
3
3
  Cross-OS installer for an AI coding toolchain. One command bootstraps
4
4
  [pi](https://pi.dev), [Codex](https://github.com/openai/codex),
5
5
  [Antigravity](https://antigravity.google), [opencode](https://opencode.ai),
6
- [herdr](https://herdr.dev), [gentle-ai](https://github.com/Gentleman-Programming/gentle-ai),
7
- [Engram](https://github.com/Gentleman-Programming/engram) memory, and the
8
- [Engineering Excellence](https://github.com/micio86dev/Engineering-Excellence)
6
+ [herdr](https://herdr.dev),
7
+ [gentle-ai](https://github.com/Gentleman-Programming/gentle-ai), and the
8
+ [Engineering Excellence](https://github.com/darkrei08/Engineering-Excellence)
9
9
  skill — each via its **official, current** method for your OS.
10
10
 
11
11
  ## Quick start
@@ -26,7 +26,7 @@ npx @darkrei08/setup-ai --all # everything
26
26
  That's the whole thing. Three details worth knowing:
27
27
 
28
28
  - **Use the npm package above.** `npx github:darkrei08/setup-ai` also works, but many npm setups block git fetches (`EALLOWGIT`); the published package avoids that. Run it from any folder except the repo's own source dir.
29
- - **Windows PowerShell**: one command per line (no bash `\`). If node or git was just installed, open a **new terminal** so PATH refreshes.
29
+ - **Windows PowerShell 7.3+**: one command per line (no bash `\`). If node or git was just installed, open a **new terminal** so PATH refreshes.
30
30
  - **What it does**: detects your OS and runs `setup-ai.sh` (macOS/Linux) or `setup-ai.ps1` (Windows). `--list` shows modules; menu keys: ↑/↓ move · Space toggle · `a` all · Enter.
31
31
 
32
32
  ### npm vs npx
@@ -47,12 +47,11 @@ For a one-time installer, `npx` is ideal — nothing is left behind.
47
47
  | Codex | `codex` | `brew install --cask codex` | `curl -fsSL https://chatgpt.com/codex/install.sh \| sh` | `irm https://chatgpt.com/codex/install.ps1 \| iex` |
48
48
  | pi | `pi` | `curl -fsSL https://pi.dev/install.sh \| sh` | same | `irm https://pi.dev/install.ps1 \| iex` |
49
49
  | herdr | `herdr` | `brew install herdr` | `curl -fsSL https://herdr.dev/install.sh \| sh` | `irm https://herdr.dev/install.ps1 \| iex` |
50
+ | gentle-ai | `gentle-ai` / `gga` | `brew install gentleman-programming/tap/gentle-ai` | `curl -fsSL https://raw.githubusercontent.com/Gentleman-Programming/gentle-ai/main/scripts/install.sh \| bash` | `irm https://raw.githubusercontent.com/Gentleman-Programming/gentle-ai/main/scripts/install.ps1 \| iex` |
50
51
  | Go | `go` | `brew install go` | distro pkg | `winget install -e --id GoLang.Go` |
51
- | gentle-ai | `gentle-ai` | `brew install gentleman-programming/tap/gentle-ai` | `curl -fsSL .../scripts/install.sh \| bash` | `go install github.com/gentleman-programming/gentle-ai/v2/cmd/gentle-ai@latest` |
52
- | Engram | `engram` | `brew install gentleman-programming/tap/engram` | `go install github.com/Gentleman-Programming/engram/cmd/engram@latest` | same (go install) |
53
52
  | opencode | `opencode` | `brew install anomalyco/tap/opencode` | `curl -fsSL https://opencode.ai/install \| bash` | `npm i -g opencode-ai` |
54
53
  | cockpit-tools *(opt-in GUI)* | app | `brew install --cask cockpit-tools` | `.deb`/`.rpm`/`.AppImage` | `.msi` |
55
- | Engineering Excellence | skill | `npx skills@latest add micio86dev/Engineering-Excellence --agent <agent>` | same | same |
54
+ | Engineering Excellence | skill | `npx skills@latest add darkrei08/Engineering-Excellence --agent <agent>` | same | same |
56
55
 
57
56
  ## Modules
58
57
 
@@ -60,30 +59,38 @@ Run `--list` to see them. Core modules install by default; optional ones
60
59
  (GUI apps) only via `--all` or an explicit `--only`.
61
60
 
62
61
  ```
63
- base node bun pi go dotenv ee pi-workflows herdr gentle-ai engram codex antigravity opencode [cockpit]
62
+ base node bun pi go dotenv ee skills pi-workflows herdr gentle-ai codex antigravity opencode [cockpit]
64
63
  ```
65
64
 
66
- - **dotenv** is Linux-only (it runs vekexasia/dotenv's apt/pacman `setup_env.sh`).
65
+ - **dotenv** is Linux-only (it runs vekexasia/dotenv's apt/pacman `setup_env.sh`); on Windows, explicit selection or `-All` logs and skips it.
67
66
  - **ee** installs the Engineering Excellence skill for every detected agent
68
- (pi, claude, gemini, cursor, antigravity) via `npx skills add`.
69
-
70
- ## Engram in pi (the gotcha)
71
-
72
- `gentle-engram` is an **in-process pi extension** that auto-starts `engram serve`.
73
- It therefore needs the **Engram Go binary on `PATH`** — if it's missing, the
74
- extension loads but silently does nothing (the "engram doesn't work in pi"
75
- symptom). The `engram` module installs the binary first, then:
76
-
77
- ```bash
78
- pi install npm:gentle-engram
79
- pi install npm:pi-mcp-adapter # optional MCP gateway
80
- pi-engram init
81
- # then RESTART pi, and verify:
82
- # mem_current_project mem_doctor engram tui
83
- ```
84
-
85
- MCP is only an optional gateway — the primary path for pi is the in-process
86
- extension, so don't rely on the MCP-only choice.
67
+ (pi, claude, gemini, cursor, antigravity, codex, opencode) via `npx skills add`.
68
+ - **skills** installs vekexasia/dotenv's agent-skill stack on **every OS** via
69
+ `npx skills add` (dotenv itself is Linux-only): `herdr` (herdrdev/herdr);
70
+ `triage grill-me grilling wayfinder domain-modeling prototype research`
71
+ (mattpocock/skills); `typescript-advanced` (pedronauck/skills); `show-me`
72
+ (humanlayer/skills) for every detected agent. `skills add --copy` is
73
+ idempotent, so it's safe alongside the Linux `dotenv` run.
74
+ - **gentle-ai** installs the gentle-ai / `gga` ecosystem configurator, then runs
75
+ `gentle-ai install` — its own **interactive per-agent/per-IDE selector** (Pi,
76
+ Claude Code, Cursor, Codex, ...) that also wires each selected agent's **MCP**
77
+ servers, so the tools show up under `/mcp`. For pi it additionally installs the
78
+ first-class `gentle-pi` harness and `pi-mcp-adapter`, so pi reads gentle-ai in
79
+ its own MCP list. The interactive selector runs only with a real TTY;
80
+ non-interactive/CI runs log the exact `gentle-ai install` command instead of
81
+ hanging. Idempotent: safe to re-run.
82
+
83
+ ## pi workflows (pi-extensible-workflows)
84
+
85
+ **Italiano** Il modulo `pi-workflows` installa l'estensione pi per i workflow. Per
86
+ installazione completa, pacchetti opzionali (`@piewf/cli`, `@piewf/herdr`), integrazione
87
+ Herdr, picker `/workflow`, tool `workflow`, selezione modelli, ruoli/alias e Neovim, vedi
88
+ la guida bilingue: [docs/pi-workflows-guide.md](docs/pi-workflows-guide.md).
89
+
90
+ **English** — The `pi-workflows` module installs the pi workflows extension. For full
91
+ install, optional packages (`@piewf/cli`, `@piewf/herdr`), Herdr integration, the
92
+ `/workflow` picker, the `workflow` tool, model selection, roles/aliases, and Neovim, see
93
+ the bilingual guide: [docs/pi-workflows-guide.md](docs/pi-workflows-guide.md).
87
94
 
88
95
  ## OpenCode Go inside pi
89
96
 
package/bin/setup-ai.mjs CHANGED
@@ -3,10 +3,10 @@
3
3
  // AI Dev Suite — cross-OS launcher
4
4
  //
5
5
  // Detects the OS and runs the right installer script:
6
- // win32 -> setup-ai.ps1 (via pwsh, falling back to powershell)
6
+ // win32 -> setup-ai.ps1 (via PowerShell 7.3+)
7
7
  // darwin / linux -> setup-ai.sh (via bash)
8
8
  //
9
- // With no selection flag on an interactive terminal it shows a gentle-ai-style
9
+ // With no selection flag on an interactive terminal it shows an arrow-key
10
10
  // arrow-key multi-select menu, then passes the chosen modules to the platform
11
11
  // script as --only. Zero runtime dependencies.
12
12
  //
@@ -29,21 +29,21 @@ const PKG_ROOT = join(__dirname, "..");
29
29
  // Canonical module list (mirrors the registries in setup-ai.sh / setup-ai.ps1).
30
30
  // core:false => optional (unchecked by default in the menu).
31
31
  const MODULES = [
32
- { name: "base", core: true, desc: "System dev tools (git, gh, python, neovim, ...)" },
33
- { name: "node", core: true, desc: "Node.js + npm@latest" },
32
+ { name: "base", core: true, desc: "System packages (build tools, git, gh, python, neovim, jq, imagemagick, go)" },
33
+ { name: "node", core: true, desc: "Node.js v22 + npm@latest (nvm on Unix, winget on Windows)" },
34
34
  { name: "bun", core: true, desc: "Bun runtime" },
35
35
  { name: "pi", core: true, desc: "pi.dev coding agent CLI" },
36
36
  { name: "go", core: true, desc: "Go toolchain" },
37
- { name: "dotenv", core: true, desc: "vekexasia/dotenv dotfiles (Linux only)" },
38
- { name: "ee", core: true, desc: "Engineering Excellence skill (all agents)" },
39
- { name: "pi-workflows", core: true, desc: "pi-extensible-workflows resolution fix" },
37
+ { name: "dotenv", core: true, desc: "vekexasia/dotenv dotfiles (Linux only: clones + runs setup_env.sh)" },
38
+ { name: "ee", core: true, desc: "Engineering Excellence skill (npx skills add, all detected agents)" },
39
+ { name: "skills", core: true, desc: "Upstream agent skills (herdr, grilling, research, typescript-advanced, show-me, ...) via npx skills add" },
40
+ { name: "pi-workflows", core: true, desc: "pi-extensible-workflows (fix module resolution for pi extensions)" },
40
41
  { name: "herdr", core: true, desc: "herdr terminal multiplexer" },
41
- { name: "gentle-ai", core: true, desc: "gentle-ai / gga + gentle-pi package" },
42
- { name: "engram", core: true, desc: "Engram persistent memory for pi" },
42
+ { name: "gentle-ai", core: true, desc: "gentle-ai / gga ecosystem configurator (per-agent select + MCP) + gentle-pi" },
43
43
  { name: "codex", core: true, desc: "OpenAI Codex CLI" },
44
44
  { name: "antigravity", core: true, desc: "Google Antigravity CLI (agy)" },
45
- { name: "opencode", core: true, desc: "opencode agent CLI" },
46
- { name: "cockpit", core: false, desc: "cockpit-tools desktop GUI (optional)" },
45
+ { name: "opencode", core: true, desc: "opencode agent CLI (opencode-ai)" },
46
+ { name: "cockpit", core: false, desc: "cockpit-tools desktop GUI app (optional, CC BY-NC-SA)" },
47
47
  ];
48
48
 
49
49
  // dotenv is Linux-only; drop it from the Windows menu.
@@ -54,7 +54,11 @@ const argv = process.argv.slice(2);
54
54
  const has = (f) => argv.includes(f);
55
55
  const getVal = (f) => {
56
56
  const i = argv.indexOf(f);
57
- if (i >= 0 && argv[i + 1]) return argv[i + 1];
57
+ if (i >= 0) {
58
+ const value = argv[i + 1];
59
+ if (value && !value.startsWith("-")) return value;
60
+ return null;
61
+ }
58
62
  const eq = argv.find((a) => a.startsWith(f + "="));
59
63
  return eq ? eq.split("=").slice(1).join("=") : null;
60
64
  };
@@ -74,16 +78,21 @@ function runScript(passArgs) {
74
78
  const child = spawn(cmd, cmdArgs, { stdio: "inherit" });
75
79
  child.on("error", (err) => {
76
80
  if (isWin && cmd === "pwsh") {
77
- // Fall back to Windows PowerShell 5.
78
- const ps1 = join(PKG_ROOT, "setup-ai.ps1");
79
- const fb = spawn("powershell", ["-NoProfile", "-ExecutionPolicy", "Bypass", "-File", ps1, ...passArgs], { stdio: "inherit" });
80
- fb.on("exit", (c) => process.exit(c ?? 0));
81
- return;
81
+ console.error("PowerShell 7.3+ is required to run setup-ai.ps1. Install PowerShell 7.3 or newer and retry.");
82
+ } else {
83
+ console.error(`Failed to launch installer: ${err.message}`);
82
84
  }
83
- console.error(`Failed to launch installer: ${err.message}`);
84
85
  process.exit(1);
85
86
  });
86
- child.on("exit", (code) => process.exit(code ?? 0));
87
+ child.on("exit", (code, signal) => {
88
+ // A signal-terminated child reports code === null; that is a failure, not
89
+ // success, so never collapse it to 0.
90
+ if (code === null) {
91
+ console.error(`Installer terminated by signal ${signal ?? "unknown"}.`);
92
+ process.exit(1);
93
+ }
94
+ process.exit(code);
95
+ });
87
96
  }
88
97
 
89
98
  // Translate a chosen module list into the platform script's flag.
@@ -104,7 +113,7 @@ function toScriptArgs(mode, csv) {
104
113
  return [];
105
114
  }
106
115
 
107
- // ---- interactive multi-select (gentle-ai style) ---------------------------
116
+ // ---- interactive multi-select ---------------------------------------------
108
117
  function interactiveMenu() {
109
118
  return new Promise((resolve, reject) => {
110
119
  const items = menuModules.map((m) => ({ ...m, checked: m.core }));
@@ -138,10 +147,17 @@ function interactiveMenu() {
138
147
  render(true);
139
148
 
140
149
  const cleanup = () => {
141
- try { stdin.setRawMode(false); } catch { /* ignore */ }
150
+ let cleanupError = null;
151
+ try {
152
+ stdin.setRawMode(false);
153
+ } catch (err) {
154
+ cleanupError = err instanceof Error ? err : new Error(String(err));
155
+ console.error(`Could not restore terminal mode: ${cleanupError.message}`);
156
+ }
142
157
  stdin.pause();
143
158
  stdin.removeListener("data", onData);
144
159
  stdin.removeListener("end", onEnd);
160
+ return cleanupError;
145
161
  };
146
162
 
147
163
  // If stdin closes before a choice (e.g. npx consumed it), fall back instead
@@ -187,8 +203,16 @@ async function main() {
187
203
  if (has("--list")) return runScript(toScriptArgs("list"));
188
204
  if (has("--all")) return runScript(toScriptArgs("all"));
189
205
 
190
- const only = getVal("--only");
191
- if (only) return runScript(toScriptArgs("only", only));
206
+ const hasOnly = argv.some((arg) => arg === "--only" || arg.startsWith("--only="));
207
+ if (hasOnly) {
208
+ const only = getVal("--only");
209
+ if (!only || !only.trim()) {
210
+ console.error("--only requires a non-empty comma-separated module list.");
211
+ process.exitCode = 2;
212
+ return;
213
+ }
214
+ return runScript(toScriptArgs("only", only));
215
+ }
192
216
 
193
217
  if (has("--yes") || has("-y")) return runScript(toScriptArgs("yes"));
194
218
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@darkrei08/setup-ai",
3
- "version": "3.0.5",
4
- "description": "Cross-OS installer for an AI coding toolchain (pi, codex, antigravity, opencode, herdr, gentle-ai, engram, Engineering Excellence) with an interactive module menu.",
3
+ "version": "3.2.0",
4
+ "description": "Cross-OS installer for an AI coding toolchain (pi, codex, antigravity, opencode, herdr, gentle-ai/gga, Engineering Excellence) with an interactive module menu and per-agent MCP registration.",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "setup-ai": "bin/setup-ai.mjs"
@@ -32,7 +32,8 @@
32
32
  "opencode",
33
33
  "antigravity",
34
34
  "gentle-ai",
35
- "engram",
35
+ "gga",
36
+ "mcp",
36
37
  "engineering-excellence",
37
38
  "setup"
38
39
  ],