Files
openclaw/src/cli/program/core-command-descriptors.ts
Peter Steinberger 9a93a52a8a feat(onboard): recommendations store with once-semantics and self-naming bootstrap (#110173)
* feat(onboarding): persist app recommendations once

* feat(onboarding): add self-naming birth sequence

* chore(wizard): hoist bootstrap-defer imports to the top of the module

* docs(bootstrap): persist agreed identity into IDENTITY.md and SOUL.md as well

* docs: regenerate docs map after onboarding plan merge

* fix(wizard): reuse a pending stored offer instead of rescanning apps

* fix(onboard): deduplicate bootstrap recommendations
2026-07-17 23:42:01 +01: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: true,
},
{
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();
}