fix(cli): restore native --help for subcommands

This commit is contained in:
Alex Alecu
2026-04-08 12:07:12 +03:00
parent cf1a120999
commit 7ecc076397
+2 -11
View File
@@ -78,8 +78,8 @@ let cli = yargs(hideBin(process.argv))
.parserConfiguration({ "populate--": true })
.scriptName("kilo") // kilocode_change
.wrap(100)
.help(false)
.option("help", { describe: "show help", type: "boolean", alias: "h" })
.help("help", "show help")
.alias("help", "h")
.version("version", "show version number", Installation.VERSION)
.alias("version", "v")
.option("print-logs", {
@@ -92,15 +92,6 @@ let cli = yargs(hideBin(process.argv))
choices: ["DEBUG", "INFO", "WARN", "ERROR"],
})
.middleware(async (opts) => {
if (opts.help) {
cli.showHelp()
process.exit(0)
}
if (opts.version) {
process.stdout.write(Installation.VERSION + "\n")
process.exit(0)
}
await Log.init({
print: process.argv.includes("--print-logs"),
dev: Installation.isLocal(),