Crates.io | oclis |
lib.rs | oclis |
version | 0.3.0 |
source | src |
created_at | 2024-02-17 19:12:05.672626 |
updated_at | 2024-02-19 23:26:59.827891 |
description | CLI builder based on a simple, obvious specification file |
homepage | |
repository | https://github.com/Airsequel/Oclis |
max_upload_size | |
id | 1143443 |
size | 297,423 |
CLI (Command Line Interface) app builder based on a simple, obvious specification file.
Building a CLI application is a repetitive task. The same code is written over and over again. But fear not, Oclis is here to help you out!
cargo install oclis
oclis init
- Creates an oclis.ncl
specifcation file.oclis build
to generate the CLI parsing code Some features of other CLI frameworks are deliberately not supported:
tar -v -v -v
)
This is error prone as it's easy to accidentally add it several times.
Use a numerical verbosity flag instead (e.g. tar -v=3
)
or define your own counting system (e.g. tar -v=xxx
)pandoc in.md --output=out.pdf
)
Disallowing this helps to prevent errors from accidentally providing
an argument which is understood as a flag/option.
Suggested alternatives:
Sub-command: pandoc convert in.md out.pdf
Option first: pandoc --output=out.pdf in.md
Extra option: pandoc --input=in.md --output=out.pdf
Check out the repo awesome-cli-frameworks for a full overview.