rpi-kit 1.4.0 → 1.4.1

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/bin/cli.js CHANGED
@@ -25,6 +25,11 @@ function hasCodex() {
25
25
  return result.status === 0;
26
26
  }
27
27
 
28
+ function hasGeminiCLI() {
29
+ const result = spawnSync("gemini", ["--version"], { stdio: "pipe" });
30
+ return result.status === 0;
31
+ }
32
+
28
33
  function installClaude() {
29
34
  log("Installing RPIKit for Claude Code...");
30
35
  try {
@@ -62,6 +67,12 @@ function installCodex() {
62
67
  return true;
63
68
  }
64
69
 
70
+ function installGeminiCLI() {
71
+ log("Installing RPIKit for Gemini CLI...");
72
+ log("Gemini CLI: coming soon. Please see documentation for manual setup.");
73
+ return true;
74
+ }
75
+
65
76
  function uninstallClaude() {
66
77
  log("Removing RPIKit from Claude Code...");
67
78
  try {
@@ -81,14 +92,15 @@ function printHelp() {
81
92
  RPIKit — Research → Plan → Implement
82
93
 
83
94
  Usage:
84
- rpi-kit install Install for detected tools (Claude Code + Codex)
95
+ rpi-kit install Interactive setup for AI tools
85
96
  rpi-kit install --claude Install for Claude Code only
86
97
  rpi-kit install --codex Install for Codex only (copies AGENTS.md to cwd)
98
+ rpi-kit install --gemini Install for Gemini CLI only
87
99
  rpi-kit uninstall Remove from Claude Code
88
100
  rpi-kit onboarding Interactive walkthrough of the workflow
89
101
  rpi-kit help Show this help
90
102
 
91
- After install, use in Claude Code:
103
+ After install, use in Claude Code or Gemini CLI:
92
104
  /rpi:init Configure for your project
93
105
  /rpi:new <feature> Start a new feature
94
106
  /rpi:research <feature> Research feasibility
@@ -99,61 +111,139 @@ After install, use in Claude Code:
99
111
  `);
100
112
  }
101
113
 
102
- switch (command) {
103
- case "install": {
104
- const claudeOnly = flags.includes("--claude");
105
- const codexOnly = flags.includes("--codex");
114
+ async function run() {
115
+ switch (command) {
116
+ case "install": {
117
+ const claudeOnly = flags.includes("--claude");
118
+ const codexOnly = flags.includes("--codex");
119
+ const geminiOnly = flags.includes("--gemini");
106
120
 
107
- if (claudeOnly) {
108
- installClaude();
109
- } else if (codexOnly) {
110
- installCodex();
111
- } else {
112
- let installed = false;
121
+ if (claudeOnly) {
122
+ installClaude();
123
+ break;
124
+ }
125
+ if (codexOnly) {
126
+ installCodex();
127
+ break;
128
+ }
129
+ if (geminiOnly) {
130
+ installGeminiCLI();
131
+ break;
132
+ }
113
133
 
114
- if (hasClaude()) {
115
- installed = installClaude() || installed;
134
+ // If silent, use the original auto-install behavior
135
+ if (silent) {
136
+ let installed = false;
137
+ if (hasClaude()) installed = installClaude() || installed;
138
+ if (hasCodex()) installed = installCodex() || installed;
139
+ if (hasGeminiCLI()) installed = installGeminiCLI() || installed;
140
+ if (!installed) {
141
+ const result = installClaude();
142
+ if (!result) {
143
+ log("\nNo supported tool detected (claude, codex, gemini).");
144
+ log("Run manually after installing Claude Code, Codex, or Gemini CLI:");
145
+ log(" rpi-kit install --claude");
146
+ log(" rpi-kit install --codex");
147
+ log(" rpi-kit install --gemini");
148
+ }
149
+ }
150
+ break;
116
151
  }
117
152
 
118
- if (hasCodex()) {
119
- installed = installCodex() || installed;
153
+ // Interactive prompt
154
+ let p;
155
+ let color;
156
+ try {
157
+ p = await import("@clack/prompts");
158
+ color = (await import("picocolors")).default;
159
+ } catch (e) {
160
+ console.error("Failed to load interactive prompt dependencies. Falling back to default install.");
161
+ let installed = false;
162
+ if (hasClaude()) installed = installClaude() || installed;
163
+ if (hasCodex()) installed = installCodex() || installed;
164
+ if (!installed) installClaude();
165
+ break;
120
166
  }
121
167
 
122
- if (!installed && !silent) {
123
- const result = installClaude();
124
- if (!result) {
125
- log("\nNo supported tool detected (claude, codex).");
126
- log("Run manually after installing Claude Code or Codex:");
127
- log(" rpi-kit install --claude");
128
- log(" rpi-kit install --codex");
168
+ console.clear();
169
+ p.intro(color.bgCyan(color.black(" RPIKit Setup ")));
170
+
171
+ p.log.message(color.dim("RPIKit configured: Claude Code, Codex, Gemini CLI"));
172
+
173
+ const options = [
174
+ { value: "claude", label: "Claude Code", hint: hasClaude() ? "detected" : "" },
175
+ { value: "codex", label: "Codex", hint: hasCodex() ? "detected" : "" },
176
+ { value: "gemini", label: "Gemini CLI", hint: hasGeminiCLI() ? "detected" : "" }
177
+ ];
178
+
179
+ const initialValues = options.filter(o => o.hint === "detected").map(o => o.value);
180
+ if (initialValues.length === 0) {
181
+ initialValues.push("claude"); // default selection if none detected
182
+ }
183
+
184
+ const selectedTools = await p.multiselect({
185
+ message: `Select tools to set up (${options.length} available)`,
186
+ options: options,
187
+ initialValues,
188
+ required: false
189
+ });
190
+
191
+ if (p.isCancel(selectedTools)) {
192
+ p.cancel("Setup cancelled.");
193
+ process.exit(0);
194
+ }
195
+
196
+ if (selectedTools.length === 0) {
197
+ p.outro("No tools selected.");
198
+ break;
199
+ }
200
+
201
+ console.log(); // Spacing
202
+
203
+ let installed = false;
204
+ for (const tool of selectedTools) {
205
+ if (tool === "claude") {
206
+ installed = installClaude() || installed;
207
+ } else if (tool === "codex") {
208
+ installed = installCodex() || installed;
209
+ } else if (tool === "gemini") {
210
+ installed = installGeminiCLI() || installed;
129
211
  }
130
212
  }
131
213
 
132
- if (installed && !silent) {
133
- log("");
134
- log("New to RPIKit? Run: rpi-kit onboarding");
214
+ if (installed) {
215
+ console.log();
216
+ p.outro(color.green("Setup complete! New to RPIKit? Run: rpi-kit onboarding"));
217
+ } else {
218
+ p.outro(color.yellow("Setup finished with some issues."));
135
219
  }
220
+
221
+ break;
136
222
  }
137
- break;
138
- }
139
223
 
140
- case "onboarding": {
141
- const { run } = require("./onboarding");
142
- run();
143
- break;
144
- }
224
+ case "onboarding": {
225
+ const { run } = require("./onboarding");
226
+ run();
227
+ break;
228
+ }
145
229
 
146
- case "uninstall":
147
- uninstallClaude();
148
- break;
230
+ case "uninstall":
231
+ uninstallClaude();
232
+ break;
149
233
 
150
- case "help":
151
- case "--help":
152
- case "-h":
153
- printHelp();
154
- break;
234
+ case "help":
235
+ case "--help":
236
+ case "-h":
237
+ printHelp();
238
+ break;
155
239
 
156
- default:
157
- if (!silent) printHelp();
158
- break;
240
+ default:
241
+ if (!silent) printHelp();
242
+ break;
243
+ }
159
244
  }
245
+
246
+ run().catch((err) => {
247
+ console.error(err);
248
+ process.exit(1);
249
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rpi-kit",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "Research → Plan → Implement. A systematic feature development workflow for Claude Code.",
5
5
  "license": "MIT",
6
6
  "author": "Daniel Mendes",
@@ -35,5 +35,9 @@
35
35
  "scripts": {
36
36
  "test": "node --test test/cli.test.js test/commands.test.js",
37
37
  "postinstall": "node bin/cli.js install --silent"
38
+ },
39
+ "dependencies": {
40
+ "@clack/prompts": "^1.1.0",
41
+ "picocolors": "^1.1.1"
38
42
  }
39
43
  }