UNPKG

askexperts

Version:

AskExperts SDK: build and use AI experts - ask them questions and pay with bitcoin on an open protocol

36 lines 1.15 kB
import { registerAddCommand } from "./add.js"; import { registerListCommand } from "./list.js"; import { registerWhoamiCommand } from "./whoami.js"; import { registerSwitchCommand } from "./switch.js"; import { registerSignupCommand } from "./signup.js"; /** * Add debug option to a command * @param cmd The commander command * @returns The command with debug option added */ const addDebugOption = (cmd) => cmd.option("-d, --debug", "Enable debug output"); /** * Add common options to a command * @param cmd The commander command * @returns The command with common options added */ export const addCommonOptions = (cmd) => { addDebugOption(cmd); return cmd; }; /** * Register all user commands with the CLI * * @param program The commander program */ export function registerUserCommands(program) { const userCommand = program .command("user") .description("Manage users"); registerAddCommand(userCommand); registerListCommand(userCommand); registerWhoamiCommand(userCommand); registerSwitchCommand(userCommand); registerSignupCommand(userCommand); } //# sourceMappingURL=index.js.map