vibe-coding-master 0.2.12 → 0.2.13

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 CHANGED
@@ -50,9 +50,18 @@ From npm:
50
50
 
51
51
  ```bash
52
52
  npm install -g vibe-coding-master
53
+ vcm --version
53
54
  vcm
54
55
  ```
55
56
 
57
+ Useful CLI flags:
58
+
59
+ ```bash
60
+ vcm --help
61
+ vcm --version
62
+ vcm --host=127.0.0.1 --port=4173
63
+ ```
64
+
56
65
  From source:
57
66
 
58
67
  ```bash
package/dist/main.js CHANGED
@@ -10,9 +10,15 @@ export function parseMainArgs(argv) {
10
10
  if (arg === "--dev") {
11
11
  options.dev = true;
12
12
  }
13
+ else if (arg === "--help" || arg === "-h") {
14
+ options.help = true;
15
+ }
13
16
  else if (arg === "--open") {
14
17
  options.open = true;
15
18
  }
19
+ else if (arg === "--version" || arg === "-v") {
20
+ options.version = true;
21
+ }
16
22
  else if (arg.startsWith("--host=")) {
17
23
  options.host = arg.slice("--host=".length);
18
24
  }
@@ -24,6 +30,14 @@ export function parseMainArgs(argv) {
24
30
  }
25
31
  export async function main(argv = process.argv.slice(2)) {
26
32
  const options = parseMainArgs(argv);
33
+ if (options.version) {
34
+ console.log(readPackageVersion());
35
+ return;
36
+ }
37
+ if (options.help) {
38
+ console.log(renderHelp());
39
+ return;
40
+ }
27
41
  const backendPort = options.port ?? DEFAULT_BACKEND_PORT;
28
42
  const host = options.host ?? "127.0.0.1";
29
43
  const backend = await startServer({
@@ -60,6 +74,31 @@ export async function main(argv = process.argv.slice(2)) {
60
74
  process.exit(0);
61
75
  });
62
76
  }
77
+ function readPackageVersion() {
78
+ const packageJsonPath = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..", "package.json");
79
+ try {
80
+ const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
81
+ if (typeof packageJson.version === "string" && packageJson.version.trim()) {
82
+ return packageJson.version;
83
+ }
84
+ }
85
+ catch {
86
+ // Fall through to an explicit unknown version instead of starting the server.
87
+ }
88
+ return "unknown";
89
+ }
90
+ function renderHelp() {
91
+ return `Usage:
92
+ vcm [options]
93
+
94
+ Options:
95
+ --host=<host> Host to bind. Default: 127.0.0.1
96
+ --port=<port> Backend port. Default: ${DEFAULT_BACKEND_PORT}
97
+ --open Open behavior flag for compatible launchers.
98
+ --dev Start with Vite dev frontend.
99
+ -v, --version Print VCM version and exit.
100
+ -h, --help Print this help and exit.`;
101
+ }
63
102
  function isMainModule() {
64
103
  const argvPath = process.argv[1];
65
104
  if (!argvPath) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibe-coding-master",
3
- "version": "0.2.12",
3
+ "version": "0.2.13",
4
4
  "description": "Local GUI session cockpit for Claude Code role sessions.",
5
5
  "type": "module",
6
6
  "files": [