the flag/arg name or tokens.
the description or config object.
the option's type.
the option's default value.
When true injects -- abort arg resulting in all arguments being added to result.__
enables/disables abort for command.
Creates long description about the command.
the text to be displayed about the command.
Binds an action to be called when parsed command or alias is matched.
the callback action.
Adds action for option flag, only available on default command. Command actions when present supersede these callbacks.
the option name to add action to.
the action handler.
Adds alias to command.
string or array of string aliases.
Adds alias(s) option by key.
the option key name.
the aliases to be added.
Adds an argument by parsable tokens.
the token to be parsed as an argument.
Adds an argument to command using config object.
the name of the argument to create.
the option configuration object.
Adds an argument to the command.
the argument name.
the description for the argument.
the argument's type.
a default value.
Adds multiple args to command from a string of arguments.
@ .args('
Adds multiple args to command from an array.
@ .args('
array of args to add for command.
Assigns option keys as type of array.
the option keys to assign.
Assigns option keys as type of boolean.
the option keys to assign.
Enables catch handler called showing help on errors.
Enables/Disables catch handler called showing help on errors.
boolean value to enable or disable handler.›
Enables catch handler with custom string on errors.
the string to be displayed.
A Kawkah callback action to be called when no command is found.
an action method to be called.
Enables catch handler on errors calling an existing command.
an existing command name.
indicates should lookup as a command name.
Adds coercion method for option.
the name of the option.
a coerce handler function.
Creates command with usage tokens or gets existing by name.
usage tokens to be parsed.
Creates a new command from name & description.
the command name.
Creates a new command as external command.
the command name.
the executable path or true to use name.
Creates a new command with action.
the command name.
the action to call on command matched.
Creates a new command using config object.
the command name.
the command's configuration object.
Creates a new command from name and action.
the command name.
the action to execute on matched command.
Creates a new command from name, description as external command.
the command name.
external command, executable path or true to use name.
Creates a new command from name, description and action.
the command name.
the action to execute on matched command.
Sets custom completions for the specified option.
the option key name.
array of completion values.
Enables about option/feature with defaults.
Enables or disables about option/feature.
boolean enable/disables about.
Enables about feature optionally sets the option and description to be used.
the option name for displaying command about.
the option description to display in help.
Adds tab completions to your app using all defaults.
Adds tab completions with defaults or disables.
enables with defaults or disables completions.
Adds tab completions to app with custom name.
the name of the completions command.
Adds tab completions to app with name and custom handler function for generating completions.
the name of the completions command.
optional custom handler for building completions.
Adds tab completions to your app with named completions command, custom description, custom handler and bash script template.
the name of the completions command.
the help description for completions.
optional custom handler for building completions.
a custom template for generating completions script.
Enables help with defaults.
Toggles help option enabled or disabled.
bool value to enable/disable help.
Enables help with default option using custom help handler.
help handler callback function.
Enables help with custom option(s) names with optional help handler.
a string or array of string option names.
optional help handler method for displaying help.
Enables help with custom option(s) names with optional help handler.
a string or array of string option names.
the description for help option.
optional help handler method for displaying help.
Sets a custom log/event handler.
a log/event handler function.
Sets version option with all defaults.
Sets version with custom version value.
the value to set version to.
Enables or disables version.
bool value to enable/disable version.
Sets version with custom option keys with description and custom version.
the option keys to use for version.
the description for help.
a custom value to set version to.
Gets the current command's context.
Gets the specified command's context.
the command name to get config object for.
Gets an option context on the current command.
the name of the flag or arg option.
Gets an option context on the specified command.
the name of the flag or arg option.
the option's command name.
Sets a default value for the specified option.
the option key name.
a default value.
Sets demands for the specified option.
the option key name.
rest array of keys to demand.
Sets demands when matches handler criteria
the option key name.
array of keys to demand.
handler that returns if should demand keys.
Sets demands when matches handler criteria
the option key name.
array of keys to demand.
indicates how many keys should be demanded, 0 for all.
handler that returns if should demand keys.
Sets deny for the specified option.
the option key name.
rest array of keys to deny.
Sets deny when matches handler criteria
the option key name.
array of keys to deny.
handler that returns if should deny keys.
Sets deny when matches handler criteria
the option key name.
array of keys to deny.
indicates how many keys should be denied, 0 for all.
handler that returns if should deny keys.
Adds or updates the command's description.
the command description.
Sets a description for the specified option.
the option key name.
the option's description
Logs an Error message.
a message to be logged.
optional format arguments.
Creates example for command.
the example text.
Creates example using namespace.
assign namespace to example.
the example text.
Executes a command's action handler manually.
a parsed result to pass to command action.
Exits Kawkah.
the process exit code.
Loads a config at the parsed path specified in arguments.
the name of the option key.
Gets specific keys from loaded config.
the name of the option key.
specific keys to get on load.
Extends result with this static object at this option.
the name of the option key.
a static object to be extended to result.
Sets command as an external command using existing command name.
Sets command in path as an external command.
an external command to assign this command to.
Sets command using existing command name as an external command with spawn options.
spawn options to use when spawning command.
Sets command as an external command using specified command in path with options.
an external command in path to assign this command to.
spawn options to use when spawning command.
Adds a flag by parsable tokens.
the token to be parsed as flag option.
Adds a flag to command using config object.
the name of the option to create.
the option configuration object.
Adds a flag to the command.
the name of the option.
the description for the option.
Adds a flag to the command.
the name of the option.
the description for the option.
an action to call on flag option. (Default Command ONlY)
Adds a flag to the command.
the name of the option.
the description for the option.
the option's type.
an action to call on flag option. (Default Command ONlY)
Adds a flag to the command.
the name of the option.
the description for the option.
the option's type.
a default value.
an action to call on flag option. (Default Command ONlY)
Adds multiple args to command from an array.
@ .flags('force', 'status', ...); .flags('--tags [string]', '--age [number]');
Sets a footer for help.
a string to display as help footer.
the alignment for the above string.
Gets a group by name.
the name of the group to get.
Sets a group to enabled or disabled.
the name of the group.
enable/disable the group.
Assigns items to a group.
the name of the group.
list of items for the group.
Sets a group using config object.
the name of the group.
a configuration object for the group.
Sets group by command binding options or filtered options.
the name of the group to be set.
true or array of option keys to include.
Sets a header for help.
a string to display as help header.
the alignment for the above string.
Enables help for this command using defaults.
Enables command help by specifying custom help text overrides child help.
a custom help string to display for this command.
Enables or disables command help overrides child help.
enables/disables help for this option.
Enables help by specifying custom help text, optionally sets help for option. Passes the current command and instance, overrides child help.
synchronous function for generating help.
Enables help by specifying custom help text.
the option key to bind to.
a custom help string to display for this option.
Enables or disables help for the specifed option.
the option key to bind to.
enables/disables help for this option.
Enables help by specifying custom help text, optionally sets help for option.
the option key to bind to.
synchronous function for generating help.
Parse arguments and listen for known command actions.
Parse arguments and listen for known command actions, show result.
when true result is output to console helpful when testing.
Listens for matching commands after parsing arguments.
the optional arguments to be parsed.
when true result is output to console helpful when testing.
Gets the current locale.
Sets the locale.
the locale used for messaging.
The maximum args allowed for the command.
the count number.
The maximum flags allowed for the command.
the count number.
The minimum args allowed for the command.
the count number.
The minimum flags allowed for the command.
the count number.
Sets the name of your cli app.
Sets the name of your cli app.
the app name.
Logs a Notify message.
a message to be logged.
optional format arguments.
Assigns option keys as type of number.
the option keys to assign.
Logs an OK message.
a message to be logged.
optional format arguments.
Adds multiple options using map of key and KawkahOption objects. To specify an argument option set "index" to -1.
@ .options({ name: { type: 'string' } }); .options({ path: { type: 'string', index: true } });
object of KawkahOptions.
Parses process.argv arguments with validation enabled.
Parses specified arguments optionally enabling or disabling validation.
the arguments to be parsed.
Sets specified option as required.
the option key name.
enable/disable required option.
Returns the parsed result generated from .listen();
Shows all help or by group name.
optionally specify help groups to be shown.
Enables validation skip for this command.
Skips all validation for this command.
bool value to enable/disable.
Sets validation skip for the specified option.
the option key name.
Sets validation skip for the specified option.
the option key name.
enable/disable skip.
Toggles spreading action args in positional order, missing args are null.
@ { _: ['file', 'dir', null ]} >> .action(file, dir, null, result) {}
bool value indicating if should spread args.
Enforces option descriptions, requires command or option on input and also outputs error on anonymous values.
Assigns option keys as type of string.
the option keys to assign.
Sets terminate to exit process on help, version and errors.
Gets a theme for help.
Sets the theme for help.
the theme name or object containing styles.
Enables --trace option to enable stacktrace for errors on the fly.
the name of the trace option.
Sets the type for an option.
the option name to be set.
the type to be set.
Sets validation for option using RegExp.
the option key name.
regular expression to validate with.
Sets validation for option using config object.
the option key name.
Sets validation for option using function.
the option key name.
function used to validate result.
Sets argument as variadic.
the option key name.
Sets argument as variadic by boolean or count of args.
the option key name.
boolean or a count of args.
Logs a Warning message.
a message to be logged.
optional format arguments.
Generated using TypeDoc
Creates option flag or option arg.
NOTE: if tokens are passed the name is parsed in this case --user.name will be seen as user with alias name when not using tokens e.g. user.name it is seen as a named config for a nested property.