vibe-cokit 1.13.0 → 1.15.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 +63 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -3388,6 +3388,8 @@ COMMANDS
|
|
|
3388
3388
|
plugin install Install Claude Code plugins (code-review, typescript-lsp, etc.)
|
|
3389
3389
|
plugin uninstall Remove Claude Code plugins
|
|
3390
3390
|
|
|
3391
|
+
docker container stop all Stop all Docker containers
|
|
3392
|
+
|
|
3391
3393
|
help Show this detailed usage guide
|
|
3392
3394
|
|
|
3393
3395
|
version Show version and installed commit IDs
|
|
@@ -3409,6 +3411,7 @@ EXAMPLES
|
|
|
3409
3411
|
vk plugin install context7 code-review # Install specific plugins
|
|
3410
3412
|
vk plugin install --all # Install all plugins
|
|
3411
3413
|
vk plugin uninstall hookify # Remove a plugin
|
|
3414
|
+
vk docker container stop all # Stop all docker containers
|
|
3412
3415
|
vk doctor # Health check setup
|
|
3413
3416
|
vk doctor --fix # Auto-fix setup issues
|
|
3414
3417
|
|
|
@@ -4448,6 +4451,60 @@ async function logsCommand(options) {
|
|
|
4448
4451
|
return showLogs(lines);
|
|
4449
4452
|
}
|
|
4450
4453
|
|
|
4454
|
+
// src/commands/docker.ts
|
|
4455
|
+
import { exec as exec7 } from "child_process";
|
|
4456
|
+
import { promisify as promisify7 } from "util";
|
|
4457
|
+
var execAsync = promisify7(exec7);
|
|
4458
|
+
async function dockerStopAllCommand() {
|
|
4459
|
+
try {
|
|
4460
|
+
console.log(`
|
|
4461
|
+
Stopping all Docker containers...`);
|
|
4462
|
+
const { stdout: containerIds } = await execAsync("docker ps -a -q");
|
|
4463
|
+
if (!containerIds.trim()) {
|
|
4464
|
+
console.log(`\u2713 No Docker containers found to stop
|
|
4465
|
+
`);
|
|
4466
|
+
return;
|
|
4467
|
+
}
|
|
4468
|
+
const ids = containerIds.trim().replace(/\n/g, " ");
|
|
4469
|
+
const { stdout } = await execAsync(`docker stop ${ids}`);
|
|
4470
|
+
console.log(`\u2713 Successfully stopped containers:
|
|
4471
|
+
${stdout.trim()}
|
|
4472
|
+
`);
|
|
4473
|
+
} catch (err) {
|
|
4474
|
+
const msg = getErrorMsg(err);
|
|
4475
|
+
logError("docker container stop all", err);
|
|
4476
|
+
console.error(`
|
|
4477
|
+
\u2717 Failed to stop containers:
|
|
4478
|
+
${msg}
|
|
4479
|
+
`);
|
|
4480
|
+
process.exit(1);
|
|
4481
|
+
}
|
|
4482
|
+
}
|
|
4483
|
+
|
|
4484
|
+
// src/commands/providers/claude-code.ts
|
|
4485
|
+
import { exec as exec8 } from "child_process";
|
|
4486
|
+
import { promisify as promisify8 } from "util";
|
|
4487
|
+
var execAsync2 = promisify8(exec8);
|
|
4488
|
+
async function runClaudeCodeCLI(args = []) {
|
|
4489
|
+
const skipPerms = ["--dangerously-skip-permissions"];
|
|
4490
|
+
const allArgs = [...skipPerms, ...args];
|
|
4491
|
+
const cmd = `claude ${allArgs.join(" ")}`;
|
|
4492
|
+
try {
|
|
4493
|
+
const { stdout, stderr } = await execAsync2(cmd);
|
|
4494
|
+
if (stdout)
|
|
4495
|
+
process.stdout.write(stdout);
|
|
4496
|
+
if (stderr)
|
|
4497
|
+
process.stderr.write(stderr);
|
|
4498
|
+
} catch (err) {
|
|
4499
|
+
const msg = getErrorMsg(err);
|
|
4500
|
+
console.error(`Error running Claude Code: ${msg}`);
|
|
4501
|
+
process.exit(1);
|
|
4502
|
+
}
|
|
4503
|
+
}
|
|
4504
|
+
async function claudeCodeCommand(args = []) {
|
|
4505
|
+
await runClaudeCodeCLI(args);
|
|
4506
|
+
}
|
|
4507
|
+
|
|
4451
4508
|
// src/cli.ts
|
|
4452
4509
|
var debugMode = process.argv.includes("--debug") || process.env["VK_DEBUG"] === "1";
|
|
4453
4510
|
await logger.init(debugMode);
|
|
@@ -4474,6 +4531,12 @@ cli.command("plugin [action] [...plugins]", "Manage plugins (install/uninstall)"
|
|
|
4474
4531
|
cli.command("tools [action] [...args]", "Developer utilities (kill-port, etc.)").action((action, args) => {
|
|
4475
4532
|
return toolsCommand(action, args);
|
|
4476
4533
|
});
|
|
4534
|
+
cli.command("docker container stop all", "Stop all docker containers").action(() => {
|
|
4535
|
+
return dockerStopAllCommand();
|
|
4536
|
+
});
|
|
4537
|
+
cli.command("ccd [...args]", "Run claude with --dangerously-skip-permissions").action((args) => {
|
|
4538
|
+
return claudeCodeCommand(args);
|
|
4539
|
+
});
|
|
4477
4540
|
cli.command("logs", "View or manage diagnostic log files (~/.vk/logs/)").option("--tail <n>", "Number of lines to show (default: 50)").option("--clear", "Delete all log files").option("--path", "Print log directory path").action((options) => logsCommand(options));
|
|
4478
4541
|
cli.option("--debug", "Enable debug logging to ~/.vk/logs/");
|
|
4479
4542
|
cli.help();
|