mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-01 15:32:11 +08:00
fix(cli): polish kilodev help output
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@kilocode/cli": minor
|
||||
---
|
||||
|
||||
Support installing a kilodev launcher for running source checkouts from any directory.
|
||||
+26
-25
@@ -1,27 +1,28 @@
|
||||
<!-- Auto-generated by script/generate-cli-docs.ts — do not edit manually -->
|
||||
|
||||
| Command | Description |
|
||||
| ------------------------- | ---------------------------------------------------- |
|
||||
| `kilo acp` | start ACP (Agent Client Protocol) server |
|
||||
| `kilo mcp` | manage MCP (Model Context Protocol) servers |
|
||||
| `kilo [project]` | start kilo tui |
|
||||
| `kilo attach <url>` | attach to a running kilo server |
|
||||
| `kilo run [message..]` | run kilo with a message |
|
||||
| `kilo debug` | debugging and troubleshooting tools |
|
||||
| `kilo auth` | manage AI providers and credentials |
|
||||
| `kilo agent` | manage agents |
|
||||
| `kilo upgrade [target]` | upgrade kilo to the latest or a specific version |
|
||||
| `kilo uninstall` | uninstall kilo and remove all related files |
|
||||
| `kilo serve` | starts a headless kilo server |
|
||||
| `kilo models [provider]` | list all available models |
|
||||
| `kilo stats` | show token usage and cost statistics |
|
||||
| `kilo export [sessionID]` | export session data as JSON |
|
||||
| `kilo import <file>` | import session data from JSON file or URL |
|
||||
| `kilo pr <number>` | fetch and checkout a GitHub PR branch, then run kilo |
|
||||
| `kilo session` | manage sessions |
|
||||
| `kilo remote` | enable remote connection for real-time session relay |
|
||||
| `kilo db` | database tools |
|
||||
| `kilo config` | configuration tools |
|
||||
| `kilo plugin <module>` | install plugin and update config |
|
||||
| `kilo help [command]` | show full CLI reference |
|
||||
| `kilo completion` | generate shell completion script |
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `kilo acp` | start ACP (Agent Client Protocol) server |
|
||||
| `kilo mcp` | manage MCP (Model Context Protocol) servers |
|
||||
| `kilo [project]` | start kilo tui |
|
||||
| `kilo attach <url>` | attach to a running kilo server |
|
||||
| `kilo run [message..]` | run kilo with a message |
|
||||
| `kilo debug` | debugging and troubleshooting tools |
|
||||
| `kilo auth` | manage AI providers and credentials |
|
||||
| `kilo agent` | manage agents |
|
||||
| `kilo upgrade [target]` | upgrade kilo to the latest or a specific version |
|
||||
| `kilo uninstall` | uninstall kilo and remove all related files |
|
||||
| `kilo serve` | starts a headless kilo server |
|
||||
| `kilo models [provider]` | list all available models |
|
||||
| `kilo stats` | show token usage and cost statistics |
|
||||
| `kilo export [sessionID]` | export session data as JSON |
|
||||
| `kilo import <file>` | import session data from JSON file or URL |
|
||||
| `kilo pr <number>` | fetch and checkout a GitHub PR branch, then run kilo |
|
||||
| `kilo session` | manage sessions |
|
||||
| `kilo remote` | enable remote connection for real-time session relay |
|
||||
| `kilo db` | database tools |
|
||||
| `kilo config` | configuration tools |
|
||||
| `kilo dev-setup` | install a `kilodev` shell alias for this checkout |
|
||||
| `kilo plugin <module>` | install plugin and update config |
|
||||
| `kilo help [command]` | show full CLI reference |
|
||||
| `kilo completion` | generate shell completion script |
|
||||
|
||||
@@ -587,7 +587,7 @@ Options:
|
||||
--path directory path to generate the agent file [string]
|
||||
--description what the agent should do [string]
|
||||
--mode agent mode [string] [choices: "all", "primary", "subagent"]
|
||||
--tools comma-separated list of tools to enable (default: all). Available: "bash, read, write, edit, list, glob, grep, webfetch, task, todowrite" [string]
|
||||
--tools comma-separated list of tools to enable (default: all). Available: "bash, read, write, edit, glob, grep, webfetch, task, todowrite" [string]
|
||||
-m, --model model to use in the format of provider/model [string]
|
||||
```
|
||||
|
||||
@@ -826,6 +826,21 @@ Options:
|
||||
--version Show version number [boolean]
|
||||
```
|
||||
|
||||
## kilo dev-setup
|
||||
|
||||
```
|
||||
install a `kilodev` shell alias for this checkout
|
||||
|
||||
Options:
|
||||
--help Show help [boolean]
|
||||
--version Show version number [boolean]
|
||||
--shell shell flavor (auto-detected from $SHELL) [string] [choices: "zsh", "bash", "fish", "powershell"]
|
||||
--rc rc file to modify (auto-detected) [string]
|
||||
-y, --yes skip confirmation [boolean] [default: false]
|
||||
--print just print the snippet, do not modify any file [boolean] [default: false]
|
||||
--dry-run show what would change without writing [boolean] [default: false]
|
||||
```
|
||||
|
||||
## kilo plugin
|
||||
|
||||
```
|
||||
|
||||
@@ -87,12 +87,13 @@ const args = hideBin(process.argv)
|
||||
|
||||
function show(out: string) {
|
||||
const text = out.trimStart()
|
||||
const end = out.endsWith(EOL) ? "" : EOL // kilocode_change - keep shell prompt on the next line
|
||||
if (!text.startsWith("opencode ")) {
|
||||
process.stderr.write(UI.logo() + EOL + EOL)
|
||||
process.stderr.write(text)
|
||||
process.stderr.write(text + end)
|
||||
return
|
||||
}
|
||||
process.stderr.write(out)
|
||||
process.stderr.write(out + end)
|
||||
}
|
||||
|
||||
let cli = yargs(args) // kilocode_change
|
||||
|
||||
@@ -50,7 +50,7 @@ export const DevSetupCommand = cmd({
|
||||
}
|
||||
|
||||
const repo = await detectRepo()
|
||||
const shell = (args.shell as Shell | undefined) ?? detectShell()
|
||||
const shell = args.shell ? parse(args.shell) : detectShell()
|
||||
const snippet = aliasLine(shell, repo)
|
||||
|
||||
if (args.print) {
|
||||
@@ -143,13 +143,20 @@ export const DevAliasCommand = cmd({
|
||||
return
|
||||
}
|
||||
const repo = await detectRepo()
|
||||
process.stdout.write(aliasLine(args.shell as Shell, repo) + "\n")
|
||||
process.stdout.write(aliasLine(parse(args.shell), repo) + "\n")
|
||||
},
|
||||
})
|
||||
|
||||
const { TEXT_HIGHLIGHT: H, TEXT_NORMAL: N, TEXT_DIM: D, TEXT_SUCCESS: S, TEXT_NORMAL_BOLD: B } = UI.Style
|
||||
const Style = UI.Style
|
||||
|
||||
function parse(value: unknown): Shell {
|
||||
if (value === "bash") return value
|
||||
if (value === "fish") return value
|
||||
if (value === "powershell") return value
|
||||
return "zsh"
|
||||
}
|
||||
|
||||
function detectShell(): Shell {
|
||||
if (process.platform === "win32") return "powershell"
|
||||
const sh = path.basename(process.env.SHELL ?? "")
|
||||
|
||||
@@ -23,6 +23,7 @@ import { RemoteCommand } from "../cli/cmd/remote"
|
||||
import { DbCommand } from "../cli/cmd/db"
|
||||
import { ConfigCommand as ConfigCLICommand } from "../cli/cmd/config"
|
||||
import { PluginCommand } from "../cli/cmd/plug"
|
||||
import { DevSetupCommand, DevAliasCommand } from "./cli/dev-setup"
|
||||
import { HelpCommand } from "./help-command"
|
||||
|
||||
// Synthetic entry for the yargs built-in .completion() command so that
|
||||
@@ -55,6 +56,8 @@ export const commands = [
|
||||
RemoteCommand,
|
||||
DbCommand,
|
||||
ConfigCLICommand,
|
||||
DevSetupCommand,
|
||||
DevAliasCommand,
|
||||
PluginCommand,
|
||||
HelpCommand,
|
||||
CompletionCommand,
|
||||
|
||||
Reference in New Issue
Block a user