mime-todo-cli/lib/cli/CLICommand.ts
Tiara Rodney 932d4ad420
init
2026-03-15 03:02:41 +01:00

18 lines
477 B
TypeScript

// Abstract base class for CLI commands — modeled after the Python CLICommand pattern
import type { Argv, ArgumentsCamelCase } from "yargs"
export abstract class CLICommand {
abstract readonly name: string
abstract readonly help: string
abstract readonly description: string
static _subcommands: (new () => CLICommand)[] = []
addArguments(yargs: Argv): Argv {
return yargs
}
async execute(args: ArgumentsCamelCase): Promise<number> {
return 0
}
}