MCPcopy Create free account
hub / github.com/agenticsorg/edge-agents / printCommandHelp

Function printCommandHelp

scripts/sparc2/src/cli/cli.ts:63–77  ·  view source on GitHub ↗

* Print help for a specific command * @param command Command to print help for

(command: Command)

Source from the content-addressed store, hash-verified

61 * @param command Command to print help for
62 */
63function printCommandHelp(command: Command): void {
64 console.log(`SPARC 2.0 CLI v${VERSION}`);
65 console.log(`\nCommand: ${command.name}`);
66 console.log(`\n${command.description}`);
67 console.log("\nOptions:");
68
69 for (const option of command.options) {
70 const shortFlag = option.shortName ? `-${option.shortName}, ` : " ";
71 const required = option.required ? " (required)" : "";
72 const defaultValue = option.default !== undefined ? ` (default: ${option.default})` : "";
73 console.log(
74 ` ${shortFlag}--${option.name.padEnd(15)} ${option.description}${required}${defaultValue}`,
75 );
76 }
77}
78
79/**
80 * Analyze command action

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected