vibe-cokit 1.3.0 → 1.4.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/dist/cli.js +93 -10
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,63 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
// @bun
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
9
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
10
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
11
|
+
for (let key of __getOwnPropNames(mod))
|
|
12
|
+
if (!__hasOwnProp.call(to, key))
|
|
13
|
+
__defProp(to, key, {
|
|
14
|
+
get: () => mod[key],
|
|
15
|
+
enumerable: true
|
|
16
|
+
});
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
20
|
+
|
|
21
|
+
// package.json
|
|
22
|
+
var require_package = __commonJS((exports, module) => {
|
|
23
|
+
module.exports = {
|
|
24
|
+
name: "vibe-cokit",
|
|
25
|
+
version: "0.1.0",
|
|
26
|
+
description: "A toolkit for interacting with Claude Code",
|
|
27
|
+
module: "index.ts",
|
|
28
|
+
type: "module",
|
|
29
|
+
bin: {
|
|
30
|
+
"vibe-cokit": "bin/vk.cjs",
|
|
31
|
+
vk: "bin/vk.cjs"
|
|
32
|
+
},
|
|
33
|
+
files: [
|
|
34
|
+
"bin/",
|
|
35
|
+
"dist/",
|
|
36
|
+
"package.json",
|
|
37
|
+
"README.md"
|
|
38
|
+
],
|
|
39
|
+
scripts: {
|
|
40
|
+
build: "bun build src/cli.ts --outdir dist --target bun",
|
|
41
|
+
typecheck: "bunx tsc --noEmit"
|
|
42
|
+
},
|
|
43
|
+
publishConfig: {
|
|
44
|
+
access: "public"
|
|
45
|
+
},
|
|
46
|
+
repository: {
|
|
47
|
+
type: "git",
|
|
48
|
+
url: "git+https://github.com/vibe-cokit/cli.git"
|
|
49
|
+
},
|
|
50
|
+
devDependencies: {
|
|
51
|
+
"@types/bun": "latest"
|
|
52
|
+
},
|
|
53
|
+
peerDependencies: {
|
|
54
|
+
typescript: "^5"
|
|
55
|
+
},
|
|
56
|
+
dependencies: {
|
|
57
|
+
cac: "^6.7.14"
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
});
|
|
3
61
|
|
|
4
62
|
// node_modules/cac/dist/index.mjs
|
|
5
63
|
import { EventEmitter } from "events";
|
|
@@ -602,8 +660,9 @@ class CAC extends EventEmitter {
|
|
|
602
660
|
}
|
|
603
661
|
var cac = (name = "") => new CAC(name);
|
|
604
662
|
var dist_default = cac;
|
|
605
|
-
|
|
606
|
-
|
|
663
|
+
|
|
664
|
+
// src/cli.ts
|
|
665
|
+
var import__package3 = __toESM(require_package(), 1);
|
|
607
666
|
|
|
608
667
|
// src/commands/init.ts
|
|
609
668
|
import { join as join2 } from "path";
|
|
@@ -749,6 +808,16 @@ async function getSkillsVersion() {
|
|
|
749
808
|
}
|
|
750
809
|
return null;
|
|
751
810
|
}
|
|
811
|
+
async function upgradeCli() {
|
|
812
|
+
const { version: currentVersion } = await Promise.resolve().then(() => __toESM(require_package(), 1));
|
|
813
|
+
const { stdout: latestRaw } = await exec("npm", ["view", "vibe-cokit", "version"]);
|
|
814
|
+
const latestVersion = latestRaw.trim();
|
|
815
|
+
if (currentVersion === latestVersion) {
|
|
816
|
+
return { upgraded: false, from: currentVersion, to: latestVersion };
|
|
817
|
+
}
|
|
818
|
+
await exec("bun", ["install", "-g", `vibe-cokit@${latestVersion}`]);
|
|
819
|
+
return { upgraded: true, from: currentVersion, to: latestVersion };
|
|
820
|
+
}
|
|
752
821
|
|
|
753
822
|
// src/commands/init.ts
|
|
754
823
|
async function initCommand() {
|
|
@@ -801,13 +870,24 @@ vibe-cokit update
|
|
|
801
870
|
`);
|
|
802
871
|
log("Verifying prerequisites...");
|
|
803
872
|
await verifyPrerequisites();
|
|
804
|
-
log("Checking
|
|
873
|
+
log("Checking CLI version...");
|
|
874
|
+
try {
|
|
875
|
+
const { upgraded, from: from2, to } = await upgradeCli();
|
|
876
|
+
if (upgraded) {
|
|
877
|
+
log(`CLI upgraded: ${from2} \u2192 ${to}`);
|
|
878
|
+
} else {
|
|
879
|
+
log(`CLI: v${from2} (latest)`);
|
|
880
|
+
}
|
|
881
|
+
} catch {
|
|
882
|
+
log("CLI upgrade skipped (npm registry unavailable)");
|
|
883
|
+
}
|
|
884
|
+
log("Checking config version...");
|
|
805
885
|
const currentSha = await getCurrentVersion();
|
|
806
|
-
log("Fetching latest version
|
|
886
|
+
log("Fetching latest config version...");
|
|
807
887
|
const targetSha = await getRemoteSha(ref);
|
|
808
888
|
if (currentSha && currentSha === targetSha) {
|
|
809
889
|
console.log(`
|
|
810
|
-
\u2713
|
|
890
|
+
\u2713 Config already up-to-date (${currentSha.slice(0, 8)})
|
|
811
891
|
`);
|
|
812
892
|
return;
|
|
813
893
|
}
|
|
@@ -895,8 +975,9 @@ vibe-cokit skills
|
|
|
895
975
|
}
|
|
896
976
|
|
|
897
977
|
// src/commands/help.ts
|
|
978
|
+
var import__package = __toESM(require_package(), 1);
|
|
898
979
|
var HELP_TEXT = `
|
|
899
|
-
vibe-cokit v${version} \u2014 A toolkit for interacting with Claude Code
|
|
980
|
+
vibe-cokit v${import__package.version} \u2014 A toolkit for interacting with Claude Code
|
|
900
981
|
|
|
901
982
|
USAGE
|
|
902
983
|
vk <command> [options]
|
|
@@ -906,7 +987,8 @@ COMMANDS
|
|
|
906
987
|
Clones config repo, copies agents/commands/hooks/prompts/workflows
|
|
907
988
|
to ~/.claude/, adds CLAUDE.md to current directory, runs claude init
|
|
908
989
|
|
|
909
|
-
update [ref] Update vibe-cokit config to latest or specific version
|
|
990
|
+
update [ref] Update vibe-cokit CLI + config to latest or specific version
|
|
991
|
+
Upgrades CLI package via npm, then updates config files
|
|
910
992
|
Compares local version with remote, skips if already up-to-date
|
|
911
993
|
Aliases: upgrade
|
|
912
994
|
|
|
@@ -923,7 +1005,7 @@ COMMANDS
|
|
|
923
1005
|
|
|
924
1006
|
EXAMPLES
|
|
925
1007
|
vk init # Initialize vibe-cokit in current project
|
|
926
|
-
vk update #
|
|
1008
|
+
vk update # Upgrade CLI + update config to latest
|
|
927
1009
|
vk update v1.2.0 # Update to specific tag
|
|
928
1010
|
vk skills # Install/update all skills
|
|
929
1011
|
vk skills main # Install skills from specific branch
|
|
@@ -949,11 +1031,12 @@ function helpCommand() {
|
|
|
949
1031
|
}
|
|
950
1032
|
|
|
951
1033
|
// src/commands/version.ts
|
|
1034
|
+
var import__package2 = __toESM(require_package(), 1);
|
|
952
1035
|
async function versionCommand() {
|
|
953
1036
|
const commitSha = await getCurrentVersion();
|
|
954
1037
|
const skillsSha = await getSkillsVersion();
|
|
955
1038
|
console.log(`
|
|
956
|
-
vibe-cokit v${version}`);
|
|
1039
|
+
vibe-cokit v${import__package2.version}`);
|
|
957
1040
|
if (commitSha) {
|
|
958
1041
|
console.log(` Config commit: ${commitSha.slice(0, 10)}`);
|
|
959
1042
|
} else {
|
|
@@ -1143,5 +1226,5 @@ cli.command("doctor", "Check vibe-cokit setup health").option("--fix", "Auto-fix
|
|
|
1143
1226
|
return doctorCommand();
|
|
1144
1227
|
});
|
|
1145
1228
|
cli.help();
|
|
1146
|
-
cli.version(version);
|
|
1229
|
+
cli.version(import__package3.version);
|
|
1147
1230
|
cli.parse();
|