Skip to content

krishpranav/rustcli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rustcli

A simple rust framework to build cli applications

CI

forthebadge

About:

  • a rust framework to help developers create cli app easily :)

Installation:

[dependencies]
rustcli = { git = "https://github.com/krishpranav/rustcli" }

Quick Start:

  • basic cli app using rustcli
use rustcli::{App};
use std::env;

fn main() {
    let args: Vec<String> = env::args().collect();
    let app = App::new(env!("CARGO_PKG_NAME"))
        .description("hey this is a cli app build using rust cli")
        .author("Authorone")
        .version(env!("CARGO_PKG_VERSION"))
        .usage("cli [args]")
        .action(|c| println!("Hello, {:?}", c.args));

    app.run(args);
}
  • for more tutorial visit the docs