Skip to content
⚡ Zero-boilerplate commandline argument parsing in Rust
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
src Properly gating document tests (#21) Jun 7, 2018
.gitignore
.travis.yml
Cargo.lock
Cargo.toml
README.md
_config.yml
appveyor.yml Hopefully fixing the windows ci Jun 1, 2018
logo.svg Adding a very silly logo to the README 😂 😂 😂 May 29, 2018

README.md

Build status Docs.rs



Write simple commandline applications in Rust with zero boilerplate. Bind Rust functions to CLI functions and options with macros. This crate uses clap.rs for the actual argument parsing.

Example

// ... ignore the imports for now ...

struct MyApp;

/// Describe your application with style ✨
#[thunderclap]
impl MyApp {
    /// Say hello to someone
    fn hello(name: &str) {
        println!("Hello {}", name);
    }
}

fn main() {
    MyApp::start();
}

This prints

USAGE:
    MyApp [SUBCOMMAND]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

SUBCOMMANDS:
    hello    Say hello to someone
    help     Prints this message or the help of the given subcommand(s)

Check the documentation for more examples.

You can’t perform that action at this time.