This is a template repository meant to be used as a starting point for developing a new Rust-based CLI. This handles most of the key bootstrapping elements that I require when writing a new CLI.
- Create a new repository templated from this repo
- Change the package name in the
Cargo.tomlfile - Update
src/mainto use the new crate name - Update
.github/workflows/release.ymlto use the new binary name
- Logging configuration with the
tracingcrate - Initial base CLI struct with count-based verbosity
manfilegeneration on build based onclapCLI command
- PR / Testing pipeline with:
- Security scanning
- Linting with Clippy
- Cargo tests (debug)
- A binary release pipeline for main branch (controlled through environment):
- Target can be set through environment variable in pipeline
- Major & Minor version tracked through
VERSIONfile - Patch version tracked through pipeline. Actual binary/crate version set at release time.
manfilepublished alongside binary- Manually-triggered release pipeline (can be configured to auto-deploy from main)
- Publishing to
crates.iovia commented-out section