Files
openclaw/src/cli/program/core-command-descriptors.ts
T
Peter Steinberger a6a0716486 feat(setup): rename Crestodian to OpenClaw system agent
User-facing name is now OpenClaw (the system speaks); internal code name is
system-agent. Gateway methods crestodian.* -> openclaw.chat/openclaw.setup.*,
agent tool -> openclaw, reserved agent ids openclaw + retired crestodian.
openclaw setup routes: onboarding flags -> onboard, -m/--yes -> system agent,
bare configured interactive -> OpenClaw chat, unconfigured -> onboarding.
Hidden crestodian CLI and /crestodian TUI aliases kept; docs moved to
docs/cli/openclaw.md with redirect stub. macOS/Android strings in lockstep.

Refs #107237
2026-07-14 11:03:02 -07:00

146 lines
4.2 KiB
TypeScript

// Core root-command descriptor catalog used for help placeholders and lazy registration.
import { defineCommandDescriptorCatalog } from "./command-descriptor-utils.js";
import type { NamedCommandDescriptor } from "./command-group-descriptors.js";
/** Descriptor shape for root commands owned by the core CLI. */
type CoreCliCommandDescriptor = NamedCommandDescriptor;
const coreCliCommandCatalog = defineCommandDescriptorCatalog([
{
name: "setup",
description: "Chat with OpenClaw; onboard when setup is incomplete",
hasSubcommands: false,
},
{
name: "crestodian", // hidden alias
description: "Deprecated: use openclaw setup",
hasSubcommands: false,
hidden: true,
},
{
name: "onboard",
description: "Guided setup for auth, models, Gateway, workspace, channels, and skills",
hasSubcommands: false,
},
{
name: "configure",
description: "Interactive configuration for credentials, channels, gateway, and agent defaults",
hasSubcommands: false,
},
{
name: "config",
description:
"Non-interactive config helpers (get/set/patch/unset/file/schema/validate). Run without subcommand for guided setup.",
hasSubcommands: true,
},
{
name: "backup",
description: "Create and verify backup archives and SQLite snapshots",
hasSubcommands: true,
},
{
name: "migrate",
description: "Import state from another agent system",
hasSubcommands: true,
},
{
name: "doctor",
description: "Health checks + quick fixes for the gateway and channels",
hasSubcommands: false,
},
{
name: "dashboard",
description: "Open the Control UI with your current token",
hasSubcommands: false,
},
{
name: "reset",
description: "Reset local config/state (keeps the CLI installed)",
hasSubcommands: false,
},
{
name: "uninstall",
description: "Uninstall the gateway service + local data (CLI remains)",
hasSubcommands: false,
},
{
name: "message",
description: "Send, read, and manage messages and channel actions",
hasSubcommands: true,
},
{
name: "mcp",
description: "Manage OpenClaw mcp.servers config and channel bridge",
hasSubcommands: true,
parentDefaultHelp: true,
},
{
name: "transcripts",
description: "Inspect stored transcripts",
hasSubcommands: true,
},
{
name: "agent",
description: "Run an agent turn via the Gateway (use --local for embedded)",
hasSubcommands: false,
},
{
name: "agents",
description: "Manage isolated agents (workspaces + auth + routing)",
hasSubcommands: true,
},
{
name: "status",
description: "Show channel health and recent session recipients",
hasSubcommands: false,
},
{
name: "health",
description: "Fetch health from the running gateway",
hasSubcommands: false,
},
{
name: "audit",
description: "Inspect metadata-only run, tool, and message lifecycle records",
hasSubcommands: false,
},
{
name: "sessions",
description: "List stored conversation sessions",
hasSubcommands: true,
},
{
name: "commitments",
description: "List and manage inferred follow-up commitments",
hasSubcommands: true,
},
{
name: "tasks",
description: "Inspect durable background tasks and TaskFlow state",
hasSubcommands: true,
},
] as const satisfies ReadonlyArray<CoreCliCommandDescriptor>);
/** Static root-command descriptors for the core CLI surface. */
export const CORE_CLI_COMMAND_DESCRIPTORS = coreCliCommandCatalog.descriptors;
/** Return core root-command descriptors in help/registration order. */
export function getCoreCliCommandDescriptors(): ReadonlyArray<CoreCliCommandDescriptor> {
return coreCliCommandCatalog.getDescriptors();
}
/** Return names for all core root commands. */
export function getCoreCliCommandNames(): string[] {
return coreCliCommandCatalog.getNames();
}
/** Return core root commands that own child subcommands. */
export function getCoreCliCommandsWithSubcommands(): string[] {
return coreCliCommandCatalog.getCommandsWithSubcommands();
}
/** Return core root commands whose parent action should default to help. */
export function getCoreCliParentDefaultHelpCommands(): string[] {
return coreCliCommandCatalog.getParentDefaultHelpCommands();
}