start-vibing 1.1.12 → 2.0.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 +176 -149
- package/dist/cli.js +410 -20
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,149 +1,176 @@
|
|
|
1
|
-
# start-vibing
|
|
2
|
-
|
|
3
|
-
>
|
|
4
|
-
|
|
5
|
-
## Quick Start
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
#
|
|
9
|
-
npx start-vibing
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
###
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
1
|
+
# start-vibing
|
|
2
|
+
|
|
3
|
+
> One command to set up Claude Code with a complete AI development workflow.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Just run this in any project
|
|
9
|
+
npx start-vibing
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
That's it! The CLI will:
|
|
13
|
+
1. Check for updates
|
|
14
|
+
2. Set up the `.claude/` folder with agents, skills, and hooks
|
|
15
|
+
3. Install Claude Code if not found on your system
|
|
16
|
+
4. Launch Claude Code with `--dangerously-skip-permissions`
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
|
|
20
|
+
### Recommended: Install Globally
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npm install -g start-vibing
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Then just run `start-vibing` in any project.
|
|
27
|
+
|
|
28
|
+
### Or use npx/bunx
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npx start-vibing # npm
|
|
32
|
+
bunx start-vibing # bun (faster)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## What It Does
|
|
36
|
+
|
|
37
|
+
### 1. Auto-installs Claude Code
|
|
38
|
+
|
|
39
|
+
If Claude Code is not found on your system, it automatically installs using official methods:
|
|
40
|
+
|
|
41
|
+
| Platform | Installation Command |
|
|
42
|
+
|----------|---------------------|
|
|
43
|
+
| macOS/Linux | `curl -fsSL https://claude.ai/install.sh \| bash` |
|
|
44
|
+
| Windows (PowerShell) | `irm https://claude.ai/install.ps1 \| iex` |
|
|
45
|
+
| Windows (CMD) | Downloads and runs `install.cmd` |
|
|
46
|
+
|
|
47
|
+
### 2. Sets Up Complete Workflow
|
|
48
|
+
|
|
49
|
+
Creates a `.claude/` folder with:
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
.claude/
|
|
53
|
+
├── agents/ # 14 specialized AI agents
|
|
54
|
+
│ ├── orchestrator.md # Coordinates workflow
|
|
55
|
+
│ ├── analyzer.md # Analyzes change impact
|
|
56
|
+
│ ├── research.md # Researches best practices
|
|
57
|
+
│ ├── code-reviewer.md # Reviews code quality
|
|
58
|
+
│ ├── tester.md # Creates tests
|
|
59
|
+
│ ├── security-auditor.md # Security audit (VETO power)
|
|
60
|
+
│ ├── performance.md # Performance optimization
|
|
61
|
+
│ ├── debugger.md # Bug tracing
|
|
62
|
+
│ └── ...
|
|
63
|
+
├── skills/ # 8 skill systems with progressive disclosure
|
|
64
|
+
│ ├── test-coverage/ # E2E testing (Playwright)
|
|
65
|
+
│ ├── security-scan/ # OWASP validation + scripts
|
|
66
|
+
│ ├── quality-gate/ # Quality checks + scripts
|
|
67
|
+
│ └── ...
|
|
68
|
+
├── hooks/ # Workflow enforcement
|
|
69
|
+
│ └── stop-validator.py # Blocks incomplete work
|
|
70
|
+
└── config/ # Project configuration
|
|
71
|
+
└── project-config.json
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### 3. Auto-launches Claude Code
|
|
75
|
+
|
|
76
|
+
After setup, automatically runs `claude --dangerously-skip-permissions` so you can start working immediately.
|
|
77
|
+
|
|
78
|
+
### 4. Self-updates
|
|
79
|
+
|
|
80
|
+
Checks for updates on every run (cached for 1 hour) and notifies you when a new version is available.
|
|
81
|
+
|
|
82
|
+
## Features
|
|
83
|
+
|
|
84
|
+
### 14 Specialized Agents
|
|
85
|
+
|
|
86
|
+
| Agent | Purpose | VETO |
|
|
87
|
+
| ---------------- | --------------------------- | ---- |
|
|
88
|
+
| orchestrator | Coordinates entire workflow | No |
|
|
89
|
+
| analyzer | Analyzes change impact | No |
|
|
90
|
+
| research | Best practices research | No |
|
|
91
|
+
| code-reviewer | Reviews code quality | No |
|
|
92
|
+
| documenter | Documentation updates | No |
|
|
93
|
+
| tester | Unit + E2E tests | No |
|
|
94
|
+
| security-auditor | Security audit | Yes |
|
|
95
|
+
| ui-ux-reviewer | UI/UX review | No |
|
|
96
|
+
| quality-checker | Quality gates | No |
|
|
97
|
+
| performance | Performance optimization | No |
|
|
98
|
+
| debugger | Bug tracing | No |
|
|
99
|
+
| final-validator | Final validation | Yes |
|
|
100
|
+
| domain-updater | Domain knowledge | No |
|
|
101
|
+
| commit-manager | Git commits | No |
|
|
102
|
+
|
|
103
|
+
### Smart Copy Behavior
|
|
104
|
+
|
|
105
|
+
When you run `start-vibing` in an existing project:
|
|
106
|
+
|
|
107
|
+
- **ALWAYS overwrites:** Agent files, hooks, settings.json
|
|
108
|
+
- **PRESERVES:** Your custom domains, cached research
|
|
109
|
+
- **MERGES:** New skills with existing ones
|
|
110
|
+
|
|
111
|
+
Use `--force` to overwrite everything.
|
|
112
|
+
|
|
113
|
+
## CLI Options
|
|
114
|
+
|
|
115
|
+
| Flag | Description |
|
|
116
|
+
| ------------------ | ---------------------------------------- |
|
|
117
|
+
| `--force` | Overwrite all files |
|
|
118
|
+
| `--no-claude` | Skip Claude Code installation and launch |
|
|
119
|
+
| `--no-update-check`| Skip checking for updates |
|
|
120
|
+
| `--help`, `-h` | Show help message |
|
|
121
|
+
| `--version`, `-v` | Show version |
|
|
122
|
+
|
|
123
|
+
## After Setup
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
# 1. Configure your project
|
|
127
|
+
edit .claude/config/project-config.json
|
|
128
|
+
|
|
129
|
+
# 2. Claude Code is already running!
|
|
130
|
+
# The agents will guide you through the workflow
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Configuration
|
|
134
|
+
|
|
135
|
+
Edit `.claude/config/project-config.json`:
|
|
136
|
+
|
|
137
|
+
```json
|
|
138
|
+
{
|
|
139
|
+
"stack": {
|
|
140
|
+
"runtime": "bun",
|
|
141
|
+
"language": "typescript",
|
|
142
|
+
"database": "mongodb"
|
|
143
|
+
},
|
|
144
|
+
"commands": {
|
|
145
|
+
"typecheck": "bun run typecheck",
|
|
146
|
+
"lint": "bun run lint",
|
|
147
|
+
"test": "bun run test",
|
|
148
|
+
"build": "bun run build"
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Requirements
|
|
154
|
+
|
|
155
|
+
- Node.js >= 18 or Bun
|
|
156
|
+
- Internet connection (for Claude Code installation if needed)
|
|
157
|
+
|
|
158
|
+
## Platforms
|
|
159
|
+
|
|
160
|
+
| Platform | Status |
|
|
161
|
+
|----------|--------|
|
|
162
|
+
| macOS | Fully supported |
|
|
163
|
+
| Linux | Fully supported |
|
|
164
|
+
| Windows (PowerShell) | Fully supported |
|
|
165
|
+
| Windows (CMD) | Fully supported |
|
|
166
|
+
| Windows (WSL) | Fully supported |
|
|
167
|
+
|
|
168
|
+
## License
|
|
169
|
+
|
|
170
|
+
MIT
|
|
171
|
+
|
|
172
|
+
## Links
|
|
173
|
+
|
|
174
|
+
- [Claude Code Documentation](https://docs.anthropic.com/claude-code)
|
|
175
|
+
- [GitHub Repository](https://github.com/LimaTechnologies/ai-development)
|
|
176
|
+
- [Report Issues](https://github.com/LimaTechnologies/ai-development/issues)
|
package/dist/cli.js
CHANGED
|
@@ -112,9 +112,331 @@ async function copyClaudeSetup(targetDir, options = {}) {
|
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
// src/cli.ts
|
|
115
|
-
import { existsSync as
|
|
115
|
+
import { existsSync as existsSync3, readFileSync as readFileSync3 } from "fs";
|
|
116
|
+
import { join as join3, dirname as dirname2 } from "path";
|
|
117
|
+
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
118
|
+
|
|
119
|
+
// src/update.ts
|
|
120
|
+
import { existsSync as existsSync2, readFileSync as readFileSync2, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2 } from "fs";
|
|
116
121
|
import { join as join2 } from "path";
|
|
117
|
-
|
|
122
|
+
|
|
123
|
+
// src/platform.ts
|
|
124
|
+
import { platform } from "os";
|
|
125
|
+
import { execSync } from "child_process";
|
|
126
|
+
function detectPlatform() {
|
|
127
|
+
const os = platform();
|
|
128
|
+
switch (os) {
|
|
129
|
+
case "win32":
|
|
130
|
+
return "windows";
|
|
131
|
+
case "darwin":
|
|
132
|
+
return "macos";
|
|
133
|
+
default:
|
|
134
|
+
return "linux";
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
function detectShell() {
|
|
138
|
+
const currentPlatform = detectPlatform();
|
|
139
|
+
if (currentPlatform === "windows") {
|
|
140
|
+
const psModulePath = process.env["PSModulePath"];
|
|
141
|
+
if (psModulePath) {
|
|
142
|
+
return "powershell";
|
|
143
|
+
}
|
|
144
|
+
const comspec = process.env["COMSPEC"];
|
|
145
|
+
if (comspec && comspec.toLowerCase().includes("cmd.exe")) {
|
|
146
|
+
return "cmd";
|
|
147
|
+
}
|
|
148
|
+
const shell2 = process.env["SHELL"];
|
|
149
|
+
if (shell2 && shell2.includes("bash")) {
|
|
150
|
+
return "bash";
|
|
151
|
+
}
|
|
152
|
+
return "cmd";
|
|
153
|
+
}
|
|
154
|
+
const shell = process.env["SHELL"] || "";
|
|
155
|
+
if (shell.includes("zsh")) {
|
|
156
|
+
return "zsh";
|
|
157
|
+
}
|
|
158
|
+
if (shell.includes("bash")) {
|
|
159
|
+
return "bash";
|
|
160
|
+
}
|
|
161
|
+
return "bash";
|
|
162
|
+
}
|
|
163
|
+
function getPlatformInfo() {
|
|
164
|
+
const currentPlatform = detectPlatform();
|
|
165
|
+
return {
|
|
166
|
+
platform: currentPlatform,
|
|
167
|
+
shell: detectShell(),
|
|
168
|
+
isWindows: currentPlatform === "windows",
|
|
169
|
+
isMacOS: currentPlatform === "macos",
|
|
170
|
+
isLinux: currentPlatform === "linux"
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
function commandExists(command) {
|
|
174
|
+
const currentPlatform = detectPlatform();
|
|
175
|
+
try {
|
|
176
|
+
if (currentPlatform === "windows") {
|
|
177
|
+
execSync(`where.exe ${command}`, { stdio: "ignore" });
|
|
178
|
+
} else {
|
|
179
|
+
execSync(`which ${command}`, { stdio: "ignore" });
|
|
180
|
+
}
|
|
181
|
+
return true;
|
|
182
|
+
} catch {
|
|
183
|
+
return false;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
function getHomeDir() {
|
|
187
|
+
return process.env["HOME"] || process.env["USERPROFILE"] || "";
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// src/update.ts
|
|
191
|
+
var NPM_REGISTRY_URL = "https://registry.npmjs.org/start-vibing/latest";
|
|
192
|
+
var CACHE_DIR = join2(getHomeDir(), ".start-vibing-cache");
|
|
193
|
+
var CACHE_FILE = join2(CACHE_DIR, "version-check.json");
|
|
194
|
+
var CACHE_TTL_MS = 60 * 60 * 1000;
|
|
195
|
+
function compareVersions(a, b) {
|
|
196
|
+
const partsA = a.replace(/^v/, "").split(".").map(Number);
|
|
197
|
+
const partsB = b.replace(/^v/, "").split(".").map(Number);
|
|
198
|
+
for (let i = 0;i < Math.max(partsA.length, partsB.length); i++) {
|
|
199
|
+
const partA = partsA[i] || 0;
|
|
200
|
+
const partB = partsB[i] || 0;
|
|
201
|
+
if (partA > partB)
|
|
202
|
+
return 1;
|
|
203
|
+
if (partA < partB)
|
|
204
|
+
return -1;
|
|
205
|
+
}
|
|
206
|
+
return 0;
|
|
207
|
+
}
|
|
208
|
+
function readCache() {
|
|
209
|
+
try {
|
|
210
|
+
if (!existsSync2(CACHE_FILE)) {
|
|
211
|
+
return null;
|
|
212
|
+
}
|
|
213
|
+
const content = readFileSync2(CACHE_FILE, "utf-8");
|
|
214
|
+
const entry = JSON.parse(content);
|
|
215
|
+
if (typeof entry.timestamp !== "number" || typeof entry.latestVersion !== "string") {
|
|
216
|
+
return null;
|
|
217
|
+
}
|
|
218
|
+
return entry;
|
|
219
|
+
} catch {
|
|
220
|
+
return null;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
function writeCache(latestVersion) {
|
|
224
|
+
try {
|
|
225
|
+
if (!existsSync2(CACHE_DIR)) {
|
|
226
|
+
mkdirSync2(CACHE_DIR, { recursive: true });
|
|
227
|
+
}
|
|
228
|
+
const entry = {
|
|
229
|
+
timestamp: Date.now(),
|
|
230
|
+
latestVersion
|
|
231
|
+
};
|
|
232
|
+
writeFileSync2(CACHE_FILE, JSON.stringify(entry, null, 2));
|
|
233
|
+
} catch {
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
function isCacheValid(entry) {
|
|
237
|
+
if (!entry)
|
|
238
|
+
return false;
|
|
239
|
+
return Date.now() - entry.timestamp < CACHE_TTL_MS;
|
|
240
|
+
}
|
|
241
|
+
async function checkForUpdates(currentVersion) {
|
|
242
|
+
const cached = readCache();
|
|
243
|
+
if (isCacheValid(cached)) {
|
|
244
|
+
return {
|
|
245
|
+
currentVersion,
|
|
246
|
+
latestVersion: cached.latestVersion,
|
|
247
|
+
updateAvailable: compareVersions(cached.latestVersion, currentVersion) > 0,
|
|
248
|
+
cached: true
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
try {
|
|
252
|
+
const response = await fetch(NPM_REGISTRY_URL, {
|
|
253
|
+
headers: {
|
|
254
|
+
Accept: "application/json"
|
|
255
|
+
},
|
|
256
|
+
signal: AbortSignal.timeout(5000)
|
|
257
|
+
});
|
|
258
|
+
if (!response.ok) {
|
|
259
|
+
throw new Error(`HTTP ${response.status}`);
|
|
260
|
+
}
|
|
261
|
+
const data = await response.json();
|
|
262
|
+
const latestVersion = data.version;
|
|
263
|
+
writeCache(latestVersion);
|
|
264
|
+
return {
|
|
265
|
+
currentVersion,
|
|
266
|
+
latestVersion,
|
|
267
|
+
updateAvailable: compareVersions(latestVersion, currentVersion) > 0,
|
|
268
|
+
cached: false
|
|
269
|
+
};
|
|
270
|
+
} catch {
|
|
271
|
+
return {
|
|
272
|
+
currentVersion,
|
|
273
|
+
latestVersion: currentVersion,
|
|
274
|
+
updateAvailable: false,
|
|
275
|
+
cached: false
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
function isRunningViaNpx() {
|
|
280
|
+
const execPath = process.argv[1] || "";
|
|
281
|
+
if (execPath.includes("_npx") || execPath.includes("npx")) {
|
|
282
|
+
return true;
|
|
283
|
+
}
|
|
284
|
+
const npmExecPath = process.env["npm_execpath"] || "";
|
|
285
|
+
if (npmExecPath.includes("npx")) {
|
|
286
|
+
return true;
|
|
287
|
+
}
|
|
288
|
+
if (execPath.includes(".bun") && execPath.includes("cache")) {
|
|
289
|
+
return true;
|
|
290
|
+
}
|
|
291
|
+
return false;
|
|
292
|
+
}
|
|
293
|
+
function getUpdateCommand() {
|
|
294
|
+
const hasBun = process.env["BUN_INSTALL"] || process.argv[0]?.includes("bun");
|
|
295
|
+
if (hasBun) {
|
|
296
|
+
return "bun install -g start-vibing@latest";
|
|
297
|
+
}
|
|
298
|
+
return "npm install -g start-vibing@latest";
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
// src/claude.ts
|
|
302
|
+
import { spawn, execSync as execSync2, spawnSync } from "child_process";
|
|
303
|
+
function isClaudeInstalled() {
|
|
304
|
+
return commandExists("claude");
|
|
305
|
+
}
|
|
306
|
+
async function installClaude() {
|
|
307
|
+
if (isClaudeInstalled()) {
|
|
308
|
+
return { success: true, alreadyInstalled: true };
|
|
309
|
+
}
|
|
310
|
+
const { platform: platform2, shell, isWindows } = getPlatformInfo();
|
|
311
|
+
console.log(` Detected platform: ${platform2}`);
|
|
312
|
+
console.log(` Detected shell: ${shell}`);
|
|
313
|
+
console.log("");
|
|
314
|
+
try {
|
|
315
|
+
if (isWindows) {
|
|
316
|
+
return await installClaudeWindows(shell);
|
|
317
|
+
} else {
|
|
318
|
+
return await installClaudeUnix();
|
|
319
|
+
}
|
|
320
|
+
} catch (error) {
|
|
321
|
+
return {
|
|
322
|
+
success: false,
|
|
323
|
+
alreadyInstalled: false,
|
|
324
|
+
error: error instanceof Error ? error.message : "Unknown installation error"
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
async function installClaudeWindows(shell) {
|
|
329
|
+
try {
|
|
330
|
+
if (shell === "powershell") {
|
|
331
|
+
console.log(" Running PowerShell installer...");
|
|
332
|
+
console.log(" Command: irm https://claude.ai/install.ps1 | iex");
|
|
333
|
+
console.log("");
|
|
334
|
+
execSync2('powershell -ExecutionPolicy Bypass -Command "irm https://claude.ai/install.ps1 | iex"', {
|
|
335
|
+
stdio: "inherit",
|
|
336
|
+
windowsHide: false
|
|
337
|
+
});
|
|
338
|
+
} else {
|
|
339
|
+
console.log(" Running CMD installer...");
|
|
340
|
+
console.log(" Downloading install script...");
|
|
341
|
+
console.log("");
|
|
342
|
+
execSync2("curl -fsSL https://claude.ai/install.cmd -o %TEMP%\\claude-install.cmd && %TEMP%\\claude-install.cmd", {
|
|
343
|
+
stdio: "inherit",
|
|
344
|
+
shell: "cmd.exe",
|
|
345
|
+
windowsHide: false
|
|
346
|
+
});
|
|
347
|
+
try {
|
|
348
|
+
execSync2("del %TEMP%\\claude-install.cmd", {
|
|
349
|
+
stdio: "ignore",
|
|
350
|
+
shell: "cmd.exe"
|
|
351
|
+
});
|
|
352
|
+
} catch {
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
console.log("");
|
|
356
|
+
console.log(" Installation completed!");
|
|
357
|
+
console.log(" Note: You may need to restart your terminal for PATH changes to take effect.");
|
|
358
|
+
return { success: true, alreadyInstalled: false };
|
|
359
|
+
} catch (error) {
|
|
360
|
+
return {
|
|
361
|
+
success: false,
|
|
362
|
+
alreadyInstalled: false,
|
|
363
|
+
error: error instanceof Error ? error.message : "Windows installation failed"
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
async function installClaudeUnix() {
|
|
368
|
+
try {
|
|
369
|
+
console.log(" Running Unix installer...");
|
|
370
|
+
console.log(" Command: curl -fsSL https://claude.ai/install.sh | bash");
|
|
371
|
+
console.log("");
|
|
372
|
+
execSync2("curl -fsSL https://claude.ai/install.sh | bash", {
|
|
373
|
+
stdio: "inherit",
|
|
374
|
+
shell: "/bin/bash"
|
|
375
|
+
});
|
|
376
|
+
console.log("");
|
|
377
|
+
console.log(" Installation completed!");
|
|
378
|
+
return { success: true, alreadyInstalled: false };
|
|
379
|
+
} catch (error) {
|
|
380
|
+
return {
|
|
381
|
+
success: false,
|
|
382
|
+
alreadyInstalled: false,
|
|
383
|
+
error: error instanceof Error ? error.message : "Unix installation failed"
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
function launchClaude(cwd) {
|
|
388
|
+
const { isWindows } = getPlatformInfo();
|
|
389
|
+
console.log(" Starting Claude Code...");
|
|
390
|
+
console.log(" Running: claude --dangerously-skip-permissions");
|
|
391
|
+
console.log("");
|
|
392
|
+
console.log(" ========================================");
|
|
393
|
+
console.log("");
|
|
394
|
+
const claude = spawn("claude", ["--dangerously-skip-permissions"], {
|
|
395
|
+
cwd,
|
|
396
|
+
stdio: "inherit",
|
|
397
|
+
shell: isWindows,
|
|
398
|
+
detached: false
|
|
399
|
+
});
|
|
400
|
+
claude.on("error", (err) => {
|
|
401
|
+
console.error("");
|
|
402
|
+
console.error(" Failed to launch Claude Code:", err.message);
|
|
403
|
+
console.error("");
|
|
404
|
+
console.error(" This may happen if:");
|
|
405
|
+
console.error(" 1. Claude Code was just installed and PATH not updated");
|
|
406
|
+
console.error(" 2. Installation failed silently");
|
|
407
|
+
console.error("");
|
|
408
|
+
console.error(" Try:");
|
|
409
|
+
console.error(" 1. Restart your terminal");
|
|
410
|
+
console.error(" 2. Run: claude --dangerously-skip-permissions");
|
|
411
|
+
console.error("");
|
|
412
|
+
process.exit(1);
|
|
413
|
+
});
|
|
414
|
+
claude.on("exit", (code) => {
|
|
415
|
+
process.exit(code || 0);
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
// src/cli.ts
|
|
420
|
+
var __filename3 = fileURLToPath2(import.meta.url);
|
|
421
|
+
var __dirname3 = dirname2(__filename3);
|
|
422
|
+
function getVersion() {
|
|
423
|
+
try {
|
|
424
|
+
const paths = [
|
|
425
|
+
join3(__dirname3, "..", "package.json"),
|
|
426
|
+
join3(__dirname3, "..", "..", "package.json")
|
|
427
|
+
];
|
|
428
|
+
for (const pkgPath of paths) {
|
|
429
|
+
if (existsSync3(pkgPath)) {
|
|
430
|
+
const pkg = JSON.parse(readFileSync3(pkgPath, "utf-8"));
|
|
431
|
+
return pkg.version || "1.0.0";
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
return "1.0.0";
|
|
435
|
+
} catch {
|
|
436
|
+
return "1.0.0";
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
var VERSION = getVersion();
|
|
118
440
|
var BANNER = `
|
|
119
441
|
_____ _ _ __ __ _ _ _
|
|
120
442
|
/ ____| | | | \\ \\ / /(_)| | (_)
|
|
@@ -124,38 +446,47 @@ var BANNER = `
|
|
|
124
446
|
|_____/ \\__|\\__,_|_| \\__| |_| |_||_.__/ |_||_| |_| \\__, |
|
|
125
447
|
__/ |
|
|
126
448
|
|___/
|
|
449
|
+
v${VERSION}
|
|
127
450
|
`;
|
|
128
451
|
var HELP = `
|
|
129
452
|
${BANNER}
|
|
130
453
|
Setup Claude Code agents, skills, and hooks in your project.
|
|
454
|
+
Automatically installs Claude Code if missing and launches it.
|
|
131
455
|
|
|
132
456
|
Usage:
|
|
133
457
|
npx start-vibing [options]
|
|
134
458
|
bunx start-vibing [options]
|
|
459
|
+
start-vibing [options] (if installed globally)
|
|
135
460
|
|
|
136
461
|
Options:
|
|
137
|
-
--force
|
|
138
|
-
--
|
|
139
|
-
--
|
|
462
|
+
--force Overwrite all files (including custom domains)
|
|
463
|
+
--no-claude Skip Claude Code installation and launch
|
|
464
|
+
--no-update-check Skip checking for start-vibing updates
|
|
465
|
+
--help, -h Show this help message
|
|
466
|
+
--version, -v Show version
|
|
140
467
|
|
|
141
468
|
What it does:
|
|
142
|
-
1.
|
|
143
|
-
2.
|
|
144
|
-
3.
|
|
145
|
-
4.
|
|
146
|
-
5. Preserves your existing domains and custom skills
|
|
469
|
+
1. Checks for start-vibing updates (cached for 1 hour)
|
|
470
|
+
2. Creates .claude/ folder with agents, skills, hooks, config
|
|
471
|
+
3. Installs Claude Code if not found on system
|
|
472
|
+
4. Launches Claude Code with --dangerously-skip-permissions
|
|
147
473
|
|
|
148
474
|
Smart Copy Behavior:
|
|
149
475
|
- ALWAYS overwrites: agents/*.md, hooks/*.py, settings.json
|
|
150
476
|
- PRESERVES: skills/*/domains/*.md (your custom domains)
|
|
151
477
|
- MERGES: Adds new skills, keeps your customizations
|
|
152
478
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
479
|
+
Installation:
|
|
480
|
+
For permanent access, install globally:
|
|
481
|
+
npm install -g start-vibing
|
|
482
|
+
|
|
483
|
+
Claude Code Installation:
|
|
484
|
+
Automatically uses official installers:
|
|
485
|
+
- macOS/Linux: curl -fsSL https://claude.ai/install.sh | bash
|
|
486
|
+
- Windows: irm https://claude.ai/install.ps1 | iex
|
|
156
487
|
|
|
157
488
|
Documentation:
|
|
158
|
-
https://github.com/
|
|
489
|
+
https://github.com/LimaTechnologies/ai-development
|
|
159
490
|
`;
|
|
160
491
|
async function main() {
|
|
161
492
|
const args = process.argv.slice(2);
|
|
@@ -168,11 +499,35 @@ async function main() {
|
|
|
168
499
|
process.exit(0);
|
|
169
500
|
}
|
|
170
501
|
const force = args.includes("--force");
|
|
502
|
+
const skipClaude = args.includes("--no-claude");
|
|
503
|
+
const skipUpdateCheck = args.includes("--no-update-check");
|
|
171
504
|
const targetDir = process.cwd();
|
|
505
|
+
if (!skipUpdateCheck) {
|
|
506
|
+
try {
|
|
507
|
+
console.log(" Checking for updates...");
|
|
508
|
+
const updateResult = await checkForUpdates(VERSION);
|
|
509
|
+
if (updateResult.updateAvailable) {
|
|
510
|
+
console.log("");
|
|
511
|
+
console.log(` Update available: v${updateResult.currentVersion} -> v${updateResult.latestVersion}`);
|
|
512
|
+
console.log(` Run: ${getUpdateCommand()}`);
|
|
513
|
+
console.log("");
|
|
514
|
+
} else {
|
|
515
|
+
console.log(" You are using the latest version.");
|
|
516
|
+
console.log("");
|
|
517
|
+
}
|
|
518
|
+
} catch {
|
|
519
|
+
}
|
|
520
|
+
}
|
|
172
521
|
console.log(BANNER);
|
|
173
522
|
console.log(" Setting up Claude Code workflow...\n");
|
|
174
|
-
|
|
175
|
-
|
|
523
|
+
if (isRunningViaNpx()) {
|
|
524
|
+
console.log(" TIP: For permanent access, install globally:");
|
|
525
|
+
console.log(" npm install -g start-vibing");
|
|
526
|
+
console.log(" Then just run: start-vibing");
|
|
527
|
+
console.log("");
|
|
528
|
+
}
|
|
529
|
+
const claudeDir = join3(targetDir, ".claude");
|
|
530
|
+
if (existsSync3(claudeDir) && !force) {
|
|
176
531
|
console.log(" Found existing .claude/ folder.");
|
|
177
532
|
console.log(" Will preserve your custom domains and merge with new files.\n");
|
|
178
533
|
}
|
|
@@ -187,10 +542,45 @@ async function main() {
|
|
|
187
542
|
if (result.preserved > 0) {
|
|
188
543
|
console.log(`\n Preserved ${result.preserved} custom file(s) (domains, etc.)`);
|
|
189
544
|
}
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
545
|
+
if (!skipClaude) {
|
|
546
|
+
console.log("");
|
|
547
|
+
console.log(" ========================================");
|
|
548
|
+
console.log(" Claude Code Setup");
|
|
549
|
+
console.log(" ========================================");
|
|
550
|
+
console.log("");
|
|
551
|
+
if (!isClaudeInstalled()) {
|
|
552
|
+
console.log(" Claude Code not found on system.");
|
|
553
|
+
console.log(" Installing Claude Code...");
|
|
554
|
+
console.log("");
|
|
555
|
+
const installResult = await installClaude();
|
|
556
|
+
if (!installResult.success) {
|
|
557
|
+
console.error("");
|
|
558
|
+
console.error(" Failed to install Claude Code:", installResult.error);
|
|
559
|
+
console.error("");
|
|
560
|
+
console.error(" You can install manually from: https://claude.ai/code");
|
|
561
|
+
console.error("");
|
|
562
|
+
console.log(" Next steps (manual):");
|
|
563
|
+
console.log(" 1. Install Claude Code from https://claude.ai/code");
|
|
564
|
+
console.log(" 2. Restart your terminal");
|
|
565
|
+
console.log(" 3. Run: claude --dangerously-skip-permissions");
|
|
566
|
+
console.log("");
|
|
567
|
+
process.exit(0);
|
|
568
|
+
}
|
|
569
|
+
if (!installResult.alreadyInstalled) {
|
|
570
|
+
console.log("");
|
|
571
|
+
console.log(" Claude Code installed successfully!");
|
|
572
|
+
}
|
|
573
|
+
} else {
|
|
574
|
+
console.log(" Claude Code is already installed.");
|
|
575
|
+
}
|
|
576
|
+
console.log("");
|
|
577
|
+
launchClaude(targetDir);
|
|
578
|
+
} else {
|
|
579
|
+
console.log("\n Next steps:");
|
|
580
|
+
console.log(" 1. Edit .claude/config/project-config.json with your stack");
|
|
581
|
+
console.log(" 2. Run: claude --dangerously-skip-permissions");
|
|
582
|
+
console.log(" 3. Follow the agent workflow for your development\n");
|
|
583
|
+
}
|
|
194
584
|
} catch (error) {
|
|
195
585
|
console.error("\n Error during setup:", error);
|
|
196
586
|
process.exit(1);
|
package/package.json
CHANGED