docs(cli): add per-command CLI pages

This commit is contained in:
Peter Steinberger
2026-01-15 06:12:54 +00:00
parent 5b23f847d6
commit 0cbfea79fa
58 changed files with 881 additions and 23 deletions

View File

@@ -4,6 +4,8 @@ import { sessionsCommand } from "../../commands/sessions.js";
import { statusCommand } from "../../commands/status.js";
import { setVerbose } from "../../globals.js";
import { defaultRuntime } from "../../runtime.js";
import { formatDocsLink } from "../../terminal/links.js";
import { theme } from "../../terminal/theme.js";
import { parsePositiveIntOrUndefined } from "./helpers.js";
export function registerStatusHealthSessionsCommands(program: Command) {
@@ -29,6 +31,10 @@ Examples:
clawdbot status --deep --timeout 5000 # tighten probe timeout
clawdbot channels status # gateway channel runtime + probes`,
)
.addHelpText(
"after",
() => `\n${theme.muted("Docs:")} ${formatDocsLink("/cli/status", "docs.clawd.bot/cli/status")}\n`,
)
.action(async (opts) => {
const verbose = Boolean(opts.verbose || opts.debug);
setVerbose(verbose);
@@ -63,6 +69,10 @@ Examples:
.option("--timeout <ms>", "Connection timeout in milliseconds", "10000")
.option("--verbose", "Verbose logging", false)
.option("--debug", "Alias for --verbose", false)
.addHelpText(
"after",
() => `\n${theme.muted("Docs:")} ${formatDocsLink("/cli/health", "docs.clawd.bot/cli/health")}\n`,
)
.action(async (opts) => {
const verbose = Boolean(opts.verbose || opts.debug);
setVerbose(verbose);
@@ -105,6 +115,11 @@ Examples:
Shows token usage per session when the agent reports it; set agents.defaults.contextTokens to see % of your model window.`,
)
.addHelpText(
"after",
() =>
`\n${theme.muted("Docs:")} ${formatDocsLink("/cli/sessions", "docs.clawd.bot/cli/sessions")}\n`,
)
.action(async (opts) => {
setVerbose(Boolean(opts.verbose));
await sessionsCommand(