diff --git a/packages/opencode/src/kilocode/commands.ts b/packages/opencode/src/kilocode/commands.ts index 989d055f835..af015a84959 100644 --- a/packages/opencode/src/kilocode/commands.ts +++ b/packages/opencode/src/kilocode/commands.ts @@ -24,6 +24,14 @@ import { RemoteCommand } from "../cli/cmd/remote" import { DbCommand } from "../cli/cmd/db" import { HelpCommand } from "./help-command" +// Synthetic entry for the yargs built-in .completion() command so that +// generateHelp --all and cli-reference.md include it automatically. +const CompletionCommand: CommandModule = { + command: "completion", + describe: "generate shell completion script", + handler: () => {}, +} + export const commands: CommandModule[] = [ AcpCommand, McpCommand, @@ -46,4 +54,5 @@ export const commands: CommandModule[] = [ RemoteCommand, DbCommand, HelpCommand, + CompletionCommand, ] diff --git a/packages/opencode/src/kilocode/help.ts b/packages/opencode/src/kilocode/help.ts index 1919fee4bb4..206ca744bbb 100644 --- a/packages/opencode/src/kilocode/help.ts +++ b/packages/opencode/src/kilocode/help.ts @@ -227,11 +227,6 @@ export async function generateCommandTable(options?: { commands?: Cmd[] }) { }) } - rows.push({ - display: "kilo completion", - description: "generate shell completion script", - }) - const lines = ["| Command | Description |", "| --- | --- |"] for (const row of rows) {