Skip to content
/ cli-rs Public template

A template repository for rapidly starting up new Rust-based CLI applications

License

Notifications You must be signed in to change notification settings

cryptaliagy/cli-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust Command Line Interface

tests release nightly-scan

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
  2. Change the package name in the Cargo.toml file
  3. Update src/main to use the new crate name
  4. Update .github/workflows/release.yml to use the new binary name

Features

CLI

  1. Logging configuration with the tracing crate
  2. Initial base CLI struct with count-based verbosity
  3. manfile generation on build based on clap CLI command

CI/CD

  1. PR / Testing pipeline with:
    • Security scanning
    • Linting with Clippy
    • Cargo tests (debug)
  2. 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

About

A template repository for rapidly starting up new Rust-based CLI applications

Resources

License

Stars

Watchers

Forks

Languages