docs: align CLI docs and help surface

This commit is contained in:
Peter Steinberger
2026-02-22 20:04:08 +01:00
parent 42b3c52350
commit 72446f419f
10 changed files with 194 additions and 4 deletions

View File

@@ -4,6 +4,8 @@ import path from "node:path";
import { Command, Option } from "commander";
import { resolveStateDir } from "../config/paths.js";
import { routeLogsToStderr } from "../logging/console.js";
import { formatDocsLink } from "../terminal/links.js";
import { theme } from "../terminal/theme.js";
import { pathExists } from "../utils.js";
import {
buildFishOptionCompletionLine,
@@ -230,6 +232,11 @@ export function registerCompletionCli(program: Command) {
program
.command("completion")
.description("Generate shell completion script")
.addHelpText(
"after",
() =>
`\n${theme.muted("Docs:")} ${formatDocsLink("/cli/completion", "docs.openclaw.ai/cli/completion")}\n`,
)
.addOption(
new Option("-s, --shell <shell>", "Shell to generate completion for (default: zsh)").choices(
COMPLETION_SHELLS,