| Crates.io | easy-cli |
| lib.rs | easy-cli |
| version | 2.0.0 |
| created_at | 2022-11-20 21:24:00.673215+00 |
| updated_at | 2025-08-22 15:55:34.589059+00 |
| description | Builds CLI tools from a set of scripts. |
| homepage | https://github.com/herblet/easy-cli |
| repository | https://github.com/herblet/easy-cli |
| max_upload_size | |
| id | 719411 |
| size | 87,892 |
A tool for building personal and team CLI tools.
easy-cli takes a CLI-Tool name option and a path to a directory of scripts as arguments. It assumes each script ist to be a CLI command, which may also contain subcommands, and builds an appropriate CLI parser.
See Annotations for the annoations that the parserc considers.
It could be used as an alias, but (in my experience, in zsh) this does not work with completion. You can define a function for your cli, for instance:
mycli() {
<Path>/easy-cli --name mycli <Path-to-easy-cli-root>/example -- $@
}
and then calling
mycli
produces output:
error: 'mycli' requires a subcommand but one was not provided
[subcommands: hello, list, help]
Usage: mycli <COMMAND>
For more information try '--help'
Then calling
mycli hello
will print
Hello, world!
Arguments trailing the command will be passed to the relevant script.
easy-cli offers completion for your cli in a number of shells - those supported by clap_complete. To generate completions for your cli, run:
easy-cli --name <cli-name> <Path-to-cli-dir> --completions <shell> > <completions_file>
and proceed as required by your shell.
cli <commandA> <subcommandA1>), to group related commands.