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

@@ -1,5 +1,7 @@
import type { Command } from "commander";
import { defaultRuntime } from "../runtime.js";
import { formatDocsLink } from "../terminal/links.js";
import { theme } from "../terminal/theme.js";
import { runTui } from "../tui/tui.js";
import { parseTimeoutMs } from "./parse-timeout.js";
@@ -25,6 +27,14 @@ export function registerTuiCli(program: Command) {
"Agent timeout in ms (defaults to agents.defaults.timeoutSeconds)",
)
.option("--history-limit <n>", "History entries to load", "200")
.addHelpText(
"after",
() =>
`\n${theme.muted("Docs:")} ${formatDocsLink(
"/tui",
"docs.clawd.bot/tui",
)}\n`,
)
.action(async (opts) => {
try {
const timeoutMs = parseTimeoutMs(opts.timeoutMs);