feat: add colored CLI docs links

This commit is contained in:
Peter Steinberger
2026-01-10 20:50:17 +01:00
parent cf192f8551
commit 1bd5500832
16 changed files with 210 additions and 39 deletions

View File

@@ -3,6 +3,7 @@ import type { Command } from "commander";
import { buildGatewayConnectionDetails } from "../gateway/call.js";
import { parseLogLine } from "../logging/parse-log-line.js";
import { defaultRuntime } from "../runtime.js";
import { formatDocsLink } from "../terminal/links.js";
import { colorize, isRich, theme } from "../terminal/theme.js";
import { addGatewayClientOptions, callGatewayFromCli } from "./gateway-rpc.js";
@@ -154,7 +155,15 @@ export function registerLogsCli(program: Command) {
.option("--interval <ms>", "Polling interval in ms", "1000")
.option("--json", "Emit JSON log lines", false)
.option("--plain", "Plain text output (no ANSI styling)", false)
.option("--no-color", "Disable ANSI colors");
.option("--no-color", "Disable ANSI colors")
.addHelpText(
"after",
() =>
`\n${theme.muted("Docs:")} ${formatDocsLink(
"/logging",
"docs.clawd.bot/logging",
)}\n`,
);
addGatewayClientOptions(logs);