https://github.com/shellshape/rust-cli-template
A simple Rust CLI template which I am using for my projects - based on Clap and Figment.
https://github.com/shellshape/rust-cli-template
Last synced: 3 months ago
JSON representation
A simple Rust CLI template which I am using for my projects - based on Clap and Figment.
- Host: GitHub
- URL: https://github.com/shellshape/rust-cli-template
- Owner: shellshape
- License: mit
- Created: 2023-12-27T10:10:15.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-30T11:51:47.000Z (10 months ago)
- Last Synced: 2025-05-04T00:36:10.647Z (9 months ago)
- Language: Rust
- Size: 19.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rust CLI Template
This is a simple Rust CLI template which I am using for my projects like those in my [shellshape](https://github.com/shellshape) collection.
This template is based on [Clap](https://crates.io/crates/clap) in combination with [Figment](https://crates.io/crates/figment) and [dirs](https://crates.io/crates/dirs) for parsing configuration files. Also, [anyhow](https://crates.io/crates/anyhow) is used for basic error handling.
Feel free to use this template as basis for your own projects!
## Usage
First of all, you need [cargo-generate](https://github.com/cargo-generate/cargo-generate) to be installed.
```bash
cargo install cargo-generate
```
Now, you can simply use the following command to bootstrap your project with this template.
```bash
cargo generate --git https://github.com/shellshape/rust-cli-template template
```