mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-25 18:54:09 +02:00
30 lines
788 B
TypeScript
30 lines
788 B
TypeScript
import type { Command } from "commander";
|
|
import {
|
|
getCoreCliCommandDescriptors,
|
|
getCoreCliCommandNames,
|
|
getCoreCliCommandsWithSubcommands,
|
|
type CommandRegistration,
|
|
registerCoreCliByName,
|
|
registerCoreCliCommands,
|
|
} from "./command-registry-core.js";
|
|
import type { ProgramContext } from "./context.js";
|
|
import { registerSubCliCommands } from "./register.subclis.js";
|
|
|
|
export {
|
|
getCoreCliCommandDescriptors,
|
|
getCoreCliCommandNames,
|
|
getCoreCliCommandsWithSubcommands,
|
|
registerCoreCliByName,
|
|
registerCoreCliCommands,
|
|
};
|
|
export type { CommandRegistration };
|
|
|
|
export function registerProgramCommands(
|
|
program: Command,
|
|
ctx: ProgramContext,
|
|
argv: string[] = process.argv,
|
|
) {
|
|
registerCoreCliCommands(program, ctx, argv);
|
|
registerSubCliCommands(program, argv);
|
|
}
|