cli()
Bootstrap and run a CLI application. Registers commands, parses arguments, loads config, runs middleware, and invokes the matched handler.
Import from maltty.
CliOptions
CliHelpOptions
header only appears when the bare invocation has nothing to run. Registering a default command makes the bare invocation dispatch to that handler instead, so header is never shown.
DirsConfig
Overrides directory names for file-backed stores (auth credentials, config). Both default to .<name> when omitted.
Commands option
The commands field accepts several forms:
Autoload registers an index file at the root of the directory as the default command rather than as a command named index.
defineConfig()
Helper for defining a maltty.config.ts file with type checking:
Module augmentation
Extend maltty's interfaces via TypeScript declaration merging for project-wide type safety: