UNPKG

askexperts

Version:

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

33 lines 1.16 kB
import { registerSendCommand } from "./send.js"; import { registerReceiveCommand } from "./receive.js"; import { registerCreateCommand } from "./create.js"; /** * Helper function to parse comma-separated lists * @param value The comma-separated string * @returns Array of trimmed strings */ export function commaSeparatedList(value) { return value.split(",").map((item) => item.trim()); } /** * Register the stream command with the CLI * * @param program The commander program */ export function registerStreamCommand(program) { const streamCommand = program .command("stream") .description("Stream data over Nostr"); // Add debug option to all subcommands const addDebugOption = (cmd) => cmd.option("-d, --debug", "Enable debug logging"); // Helper to add all common options const addCommonOptions = (cmd) => { addDebugOption(cmd); return cmd; }; // Register all subcommands registerCreateCommand(streamCommand, addCommonOptions); registerSendCommand(streamCommand, addCommonOptions); registerReceiveCommand(streamCommand, addCommonOptions); } //# sourceMappingURL=index.js.map