Skip to content

Examples

Explore these examples to see cli-er in action. Each example is available in the examples/ directory of the repository.

ExampleDescription
Basic (config)Minimal CLI reading options from a config file
DockerDocker-like multi-level namespace/command CLI — try it in the Playground
Webpack CLISingle root-command CLI, mimicking webpack — try it in the Playground
TypeScript CLIFull TypeScript CLI with typed options
HooksLifecycle hooks: authentication check before execution
PluginReusable plugin encapsulating hooks
IntlInternationalized messages via CliOptions.messages
Bash CompletionGenerated bash-completion script usage
Debug LoggerStatic Cli.debug() logger
Jest CLIPositional arguments, mimicking jest
TailReading option values from stdin
Custom Option ParserDefining a fully custom option parser

Released under the MIT License.