vibe-cokit 1.14.0 → 1.16.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 +30 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -4481,6 +4481,33 @@ ${msg}
|
|
|
4481
4481
|
}
|
|
4482
4482
|
}
|
|
4483
4483
|
|
|
4484
|
+
// src/commands/providers/claude-code.ts
|
|
4485
|
+
import { spawn } from "child_process";
|
|
4486
|
+
function runClaudeCodeCLI(args = []) {
|
|
4487
|
+
const skipPerms = ["--dangerously-skip-permissions"];
|
|
4488
|
+
const allArgs = [...skipPerms, ...args];
|
|
4489
|
+
return new Promise((resolve, reject) => {
|
|
4490
|
+
const child = spawn("claude", allArgs, {
|
|
4491
|
+
stdio: "inherit",
|
|
4492
|
+
shell: process.platform === "win32"
|
|
4493
|
+
});
|
|
4494
|
+
child.on("error", (err) => {
|
|
4495
|
+
const msg = getErrorMsg(err);
|
|
4496
|
+
console.error(`Error running Claude Code: ${msg}`);
|
|
4497
|
+
process.exit(1);
|
|
4498
|
+
});
|
|
4499
|
+
child.on("exit", (code) => {
|
|
4500
|
+
if (code !== 0 && code !== null) {
|
|
4501
|
+
process.exit(code);
|
|
4502
|
+
}
|
|
4503
|
+
resolve();
|
|
4504
|
+
});
|
|
4505
|
+
});
|
|
4506
|
+
}
|
|
4507
|
+
async function claudeCodeCommand(args = []) {
|
|
4508
|
+
await runClaudeCodeCLI(args);
|
|
4509
|
+
}
|
|
4510
|
+
|
|
4484
4511
|
// src/cli.ts
|
|
4485
4512
|
var debugMode = process.argv.includes("--debug") || process.env["VK_DEBUG"] === "1";
|
|
4486
4513
|
await logger.init(debugMode);
|
|
@@ -4510,6 +4537,9 @@ cli.command("tools [action] [...args]", "Developer utilities (kill-port, etc.)")
|
|
|
4510
4537
|
cli.command("docker container stop all", "Stop all docker containers").action(() => {
|
|
4511
4538
|
return dockerStopAllCommand();
|
|
4512
4539
|
});
|
|
4540
|
+
cli.command("ccd [...args]", "Run claude with --dangerously-skip-permissions").action((args) => {
|
|
4541
|
+
return claudeCodeCommand(args);
|
|
4542
|
+
});
|
|
4513
4543
|
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));
|
|
4514
4544
|
cli.option("--debug", "Enable debug logging to ~/.vk/logs/");
|
|
4515
4545
|
cli.help();
|