Documentation
README
Adding a Command
Critical
- Export pattern: Command must export a named async function:
export async function myCommand(options?: OptionType). Never use default exports. - Registration in cli.ts: Every command must be imported and registered with
.command()chain insrc/cli.ts, wrapped withtracked()for telemetry. - Error signaling: Use
throw new Error('__exit__')to exit gracefully without printing the error message. Use chalk for user-facing messages. - Options typing: Commands receiving options must define a TypeScript interface for those options. Pass options as a destructured object parameter.
Instructions
This is the opening of the README. Read the full README on GitHub.