CLI: improve command descriptions in help output (#18486)
* CLI: clarify config vs configure descriptions * CLI: improve top-level command descriptions * CLI: make direct command help more descriptive * CLI: add commands hint to root help * CLI: show root help hint in implicit help output * CLI: add help example for command-specific help * CLI: tweak root subcommand marker spacing * CLI: mark clawbot as subcommand root in help * CLI: derive subcommand markers from registry metadata * CLI: escape help regex CLI name
This commit is contained in:
committed by
GitHub
parent
05a83b9e97
commit
b25f334fa2
@@ -16,6 +16,7 @@ import { runChannelLogin, runChannelLogout } from "./channel-auth.js";
|
||||
import { formatCliChannelOptions } from "./channel-options.js";
|
||||
import { runCommandWithRuntime } from "./cli-utils.js";
|
||||
import { hasExplicitOptions } from "./command-options.js";
|
||||
import { formatHelpExamples } from "./help-format.js";
|
||||
|
||||
const optionNamesAdd = [
|
||||
"channel",
|
||||
@@ -70,11 +71,19 @@ export function registerChannelsCli(program: Command) {
|
||||
const channelNames = formatCliChannelOptions();
|
||||
const channels = program
|
||||
.command("channels")
|
||||
.description("Manage chat channel accounts")
|
||||
.description("Manage connected chat channels and accounts")
|
||||
.addHelpText(
|
||||
"after",
|
||||
() =>
|
||||
`\n${theme.muted("Docs:")} ${formatDocsLink(
|
||||
`\n${theme.heading("Examples:")}\n${formatHelpExamples([
|
||||
["openclaw channels list", "List configured channels and auth profiles."],
|
||||
["openclaw channels status --probe", "Run channel status checks and probes."],
|
||||
[
|
||||
"openclaw channels add --channel telegram --token <token>",
|
||||
"Add or update a channel account non-interactively.",
|
||||
],
|
||||
["openclaw channels login --channel whatsapp", "Link a WhatsApp Web account."],
|
||||
])}\n\n${theme.muted("Docs:")} ${formatDocsLink(
|
||||
"/cli/channels",
|
||||
"docs.openclaw.ai/cli/channels",
|
||||
)}\n`,
|
||||
|
||||
Reference in New Issue
Block a user