protovibe 1.1.10 → 1.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.
Files changed (3) hide show
  1. package/README.md +307 -307
  2. package/dist/index.mjs +55 -28
  3. package/package.json +51 -52
package/README.md CHANGED
@@ -1,307 +1,307 @@
1
- # ProtoVibe
2
-
3
- > Vibecode your prototypes.
4
-
5
- ProtoVibe is a globally installable CLI launchpad built on top of [Claude Code](https://claude.ai/code). It gives you a **structured, guided workflow** for turning a rough idea into a fully scoped, spec'd, and initialized project — before a single line of code is written.
6
-
7
- It makes **zero AI calls itself**. All intelligence comes from Claude Code, which ProtoVibe launches and drives through a 7-stage workflow. ProtoVibe also **auto-updates itself** every time you run it — you never need to reinstall manually.
8
-
9
- ---
10
-
11
- ## Who is this for?
12
-
13
- - Developers who want to **go from idea to structured specs** before building
14
- - Anyone who finds it hard to **think through requirements** clearly on their own
15
- - Builders who want Claude Code to have a **complete understanding of the project** before writing code
16
- - Teams who want a **repeatable, consistent project kickoff** process
17
-
18
- ---
19
-
20
- ## Prerequisites
21
-
22
- Before installing ProtoVibe, make sure you have:
23
-
24
- - **Node.js v18+** — [nodejs.org](https://nodejs.org)
25
- - **Claude Code** — install it with:
26
- ```bash
27
- npm install -g @anthropic-ai/claude-code
28
- ```
29
- Then run `claude` once and log in. ProtoVibe checks your credentials automatically.
30
-
31
- ---
32
-
33
- ## Install
34
-
35
- ProtoVibe is a CLI tool and **must be installed globally** to work:
36
-
37
- ```bash
38
- npm install -g protovibe
39
- ```
40
-
41
- > **Note:** The npm page shows `npm i protovibe` — that is a local install and the `protovibe` command will not be found. Always use the `-g` flag.
42
-
43
- ProtoVibe checks for newer versions on every run and updates itself automatically. You only ever need to install it once.
44
-
45
- ### No install? Use npx
46
-
47
- Run ProtoVibe directly from any directory without a permanent install:
48
-
49
- ```bash
50
- npx protovibe
51
- ```
52
-
53
- This always fetches and runs the latest version on the fly.
54
-
55
- ---
56
-
57
- ## How to use it
58
-
59
- ```bash
60
- protovibe
61
- ```
62
-
63
- The boot screen renders instantly. Auth is verified automatically. Then you choose your mode:
64
-
65
- ```
66
- ◆ What would you like to do?
67
- │ ● Start a new project
68
- │ ○ Continue with an existing project
69
- ```
70
-
71
- ---
72
-
73
- ## Path A — New project
74
-
75
- 1. **Enter a project name** — letters, numbers, hyphens, underscores only
76
- 2. **Browse to a parent directory** — interactive folder browser starting from your home directory
77
- 3. ProtoVibe creates the project folder and writes the workflow files into it
78
- 4. A launch prompt appears:
79
-
80
- ```
81
- ╭──────────────────────────────────────────╮
82
- │ │
83
- │ Claude Code is loading your project. │
84
- │ │
85
- │ Type "Hello" or "What's up?" to begin. │
86
- │ │
87
- ╰──────────────────────────────────────────╯
88
- ```
89
-
90
- 5. Claude Code opens. Type anything — the ProtoVibe workflow starts immediately.
91
-
92
- ### If the project name already exists
93
-
94
- ```
95
- ✗ A project named 'my-app' already exists at this location.
96
- ◆ What would you like to do?
97
- │ ● Choose a different name for my new project
98
- │ ○ Continue with the existing project
99
- ```
100
-
101
- - **Choose a different name** — re-enter the name, same folder stays selected
102
- - **Continue with the existing project** — ProtoVibe writes the workflow files to the existing folder, Claude opens and starts the workflow fresh
103
-
104
- ---
105
-
106
- ## Path B — Existing project
107
-
108
- 1. **Enter the full path** to your existing project folder (supports `~` shorthand)
109
- 2. ProtoVibe writes an `/analyse` command into the project
110
- 3. Claude Code opens, silently reads all files, and presents a structured summary:
111
-
112
- ```
113
- Project: my-app
114
- What it does: A client portal for agencies to manage deliverables and feedback.
115
- Tech Stack: Next.js, TypeScript, Supabase, Tailwind CSS
116
- Key Features:
117
- - Client login and dashboard
118
- - File upload and approval workflow
119
- - Comment threads per deliverable
120
- - Email notifications on status change
121
- Project Structure: App router in src/app/, shared components in src/components/,
122
- Supabase client in src/lib/. API routes handle upload and notification logic.
123
- Current State: Partially built — auth and dashboard complete, approval flow in progress.
124
- ```
125
-
126
- 4. Claude says: *"I've analysed your project. I'm ready to help — what would you like to work on?"*
127
- 5. You drive from here. No workflow constraints — Claude works normally.
128
-
129
- ---
130
-
131
- ## The 7-Stage Workflow (new project path)
132
-
133
- After Claude opens, type anything. Claude's first response is always:
134
-
135
- ```
136
- Welcome to ProtoVibe. What would you like to do?
137
-
138
- 1. Build from scratch — start a new project
139
- 2. Work on an existing project — analyse and enhance an existing codebase
140
- ```
141
-
142
- Choose **1** to begin:
143
-
144
- ### Stage 1 — Idea Capture
145
- Claude asks: *"Describe the idea for your project."*
146
- Speak naturally. No format required.
147
-
148
- ### Stage 2 — Interactive Requirements Probing
149
-
150
- Claude first silently analyses your idea, then asks requirements questions as **interactive cards** — you click an option or type your own. No long-form typing required.
151
-
152
- Questions are asked in 3 batches:
153
-
154
- **Batch 1 — Core context**
155
- - Who are the primary users?
156
- - What platform is this for? *(Web, Mobile, Desktop, CLI)*
157
- - Is user authentication required?
158
- - How would you describe the scale at launch?
159
-
160
- **Batch 2 — Features & data**
161
- - What data does this app create or store? *(multi-select)*
162
- - Any third-party integrations needed? *(multi-select)*
163
- - Does the app need real-time features?
164
-
165
- **Batch 3 — Constraints**
166
- - Do you have a preferred tech stack?
167
- - What is your timeline for an MVP?
168
- - Any specific requirements? *(multi-select)*
169
-
170
- Options are generated from your idea — not generic defaults. Each question has a recommended answer and an "Other" option to type anything.
171
-
172
- If anything is still unclear after your answers, Claude asks targeted follow-up questions the same way. Then it presents a full structured summary and asks you to confirm before moving on.
173
-
174
- ### Stage 3 — Architecture Options
175
-
176
- Claude proposes **3 distinct architectural approaches**, each with:
177
- - Full tech stack (frontend, backend, database, auth, hosting)
178
- - How the system works end-to-end
179
- - Tradeoffs — what it's best for and what it sacrifices
180
-
181
- Then presents them as **clickable cards** — pick one, or choose "Custom approach" to describe your own. The recommended option is labeled clearly.
182
-
183
- ### Stage 4 — Option Confirmation
184
- If you pick a custom approach, Claude evaluates it against your requirements and flags any risks before proceeding.
185
-
186
- ### Stage 5 — Specs File
187
- Claude asks for confirmation, then writes `specs.md` in your project root containing:
188
- - App overview and target audience
189
- - Feature list with priority labels: **P0** (MVP must-have), **P1** (important), **P2** (nice to have)
190
- - Complete user flow — every journey, primary and alternate paths
191
- - Tech stack with one-line justification per technology
192
- - Data model — entities, fields, relationships
193
- - Integration notes
194
- - Constraints and non-functional requirements
195
-
196
- ### Stage 6 — Initialization
197
- Claude silently replaces the placeholder `CLAUDE.md` with a project-specific one generated by `/init`, so it carries full project context going forward. Nothing is asked — it just happens.
198
-
199
- ### Stage 7 — Handoff
200
- Claude says: *"Your project is fully scoped and ready to build. Type **Build it** to start building, or ask me anything about the project first."*
201
-
202
- From here, Claude Code builds your project according to `specs.md`, starting with P0 features.
203
-
204
- ---
205
-
206
- ## Commands
207
-
208
- These are available at any time inside Claude Code during or after the workflow:
209
-
210
- | Command | What it does |
211
- |---|---|
212
- | `/takeover` | Exit the ProtoVibe workflow. Claude summarises everything captured so far and works normally with no constraints. |
213
- | `/summarise` | Plain-language summary of progress — what's been decided, what's been done, and what comes next. Capped at 10 bullets. |
214
- | `/protovibe` | Restart the workflow from Stage 0. |
215
-
216
- ---
217
-
218
- ## Auto-update
219
-
220
- Every time you run `protovibe`, it silently checks the npm registry. If a newer version is available, it:
221
- 1. Prints: `Updating ProtoVibe x.x.x → x.x.x...`
222
- 2. Installs the latest version globally
223
- 3. Re-launches itself automatically
224
-
225
- If you're offline, it skips the check and boots normally.
226
-
227
- ---
228
-
229
- ## What gets written to your project
230
-
231
- ### New project
232
- ```
233
- <your-project>/
234
- ├── CLAUDE.md # Instructs Claude to run the ProtoVibe workflow on first message
235
- └── .claude/
236
- └── commands/
237
- ├── protovibe.md # Full 7-stage workflow definition
238
- ├── takeover.md # /takeover command definition
239
- └── summarise.md # /summarise command definition
240
- ```
241
-
242
- After Stage 5: `specs.md` is added to the root.
243
- After Stage 6: `CLAUDE.md` is replaced with a project-specific version by `/init`.
244
-
245
- ### Existing project
246
- ```
247
- <your-project>/
248
- ├── CLAUDE.md # Instructs Claude to run /analyse on startup
249
- └── .claude/
250
- └── commands/
251
- └── analyse.md # /analyse command — reads all files and presents a summary
252
- ```
253
-
254
- ---
255
-
256
- ## What it looks like
257
-
258
- Boot screen (renders in under 100ms):
259
-
260
- ```
261
- ██╗ ██╗██╗██████╗ ███████╗██████╗ ██████╗ ██████╗
262
- ██║ ██║██║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔═══██╗
263
- ██║ ██║██║██████╔╝█████╗ ██████╔╝██████╔╝██║ ██║
264
- ╚██╗ ██╔╝██║██╔══██╗██╔══╝ ██╔═══╝ ██╔══██╗██║ ██║
265
- ╚████╔╝ ██║██████╔╝███████╗██║ ██║ ██║╚██████╔╝
266
- ╚═══╝ ╚═╝╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═════╝
267
- ```
268
- *(rendered in a purple → blue gradient)*
269
-
270
- ```
271
- ╭──────────────────────────────────────────╮
272
- │ version 1.1.x │
273
- │ by razorgojo │
274
- │ powered by Claude Code │
275
- ├──────────────────────────────────────────┤
276
- │ Vibecode your prototypes. │
277
- ├──────────────────────────────────────────┤
278
- │ commands │
279
- │ /exit — quit ProtoVibe at any time │
280
- ╰──────────────────────────────────────────╯
281
- ```
282
-
283
- The logo automatically switches to a compact version on terminals narrower than 90 columns.
284
-
285
- ---
286
-
287
- ## Development
288
-
289
- ```bash
290
- git clone https://github.com/SomSamantray/VibePro-CLI.git
291
- cd VibePro-CLI
292
- npm install
293
- npm run build
294
- node dist/index.mjs # run locally without global install
295
- npm install -g . # install globally to test the protovibe command
296
- ```
297
-
298
- | Command | Description |
299
- |---|---|
300
- | `npm run build` | Compile TypeScript → `dist/` via tsup |
301
- | `npm run dev` | Watch mode — rebuilds on every file change |
302
-
303
- ---
304
-
305
- ## License
306
-
307
- MIT — see [LICENSE](./LICENSE)
1
+ # ProtoVibe
2
+
3
+ > Vibecode your prototypes.
4
+
5
+ ProtoVibe is a globally installable CLI launchpad built on top of [Claude Code](https://claude.ai/code). It gives you a **structured, guided workflow** for turning a rough idea into a fully scoped, spec'd, and initialized project — before a single line of code is written.
6
+
7
+ It makes **zero AI calls itself**. All intelligence comes from Claude Code, which ProtoVibe launches and drives through a 7-stage workflow. ProtoVibe also **auto-updates itself** every time you run it — you never need to reinstall manually.
8
+
9
+ ---
10
+
11
+ ## Who is this for?
12
+
13
+ - Developers who want to **go from idea to structured specs** before building
14
+ - Anyone who finds it hard to **think through requirements** clearly on their own
15
+ - Builders who want Claude Code to have a **complete understanding of the project** before writing code
16
+ - Teams who want a **repeatable, consistent project kickoff** process
17
+
18
+ ---
19
+
20
+ ## Prerequisites
21
+
22
+ Before installing ProtoVibe, make sure you have:
23
+
24
+ - **Node.js v18+** — [nodejs.org](https://nodejs.org)
25
+ - **Claude Code** — install it with:
26
+ ```bash
27
+ npm install -g @anthropic-ai/claude-code
28
+ ```
29
+ Then run `claude` once and log in. ProtoVibe checks your credentials automatically.
30
+
31
+ ---
32
+
33
+ ## Install
34
+
35
+ ProtoVibe is a CLI tool and **must be installed globally** to work:
36
+
37
+ ```bash
38
+ npm install -g protovibe
39
+ ```
40
+
41
+ > **Note:** The npm page shows `npm i protovibe` — that is a local install and the `protovibe` command will not be found. Always use the `-g` flag.
42
+
43
+ ProtoVibe checks for newer versions on every run and updates itself automatically. You only ever need to install it once.
44
+
45
+ ### No install? Use npx
46
+
47
+ Run ProtoVibe directly from any directory without a permanent install:
48
+
49
+ ```bash
50
+ npx protovibe
51
+ ```
52
+
53
+ This always fetches and runs the latest version on the fly.
54
+
55
+ ---
56
+
57
+ ## How to use it
58
+
59
+ ```bash
60
+ protovibe
61
+ ```
62
+
63
+ The boot screen renders instantly. Auth is verified automatically. Then you choose your mode:
64
+
65
+ ```
66
+ ◆ What would you like to do?
67
+ │ ● Start a new project
68
+ │ ○ Continue with an existing project
69
+ ```
70
+
71
+ ---
72
+
73
+ ## Path A — New project
74
+
75
+ 1. **Enter a project name** — letters, numbers, hyphens, underscores only
76
+ 2. **Browse to a parent directory** — interactive folder browser starting from your home directory
77
+ 3. ProtoVibe creates the project folder and writes the workflow files into it
78
+ 4. A launch prompt appears:
79
+
80
+ ```
81
+ ╭──────────────────────────────────────────╮
82
+ │ │
83
+ │ Claude Code is loading your project. │
84
+ │ │
85
+ │ Type "Hello" or "What's up?" to begin. │
86
+ │ │
87
+ ╰──────────────────────────────────────────╯
88
+ ```
89
+
90
+ 5. Claude Code opens. Type anything — the ProtoVibe workflow starts immediately.
91
+
92
+ ### If the project name already exists
93
+
94
+ ```
95
+ ✗ A project named 'my-app' already exists at this location.
96
+ ◆ What would you like to do?
97
+ │ ● Choose a different name for my new project
98
+ │ ○ Continue with the existing project
99
+ ```
100
+
101
+ - **Choose a different name** — re-enter the name, same folder stays selected
102
+ - **Continue with the existing project** — ProtoVibe writes the workflow files to the existing folder, Claude opens and starts the workflow fresh
103
+
104
+ ---
105
+
106
+ ## Path B — Existing project
107
+
108
+ 1. **Enter the full path** to your existing project folder (supports `~` shorthand)
109
+ 2. ProtoVibe writes an `/analyse` command into the project
110
+ 3. Claude Code opens, silently reads all files, and presents a structured summary:
111
+
112
+ ```
113
+ Project: my-app
114
+ What it does: A client portal for agencies to manage deliverables and feedback.
115
+ Tech Stack: Next.js, TypeScript, Supabase, Tailwind CSS
116
+ Key Features:
117
+ - Client login and dashboard
118
+ - File upload and approval workflow
119
+ - Comment threads per deliverable
120
+ - Email notifications on status change
121
+ Project Structure: App router in src/app/, shared components in src/components/,
122
+ Supabase client in src/lib/. API routes handle upload and notification logic.
123
+ Current State: Partially built — auth and dashboard complete, approval flow in progress.
124
+ ```
125
+
126
+ 4. Claude says: *"I've analysed your project. I'm ready to help — what would you like to work on?"*
127
+ 5. You drive from here. No workflow constraints — Claude works normally.
128
+
129
+ ---
130
+
131
+ ## The 7-Stage Workflow (new project path)
132
+
133
+ After Claude opens, type anything. Claude's first response is always:
134
+
135
+ ```
136
+ Welcome to ProtoVibe. What would you like to do?
137
+
138
+ 1. Build from scratch — start a new project
139
+ 2. Work on an existing project — analyse and enhance an existing codebase
140
+ ```
141
+
142
+ Choose **1** to begin:
143
+
144
+ ### Stage 1 — Idea Capture
145
+ Claude asks: *"Describe the idea for your project."*
146
+ Speak naturally. No format required.
147
+
148
+ ### Stage 2 — Interactive Requirements Probing
149
+
150
+ Claude first silently analyses your idea, then asks requirements questions as **interactive cards** — you click an option or type your own. No long-form typing required.
151
+
152
+ Questions are asked in 3 batches:
153
+
154
+ **Batch 1 — Core context**
155
+ - Who are the primary users?
156
+ - What platform is this for? *(Web, Mobile, Desktop, CLI)*
157
+ - Is user authentication required?
158
+ - How would you describe the scale at launch?
159
+
160
+ **Batch 2 — Features & data**
161
+ - What data does this app create or store? *(multi-select)*
162
+ - Any third-party integrations needed? *(multi-select)*
163
+ - Does the app need real-time features?
164
+
165
+ **Batch 3 — Constraints**
166
+ - Do you have a preferred tech stack?
167
+ - What is your timeline for an MVP?
168
+ - Any specific requirements? *(multi-select)*
169
+
170
+ Options are generated from your idea — not generic defaults. Each question has a recommended answer and an "Other" option to type anything.
171
+
172
+ If anything is still unclear after your answers, Claude asks targeted follow-up questions the same way. Then it presents a full structured summary and asks you to confirm before moving on.
173
+
174
+ ### Stage 3 — Architecture Options
175
+
176
+ Claude proposes **3 distinct architectural approaches**, each with:
177
+ - Full tech stack (frontend, backend, database, auth, hosting)
178
+ - How the system works end-to-end
179
+ - Tradeoffs — what it's best for and what it sacrifices
180
+
181
+ Then presents them as **clickable cards** — pick one, or choose "Custom approach" to describe your own. The recommended option is labeled clearly.
182
+
183
+ ### Stage 4 — Option Confirmation
184
+ If you pick a custom approach, Claude evaluates it against your requirements and flags any risks before proceeding.
185
+
186
+ ### Stage 5 — Specs File
187
+ Claude asks for confirmation, then writes `specs.md` in your project root containing:
188
+ - App overview and target audience
189
+ - Feature list with priority labels: **P0** (MVP must-have), **P1** (important), **P2** (nice to have)
190
+ - Complete user flow — every journey, primary and alternate paths
191
+ - Tech stack with one-line justification per technology
192
+ - Data model — entities, fields, relationships
193
+ - Integration notes
194
+ - Constraints and non-functional requirements
195
+
196
+ ### Stage 6 — Initialization
197
+ Claude silently replaces the placeholder `CLAUDE.md` with a project-specific one generated by `/init`, so it carries full project context going forward. Nothing is asked — it just happens.
198
+
199
+ ### Stage 7 — Handoff
200
+ Claude says: *"Your project is fully scoped and ready to build. Type **Build it** to start building, or ask me anything about the project first."*
201
+
202
+ From here, Claude Code builds your project according to `specs.md`, starting with P0 features.
203
+
204
+ ---
205
+
206
+ ## Commands
207
+
208
+ These are available at any time inside Claude Code during or after the workflow:
209
+
210
+ | Command | What it does |
211
+ |---|---|
212
+ | `/takeover` | Exit the ProtoVibe workflow. Claude summarises everything captured so far and works normally with no constraints. |
213
+ | `/summarise` | Plain-language summary of progress — what's been decided, what's been done, and what comes next. Capped at 10 bullets. |
214
+ | `/protovibe` | Restart the workflow from Stage 0. |
215
+
216
+ ---
217
+
218
+ ## Auto-update
219
+
220
+ Every time you run `protovibe`, it silently checks the npm registry. If a newer version is available, it:
221
+ 1. Prints: `Updating ProtoVibe x.x.x → x.x.x...`
222
+ 2. Installs the latest version globally
223
+ 3. Re-launches itself automatically
224
+
225
+ If you're offline, it skips the check and boots normally.
226
+
227
+ ---
228
+
229
+ ## What gets written to your project
230
+
231
+ ### New project
232
+ ```
233
+ <your-project>/
234
+ ├── CLAUDE.md # Instructs Claude to run the ProtoVibe workflow on first message
235
+ └── .claude/
236
+ └── commands/
237
+ ├── protovibe.md # Full 7-stage workflow definition
238
+ ├── takeover.md # /takeover command definition
239
+ └── summarise.md # /summarise command definition
240
+ ```
241
+
242
+ After Stage 5: `specs.md` is added to the root.
243
+ After Stage 6: `CLAUDE.md` is replaced with a project-specific version by `/init`.
244
+
245
+ ### Existing project
246
+ ```
247
+ <your-project>/
248
+ ├── CLAUDE.md # Instructs Claude to run /analyse on startup
249
+ └── .claude/
250
+ └── commands/
251
+ └── analyse.md # /analyse command — reads all files and presents a summary
252
+ ```
253
+
254
+ ---
255
+
256
+ ## What it looks like
257
+
258
+ Boot screen (renders in under 100ms):
259
+
260
+ ```
261
+ ██╗ ██╗██╗██████╗ ███████╗██████╗ ██████╗ ██████╗
262
+ ██║ ██║██║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔═══██╗
263
+ ██║ ██║██║██████╔╝█████╗ ██████╔╝██████╔╝██║ ██║
264
+ ╚██╗ ██╔╝██║██╔══██╗██╔══╝ ██╔═══╝ ██╔══██╗██║ ██║
265
+ ╚████╔╝ ██║██████╔╝███████╗██║ ██║ ██║╚██████╔╝
266
+ ╚═══╝ ╚═╝╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═════╝
267
+ ```
268
+ *(rendered in a purple → blue gradient)*
269
+
270
+ ```
271
+ ╭──────────────────────────────────────────╮
272
+ │ version 1.1.x │
273
+ │ by razorgojo │
274
+ │ powered by Claude Code │
275
+ ├──────────────────────────────────────────┤
276
+ │ Vibecode your prototypes. │
277
+ ├──────────────────────────────────────────┤
278
+ │ commands │
279
+ │ /exit — quit ProtoVibe at any time │
280
+ ╰──────────────────────────────────────────╯
281
+ ```
282
+
283
+ The logo automatically switches to a compact version on terminals narrower than 90 columns.
284
+
285
+ ---
286
+
287
+ ## Development
288
+
289
+ ```bash
290
+ git clone https://github.com/SomSamantray/VibePro-CLI.git
291
+ cd VibePro-CLI
292
+ npm install
293
+ npm run build
294
+ node dist/index.mjs # run locally without global install
295
+ npm install -g . # install globally to test the protovibe command
296
+ ```
297
+
298
+ | Command | Description |
299
+ |---|---|
300
+ | `npm run build` | Compile TypeScript → `dist/` via tsup |
301
+ | `npm run dev` | Watch mode — rebuilds on every file change |
302
+
303
+ ---
304
+
305
+ ## License
306
+
307
+ MIT — see [LICENSE](./LICENSE)
package/dist/index.mjs CHANGED
@@ -107,10 +107,10 @@ function isClaudeInstalled() {
107
107
  }
108
108
  }
109
109
  function spawnClaude(projectPath) {
110
- const child = spawn("claude", [], {
110
+ const claudeCmd = process.platform === "win32" ? "claude.cmd" : "claude";
111
+ const child = spawn(claudeCmd, [], {
111
112
  stdio: "inherit",
112
- cwd: projectPath,
113
- shell: true
113
+ cwd: projectPath
114
114
  });
115
115
  child.on("error", (err) => {
116
116
  process.stderr.write(`Failed to start Claude Code: ${err.message}
@@ -339,7 +339,7 @@ After writing, tell the user:
339
339
 
340
340
  Without asking the user, do the following in order:
341
341
 
342
- 1. Delete the existing CLAUDE.md file in the current directory
342
+ 1. If a CLAUDE.md file already exists in the current directory, rename it to CLAUDE.md.bak to preserve it. Tell the user: "Backed up existing CLAUDE.md \u2192 CLAUDE.md.bak"
343
343
  2. Run /init \u2014 this will analyze the project (including specs.md) and generate a new, project-aware CLAUDE.md
344
344
 
345
345
  The generated CLAUDE.md must contain full, detailed context to help Claude with all future development on this project. /init should produce a CLAUDE.md that includes: the project purpose and scope, the full tech stack with reasoning, the architecture overview, key entities and data relationships, the complete feature set, user flow summary, coding conventions and patterns to follow, known constraints, and any integration details. It should be a complete reference document \u2014 not a summary.
@@ -348,8 +348,6 @@ After /init completes, confirm:
348
348
 
349
349
  > "CLAUDE.md \u2713 \u2014 your project is initialized."
350
350
 
351
- Do not mention the deletion to the user. Do not ask permission. Just do it silently.
352
-
353
351
  ---
354
352
 
355
353
  ## Stage 7 \u2014 Handoff
@@ -532,6 +530,16 @@ async function handleExistingProject() {
532
530
  process.exit(0);
533
531
  }
534
532
  const existingPath = resolve(String(rawPath).trim().replace(/^~/, homedir2()));
533
+ const claudeMdPath = join2(existingPath, "CLAUDE.md");
534
+ if (existsSync2(claudeMdPath)) {
535
+ const overwrite = await clack.confirm({
536
+ message: "This project already has a CLAUDE.md. ProtoVibe will replace it to inject its workflow. Overwrite?"
537
+ });
538
+ if (clack.isCancel(overwrite) || !overwrite) {
539
+ clack.cancel("Exiting ProtoVibe. Your CLAUDE.md was not changed.");
540
+ process.exit(0);
541
+ }
542
+ }
535
543
  writeAnalyseTemplates(existingPath);
536
544
  clack.outro(`\u2713 Ready to analyse ${existingPath}`);
537
545
  return existingPath;
@@ -575,6 +583,16 @@ async function handleNewProject() {
575
583
  process.exit(0);
576
584
  }
577
585
  if (conflictChoice === "continue") {
586
+ const claudeMdPath = join2(targetDir, "CLAUDE.md");
587
+ if (existsSync2(claudeMdPath)) {
588
+ const overwrite = await clack.confirm({
589
+ message: "This project already has a CLAUDE.md. Overwrite it with the ProtoVibe configuration?"
590
+ });
591
+ if (clack.isCancel(overwrite) || !overwrite) {
592
+ clack.cancel("Exiting ProtoVibe. Your CLAUDE.md was not changed.");
593
+ process.exit(0);
594
+ }
595
+ }
578
596
  writeProtovibeTemplates(targetDir);
579
597
  clack.outro(`\u2713 Ready to continue at ${targetDir}`);
580
598
  return targetDir;
@@ -600,7 +618,7 @@ async function scaffoldProject() {
600
618
  }
601
619
 
602
620
  // src/cli.tsx
603
- import { confirm } from "@clack/prompts";
621
+ import { confirm as confirm2 } from "@clack/prompts";
604
622
  import { spawnSync } from "child_process";
605
623
  import chalk from "chalk";
606
624
  function printLaunchBox() {
@@ -645,7 +663,7 @@ function App({ terminalWidth, version }) {
645
663
  if (stage !== "auth-prompt") return;
646
664
  exit();
647
665
  (async () => {
648
- const shouldLogin = await confirm({
666
+ const shouldLogin = await confirm2({
649
667
  message: "This requires a Claude Code account. Do you want to log in now?"
650
668
  });
651
669
  if (!shouldLogin) {
@@ -653,12 +671,13 @@ function App({ terminalWidth, version }) {
653
671
  process.exit(0);
654
672
  }
655
673
  process.stdout.write("\n Opening browser to log you in to Claude Code...\n\n");
656
- const loginResult = spawnSync("claude", ["auth", "login"], { stdio: "inherit", shell: true });
674
+ const claudeCmd = process.platform === "win32" ? "claude.cmd" : "claude";
675
+ const loginResult = spawnSync(claudeCmd, ["auth", "login"], { stdio: "inherit" });
657
676
  if (loginResult.status !== 0 && loginResult.status !== null) {
658
677
  process.stdout.write(
659
678
  "\n Opening Claude Code to log you in.\n Once logged in, type /exit to return to ProtoVibe.\n\n"
660
679
  );
661
- spawnSync("claude", [], { stdio: "inherit", shell: true });
680
+ spawnSync(claudeCmd, [], { stdio: "inherit" });
662
681
  }
663
682
  if (!isAuthenticated()) {
664
683
  process.stderr.write("\n\u2717 Not logged in. Run protovibe again after logging in.\n");
@@ -694,7 +713,6 @@ function App({ terminalWidth, version }) {
694
713
  }
695
714
 
696
715
  // src/index.tsx
697
- import { execSync as execSync2, spawnSync as spawnSync2 } from "child_process";
698
716
  import { createRequire } from "module";
699
717
  import { get } from "https";
700
718
  var require2 = createRequire(import.meta.url);
@@ -714,10 +732,25 @@ function fetchLatestVersion() {
714
732
  { timeout: 3e3 },
715
733
  (res) => {
716
734
  let data = "";
717
- res.on("data", (chunk) => data += chunk);
735
+ let size = 0;
736
+ const MAX_BYTES = 65536;
737
+ res.on("data", (chunk) => {
738
+ size += chunk.length;
739
+ if (size > MAX_BYTES) {
740
+ req.destroy();
741
+ resolve2(null);
742
+ return;
743
+ }
744
+ data += chunk;
745
+ });
718
746
  res.on("end", () => {
719
747
  try {
720
- resolve2(JSON.parse(data).version ?? null);
748
+ const version = JSON.parse(data).version;
749
+ if (typeof version === "string" && /^\d+\.\d+\.\d+$/.test(version)) {
750
+ resolve2(version);
751
+ } else {
752
+ resolve2(null);
753
+ }
721
754
  } catch {
722
755
  resolve2(null);
723
756
  }
@@ -738,21 +771,15 @@ async function main() {
738
771
  );
739
772
  process.exit(1);
740
773
  }
741
- if (process.env.PROTOVIBE_UPDATED !== "1") {
742
- const latest = await fetchLatestVersion();
743
- if (latest && isNewerVersion(pkg.version, latest)) {
744
- process.stdout.write(`
745
- Updating ProtoVibe ${pkg.version} \u2192 ${latest}...
746
-
747
- `);
748
- execSync2("npm install -g protovibe@latest", { stdio: "inherit" });
749
- spawnSync2("protovibe", process.argv.slice(2), {
750
- stdio: "inherit",
751
- shell: true,
752
- env: { ...process.env, PROTOVIBE_UPDATED: "1" }
753
- });
754
- process.exit(0);
755
- }
774
+ const latest = await fetchLatestVersion();
775
+ if (latest && isNewerVersion(pkg.version, latest)) {
776
+ process.stdout.write(
777
+ `
778
+ A new version of ProtoVibe is available: ${pkg.version} \u2192 ${latest}
779
+ Run \`npm update -g protovibe\` to update.
780
+
781
+ `
782
+ );
756
783
  }
757
784
  const terminalWidth = process.stdout.columns ?? 80;
758
785
  render(/* @__PURE__ */ React5.createElement(App, { terminalWidth, version: pkg.version }));
package/package.json CHANGED
@@ -1,52 +1,51 @@
1
- {
2
- "name": "protovibe",
3
- "version": "1.1.10",
4
- "description": "A branded CLI platform layer on top of Claude Code",
5
- "author": "razorgojo",
6
- "license": "MIT",
7
- "keywords": [
8
- "claude",
9
- "claude-code",
10
- "cli",
11
- "ai",
12
- "scaffold",
13
- "protovibe"
14
- ],
15
- "engines": {
16
- "node": ">=18"
17
- },
18
- "repository": {
19
- "type": "git",
20
- "url": "https://github.com/SomSamantray/VibePro-CLI.git"
21
- },
22
- "homepage": "https://github.com/SomSamantray/VibePro-CLI#readme",
23
- "bugs": {
24
- "url": "https://github.com/SomSamantray/VibePro-CLI/issues"
25
- },
26
- "files": [
27
- "dist"
28
- ],
29
- "bin": {
30
- "protovibe": "dist/index.mjs"
31
- },
32
- "main": "dist/index.mjs",
33
- "type": "module",
34
- "scripts": {
35
- "build": "tsup",
36
- "dev": "tsup --watch",
37
- "prepublishOnly": "npm run build"
38
- },
39
- "dependencies": {
40
- "@clack/prompts": "^1.1.0",
41
- "chalk": "^5.6.2",
42
- "ink": "^6.8.0",
43
- "protovibe": "^1.1.8",
44
- "react": "^19.2.4"
45
- },
46
- "devDependencies": {
47
- "@types/node": "^25.5.0",
48
- "@types/react": "^19.2.14",
49
- "tsup": "^8.5.1",
50
- "typescript": "^5.9.3"
51
- }
52
- }
1
+ {
2
+ "name": "protovibe",
3
+ "version": "1.2.0",
4
+ "description": "A branded CLI platform layer on top of Claude Code",
5
+ "author": "razorgojo",
6
+ "license": "MIT",
7
+ "keywords": [
8
+ "claude",
9
+ "claude-code",
10
+ "cli",
11
+ "ai",
12
+ "scaffold",
13
+ "protovibe"
14
+ ],
15
+ "engines": {
16
+ "node": ">=18"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "https://github.com/SomSamantray/VibePro-CLI.git"
21
+ },
22
+ "homepage": "https://github.com/SomSamantray/VibePro-CLI#readme",
23
+ "bugs": {
24
+ "url": "https://github.com/SomSamantray/VibePro-CLI/issues"
25
+ },
26
+ "files": [
27
+ "dist"
28
+ ],
29
+ "bin": {
30
+ "protovibe": "dist/index.mjs"
31
+ },
32
+ "main": "dist/index.mjs",
33
+ "type": "module",
34
+ "scripts": {
35
+ "build": "tsup",
36
+ "dev": "tsup --watch",
37
+ "prepublishOnly": "npm run build"
38
+ },
39
+ "dependencies": {
40
+ "@clack/prompts": "^1.1.0",
41
+ "chalk": "^5.6.2",
42
+ "ink": "^6.8.0",
43
+ "react": "^19.2.4"
44
+ },
45
+ "devDependencies": {
46
+ "@types/node": "^25.5.0",
47
+ "@types/react": "^19.2.14",
48
+ "tsup": "^8.5.1",
49
+ "typescript": "^5.9.3"
50
+ }
51
+ }