import { BaseCommand } from "https://deno.land/x/cliffy@v0.8.0/packages/command/lib/base-command.ts";
Base command implementation without pre configured command's and option's.
Properties
Methods
Execute external sub-command.
Execute help command if help flag is set.
Parse command line args definition.
Match commands and arguments from command line arguments.
Parse command line args.
Split arguments string into args and types: -v, --verbose [arg:boolean]
Validate environment variables.
Add new command alias.
Don't throw an error if the command was called without arguments.
Set command arguments.
Add new sub-command.
Register command specific custom type.
Set default command. The default command will be called if no action handler is registered.
Set command description.
Add new environment variable.
Handle error. If .throwErrors()
was called all error's will be thrown, otherwise Deno.exit(1)
will be called.
Add new command example.
Get command name aliases.
Get arguments definition.
Get argument.
Get arguments.
Get base option by name.
Get sub-command with given name.
Get sub-commands.
Get command description.
Get environment variable with given name.
Get environment variables.
Get example with given name.
Get examples.
Get global option from parent command's by name.
Get or set command name.
Get full command path of all parent command names's and current command name.
Get command version.
Make command globally available.
Check if command has arguments.
Checks whether the command has a sub-command with given name or not.
Checks whether the command has sub-commands or not.
Checks whether the command has an environment variable with given name or not.
Checks whether the command has environment variables or not.
Checks whether the command has an example with given name or not.
Checks whether the command has examples or not.
Checks whether the command has an option with given name or not.
Checks whether the command has options or not.
Execute help command.
Write line to stdout.
Write line to stderr.
Get or set command name.
Add new option (flag).
Add new option (flag).
Parse command line arguments and execute matched command.
Remove sub-command with given name.
Remove option by name.
Reset internal command reference to main command.
Reset internal command reference to child command with given name.
Throw error's instead of calling Deno.exit()
to handle error's manually.
This has no effect for parent commands. Only for the command on which this method was called and all child commands.
Register command specific custom type.
Disable parsing arguments. If enabled the raw arguments will be passed to the action handler. This has no effect for parent or child commands. Only for the command on which this method was called.
Set command version.
Write line to stdout without line break.
Write line to stderr without line break.