@darkrei08/setup-ai 3.0.5 → 3.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 +35 -28
- package/bin/setup-ai.mjs +48 -23
- package/package.json +4 -3
- package/setup-ai.ps1 +618 -127
- package/setup-ai.sh +592 -207
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),
|
|
7
|
-
[
|
|
8
|
-
[Engineering Excellence](https://github.com/
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
71
|
-
|
|
72
|
-
`
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
pi
|
|
79
|
-
pi
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
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
|
|
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
|
|
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,22 @@ 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
|
|
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: "
|
|
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
|
|
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
|
+
{ name: "rotator", core: false, desc: "tuxevil-rotator multi-account Gemini/Antigravity gateway (optional, opt-in)" },
|
|
47
48
|
];
|
|
48
49
|
|
|
49
50
|
// dotenv is Linux-only; drop it from the Windows menu.
|
|
@@ -54,7 +55,11 @@ const argv = process.argv.slice(2);
|
|
|
54
55
|
const has = (f) => argv.includes(f);
|
|
55
56
|
const getVal = (f) => {
|
|
56
57
|
const i = argv.indexOf(f);
|
|
57
|
-
if (i >= 0
|
|
58
|
+
if (i >= 0) {
|
|
59
|
+
const value = argv[i + 1];
|
|
60
|
+
if (value && !value.startsWith("-")) return value;
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
58
63
|
const eq = argv.find((a) => a.startsWith(f + "="));
|
|
59
64
|
return eq ? eq.split("=").slice(1).join("=") : null;
|
|
60
65
|
};
|
|
@@ -74,16 +79,21 @@ function runScript(passArgs) {
|
|
|
74
79
|
const child = spawn(cmd, cmdArgs, { stdio: "inherit" });
|
|
75
80
|
child.on("error", (err) => {
|
|
76
81
|
if (isWin && cmd === "pwsh") {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
fb.on("exit", (c) => process.exit(c ?? 0));
|
|
81
|
-
return;
|
|
82
|
+
console.error("PowerShell 7.3+ is required to run setup-ai.ps1. Install PowerShell 7.3 or newer and retry.");
|
|
83
|
+
} else {
|
|
84
|
+
console.error(`Failed to launch installer: ${err.message}`);
|
|
82
85
|
}
|
|
83
|
-
console.error(`Failed to launch installer: ${err.message}`);
|
|
84
86
|
process.exit(1);
|
|
85
87
|
});
|
|
86
|
-
child.on("exit", (code) =>
|
|
88
|
+
child.on("exit", (code, signal) => {
|
|
89
|
+
// A signal-terminated child reports code === null; that is a failure, not
|
|
90
|
+
// success, so never collapse it to 0.
|
|
91
|
+
if (code === null) {
|
|
92
|
+
console.error(`Installer terminated by signal ${signal ?? "unknown"}.`);
|
|
93
|
+
process.exit(1);
|
|
94
|
+
}
|
|
95
|
+
process.exit(code);
|
|
96
|
+
});
|
|
87
97
|
}
|
|
88
98
|
|
|
89
99
|
// Translate a chosen module list into the platform script's flag.
|
|
@@ -104,7 +114,7 @@ function toScriptArgs(mode, csv) {
|
|
|
104
114
|
return [];
|
|
105
115
|
}
|
|
106
116
|
|
|
107
|
-
// ---- interactive multi-select
|
|
117
|
+
// ---- interactive multi-select ---------------------------------------------
|
|
108
118
|
function interactiveMenu() {
|
|
109
119
|
return new Promise((resolve, reject) => {
|
|
110
120
|
const items = menuModules.map((m) => ({ ...m, checked: m.core }));
|
|
@@ -138,10 +148,17 @@ function interactiveMenu() {
|
|
|
138
148
|
render(true);
|
|
139
149
|
|
|
140
150
|
const cleanup = () => {
|
|
141
|
-
|
|
151
|
+
let cleanupError = null;
|
|
152
|
+
try {
|
|
153
|
+
stdin.setRawMode(false);
|
|
154
|
+
} catch (err) {
|
|
155
|
+
cleanupError = err instanceof Error ? err : new Error(String(err));
|
|
156
|
+
console.error(`Could not restore terminal mode: ${cleanupError.message}`);
|
|
157
|
+
}
|
|
142
158
|
stdin.pause();
|
|
143
159
|
stdin.removeListener("data", onData);
|
|
144
160
|
stdin.removeListener("end", onEnd);
|
|
161
|
+
return cleanupError;
|
|
145
162
|
};
|
|
146
163
|
|
|
147
164
|
// If stdin closes before a choice (e.g. npx consumed it), fall back instead
|
|
@@ -187,8 +204,16 @@ async function main() {
|
|
|
187
204
|
if (has("--list")) return runScript(toScriptArgs("list"));
|
|
188
205
|
if (has("--all")) return runScript(toScriptArgs("all"));
|
|
189
206
|
|
|
190
|
-
const
|
|
191
|
-
if (
|
|
207
|
+
const hasOnly = argv.some((arg) => arg === "--only" || arg.startsWith("--only="));
|
|
208
|
+
if (hasOnly) {
|
|
209
|
+
const only = getVal("--only");
|
|
210
|
+
if (!only || !only.trim()) {
|
|
211
|
+
console.error("--only requires a non-empty comma-separated module list.");
|
|
212
|
+
process.exitCode = 2;
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
return runScript(toScriptArgs("only", only));
|
|
216
|
+
}
|
|
192
217
|
|
|
193
218
|
if (has("--yes") || has("-y")) return runScript(toScriptArgs("yes"));
|
|
194
219
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@darkrei08/setup-ai",
|
|
3
|
-
"version": "3.0
|
|
4
|
-
"description": "Cross-OS installer for an AI coding toolchain (pi, codex, antigravity, opencode, herdr, gentle-ai,
|
|
3
|
+
"version": "3.3.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
|
-
"
|
|
35
|
+
"gga",
|
|
36
|
+
"mcp",
|
|
36
37
|
"engineering-excellence",
|
|
37
38
|
"setup"
|
|
38
39
|
],
|