https://github.com/cryptaliagy/cli-rs
A template repository for rapidly starting up new Rust-based CLI applications
https://github.com/cryptaliagy/cli-rs
Last synced: 5 months ago
JSON representation
A template repository for rapidly starting up new Rust-based CLI applications
- Host: GitHub
- URL: https://github.com/cryptaliagy/cli-rs
- Owner: cryptaliagy
- License: mit
- Created: 2023-03-08T06:10:49.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-03T17:54:39.000Z (over 2 years ago)
- Last Synced: 2025-04-06T17:15:05.983Z (over 1 year ago)
- Language: Rust
- Homepage:
- Size: 27.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rust Command Line Interface
[](https://github.com/taliamax/cli-rs/actions/workflows/test.yml)
[](https://github.com/taliamax/cli-rs/actions/workflows/release.yml)
[](https://github.com/taliamax/cli-rs/actions/workflows/nightly-scan.yml)
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.
## How to use
1. Create a new repository templated from this repo
1. Change the package name in the `Cargo.toml` file
1. Update `src/main` to use the new crate name
1. Update `.github/workflows/release.yml` to use the new binary name
## Features
### CLI
1. Logging configuration with the `tracing` crate
1. Initial base CLI struct with count-based verbosity
1. `manfile` generation on build based on `clap` CLI command
### CI/CD
1. PR / Testing pipeline with:
- Security scanning
- Linting with Clippy
- Cargo tests (debug)
1. A binary release pipeline for main branch (controlled through environment):
- Target can be set through environment variable in pipeline
- Major & Minor version tracked through `VERSION` file
- Patch version tracked through pipeline. Actual binary/crate version set at release time.
- `manfile` published alongside binary
- Manually-triggered release pipeline (can be configured to auto-deploy from main)
- Publishing to `crates.io` via commented-out section