Examples
Explore these examples to see cli-er in action. Each example is available in the examples/ directory of the repository.
| Example | Description |
|---|---|
| Basic (config) | Minimal CLI reading options from a config file |
| Docker | Docker-like multi-level namespace/command CLI — try it in the Playground |
| Webpack CLI | Single root-command CLI, mimicking webpack — try it in the Playground |
| TypeScript CLI | Full TypeScript CLI with typed options |
| Hooks | Lifecycle hooks: authentication check before execution |
| Plugin | Reusable plugin encapsulating hooks |
| Intl | Internationalized messages via CliOptions.messages |
| Bash Completion | Generated bash-completion script usage |
| Debug Logger | Static Cli.debug() logger |
| Jest CLI | Positional arguments, mimicking jest |
| Tail | Reading option values from stdin |
| Custom Option Parser | Defining a fully custom option parser |