@@ -76,7 +76,7 @@ export class Command<
7676
7777 /**
7878 * Parses the provided tokens (or default CLI arguments) into a typed CommandInput.
79- * @param tokens - Optional array of tokens to parse; defaults to process/Deno args .
79+ * @param tokens - Optional array of tokens to parse; defaults to process.argv.slice(2) .
8080 * @returns The parsed CommandInput with typed args, options, and unparsed tokens.
8181 */
8282 parse ( tokens ?: string [ ] ) : CommandInput < Options , Arguments > {
@@ -90,26 +90,10 @@ export class Command<
9090 * Runs the command with the provided tokens (or default CLI arguments).
9191 * Parses input, handles flags like --help/--version, executes handlers, and processes subcommands.
9292 * Automatically adds --help/-h and --version/-v options unless hidden.
93- * @param tokens - Optional array of tokens to run with; defaults to process/Deno args .
93+ * @param tokens - Optional array of tokens to run with; defaults to process.argv.slice(2) .
9494 * @returns A Promise that resolves when the command execution completes.
9595 */
9696 async run ( tokens ?: string [ ] ) : Promise < void > {
97- // Auto-add --help / --version unless hidden
98- if ( ! this [ $config ] ( ) . hidden . help ) {
99- this . option ( '--help' , {
100- description : `Show help` ,
101- kind : 'flag' ,
102- shortFlag : '-h' ,
103- } ) ;
104- }
105-
106- if ( ! this [ $config ] ( ) . hidden . version ) {
107- this . option ( '--version' , {
108- description : `Show version` ,
109- kind : 'flag' ,
110- shortFlag : '-v' ,
111- } ) ;
112- }
11397 await runner ( this [ $config ] ( ) , tokens ) ;
11498 }
11599
0 commit comments