17 releases

Uses old Rust 2015

0.6.5 Mar 2, 2018
0.6.3 Oct 10, 2017
0.5.6 Apr 24, 2017

#857 in Command-line interface

Download history 109/week @ 2024-03-24 328/week @ 2024-03-31 343/week @ 2024-04-07 276/week @ 2024-04-14 543/week @ 2024-04-21 286/week @ 2024-04-28 193/week @ 2024-05-05 264/week @ 2024-05-12 361/week @ 2024-05-19 336/week @ 2024-05-26 385/week @ 2024-06-02 296/week @ 2024-06-09 217/week @ 2024-06-16 120/week @ 2024-06-23 65/week @ 2024-06-30 93/week @ 2024-07-07

538 downloads per month
Used in neon-cli

MIT license

105KB
2.5K SLoC

Build status Latest version All downloads Downloads of latest version Documentation

app

A easy-to-use command-line-parser written for Rust.

Usage

Cargo.toml

    [dependencies]
    app = "0.6.5"

Or

    [dependencies]
    app = { git = "https://github.com/biluohc/app",branch = "master", version = "0.6.5" }

Documentation

Or

  • Run cargo doc --open after modified the toml file.

Examples

    git clone https://github.com/biluohc/app
  • fht2p: Options and Args
    cargo run --example fht2p -- -h
  • cp: Options and Multi Args
    cargo run --example cp
  • cpfn: Options, Multi Args and the help funcions.
    cargo run --example cpfn
  • zipcs: Sub_Commands, OptValue and OptValueParse
    cargo run --example zipcs
  • http: Option's order in help message
    cargo run --example http
    cargo run --example cargo-http

To Du

name status exapmle
Flag ls --help , cargo -V
Option http --port 8080 , rustc -o filename
Args rm Path1 Path2 Path3
SubCMD cargo run , cargo doc
Flags aggregation ls -a -l => ls -al
Multi Args cp SOURCE1 SOURCE2 SOUCE3 DEST
Optional for Option and Args
Dependencies and Conflicts between Options x

Dependencies

~1–1.4MB
~22K SLoC