start-vibing 2.0.41 → 2.0.42
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 +4 -2
- package/dist/cli.js +71 -23
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -35,9 +35,9 @@ bunx start-vibing # bun (faster)
|
|
|
35
35
|
|
|
36
36
|
## What It Does
|
|
37
37
|
|
|
38
|
-
### 1. Auto-installs Claude Code
|
|
38
|
+
### 1. Auto-installs Claude Code (Native)
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
Installs Claude Code using the official **native installer** (recommended):
|
|
41
41
|
|
|
42
42
|
| Platform | Installation Command |
|
|
43
43
|
| -------------------- | ------------------------------------------------- |
|
|
@@ -45,6 +45,8 @@ If Claude Code is not found on your system, it automatically installs using offi
|
|
|
45
45
|
| Windows (PowerShell) | `irm https://claude.ai/install.ps1 \| iex` |
|
|
46
46
|
| Windows (CMD) | Downloads and runs `install.cmd` |
|
|
47
47
|
|
|
48
|
+
**Automatic Migration:** If you have an old npm installation, it automatically migrates to native installer for better auto-update support.
|
|
49
|
+
|
|
48
50
|
### 2. Sets Up Complete Workflow
|
|
49
51
|
|
|
50
52
|
Creates a `.claude/` folder with:
|
package/dist/cli.js
CHANGED
|
@@ -324,8 +324,55 @@ import { homedir } from "os";
|
|
|
324
324
|
function isClaudeInstalled() {
|
|
325
325
|
return commandExists("claude");
|
|
326
326
|
}
|
|
327
|
+
function isNpmInstallation() {
|
|
328
|
+
const { isWindows } = getPlatformInfo();
|
|
329
|
+
try {
|
|
330
|
+
const whichCmd = isWindows ? "where claude" : "which claude";
|
|
331
|
+
const result = spawnSync(isWindows ? "cmd" : "sh", isWindows ? ["/c", whichCmd] : ["-c", whichCmd], {
|
|
332
|
+
encoding: "utf-8",
|
|
333
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
334
|
+
timeout: 5000
|
|
335
|
+
});
|
|
336
|
+
if (result.stdout) {
|
|
337
|
+
const path = result.stdout.toLowerCase();
|
|
338
|
+
return path.includes("node_modules") || path.includes("\\npm\\") || path.includes("/npm/");
|
|
339
|
+
}
|
|
340
|
+
return false;
|
|
341
|
+
} catch {
|
|
342
|
+
return false;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
async function migrateToNative() {
|
|
346
|
+
console.log(" Detected npm installation (deprecated)");
|
|
347
|
+
console.log(" Migrating to native installer...");
|
|
348
|
+
console.log(" Running: claude install");
|
|
349
|
+
console.log("");
|
|
350
|
+
try {
|
|
351
|
+
execSync2("claude install", {
|
|
352
|
+
stdio: "inherit",
|
|
353
|
+
timeout: 120000
|
|
354
|
+
});
|
|
355
|
+
console.log("");
|
|
356
|
+
console.log(" Migration to native installer completed!");
|
|
357
|
+
console.log(" Auto-updates are now enabled.");
|
|
358
|
+
return { success: true, alreadyInstalled: true, migrated: true };
|
|
359
|
+
} catch (error) {
|
|
360
|
+
console.log("");
|
|
361
|
+
console.log(" Migration failed, but Claude Code is still functional.");
|
|
362
|
+
console.log(" You can manually run: claude install");
|
|
363
|
+
return {
|
|
364
|
+
success: true,
|
|
365
|
+
alreadyInstalled: true,
|
|
366
|
+
migrated: false,
|
|
367
|
+
error: error instanceof Error ? error.message : "Migration failed"
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
}
|
|
327
371
|
async function installClaude() {
|
|
328
372
|
if (isClaudeInstalled()) {
|
|
373
|
+
if (isNpmInstallation()) {
|
|
374
|
+
return await migrateToNative();
|
|
375
|
+
}
|
|
329
376
|
return { success: true, alreadyInstalled: true };
|
|
330
377
|
}
|
|
331
378
|
const { platform: platform2, shell, isWindows } = getPlatformInfo();
|
|
@@ -814,10 +861,13 @@ ${BANNER}
|
|
|
814
861
|
npm install -g start-vibing
|
|
815
862
|
|
|
816
863
|
Claude Code Installation:
|
|
817
|
-
Automatically uses official installers:
|
|
864
|
+
Automatically uses official native installers:
|
|
818
865
|
- macOS/Linux: curl -fsSL https://claude.ai/install.sh | bash
|
|
819
866
|
- Windows: irm https://claude.ai/install.ps1 | iex
|
|
820
867
|
|
|
868
|
+
If npm installation detected, automatically migrates to native
|
|
869
|
+
for better auto-update support.
|
|
870
|
+
|
|
821
871
|
Documentation:
|
|
822
872
|
https://github.com/LimaTechnologies/ai-development
|
|
823
873
|
`;
|
|
@@ -901,30 +951,28 @@ async function main() {
|
|
|
901
951
|
console.log(" Claude Code Setup");
|
|
902
952
|
console.log(" ========================================");
|
|
903
953
|
console.log("");
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
console.
|
|
954
|
+
const installResult = await installClaude();
|
|
955
|
+
if (!installResult.success) {
|
|
956
|
+
console.error("");
|
|
957
|
+
console.error(" Failed to install Claude Code:", installResult.error);
|
|
958
|
+
console.error("");
|
|
959
|
+
console.error(" You can install manually from: https://claude.ai/code");
|
|
960
|
+
console.error("");
|
|
961
|
+
console.log(" Next steps (manual):");
|
|
962
|
+
console.log(" 1. Install Claude Code from https://claude.ai/code");
|
|
963
|
+
console.log(" 2. Restart your terminal");
|
|
964
|
+
console.log(" 3. Run: claude --dangerously-skip-permissions");
|
|
907
965
|
console.log("");
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
console.log(" Next steps (manual):");
|
|
916
|
-
console.log(" 1. Install Claude Code from https://claude.ai/code");
|
|
917
|
-
console.log(" 2. Restart your terminal");
|
|
918
|
-
console.log(" 3. Run: claude --dangerously-skip-permissions");
|
|
919
|
-
console.log("");
|
|
920
|
-
process.exit(0);
|
|
921
|
-
}
|
|
922
|
-
if (!installResult.alreadyInstalled) {
|
|
923
|
-
console.log("");
|
|
924
|
-
console.log(" Claude Code installed successfully!");
|
|
925
|
-
}
|
|
966
|
+
process.exit(0);
|
|
967
|
+
}
|
|
968
|
+
if (installResult.migrated) {
|
|
969
|
+
console.log("");
|
|
970
|
+
console.log(" Migrated to native installer (auto-updates enabled).");
|
|
971
|
+
} else if (installResult.alreadyInstalled) {
|
|
972
|
+
console.log(" Claude Code is ready (native installer).");
|
|
926
973
|
} else {
|
|
927
|
-
console.log("
|
|
974
|
+
console.log("");
|
|
975
|
+
console.log(" Claude Code installed successfully!");
|
|
928
976
|
}
|
|
929
977
|
if (!skipMcp && isClaudeMcpReady()) {
|
|
930
978
|
console.log("");
|
package/package.json
CHANGED