#arguments-parser #facet #parser

figue

Type-safe CLI arguments, config files, and environment variables powered by Facet reflection

5 releases (stable)

Uses new Rust 2024

new 2.0.3 Apr 15, 2026
2.0.2 Apr 14, 2026
2.0.1 Apr 1, 2026
2.0.0 Mar 1, 2026
0.1.0 Jan 25, 2026

#72 in Command-line interface

Download history 39/week @ 2026-01-24 203/week @ 2026-02-28 236/week @ 2026-03-07 1152/week @ 2026-03-14 558/week @ 2026-03-21 788/week @ 2026-03-28 510/week @ 2026-04-04 1120/week @ 2026-04-11

3,030 downloads per month
Used in 6 crates

MIT/Apache

1MB
18K SLoC

figue

crates.io documentation MIT/Apache-2.0 licensed

figue (pronounced 'fig', like the fruit) provides configuration parsing from CLI arguments, environment variables, and config files, a bit like figment but based on facet reflection:

use facet_pretty::FacetPretty;
use facet::Facet;
use figue as args;

#[derive(Facet)]
struct Args {
    #[facet(args::positional)]
    path: String,

    #[facet(args::named, args::short = 'v')]
    verbose: bool,

    #[facet(args::named, args::short = 'j')]
    concurrency: usize,
}

# fn main() -> Result<(), Box<dyn std::error::Error>> {
let args: Args = figue::from_slice(&["--verbose", "-j", "14", "example.rs"])?;
eprintln!("args: {}", args.pretty());
Ok(())
# }

The entry point of figue is builder — let yourself be guided from there.

Color

Color is enabled by default if the terminal supports it. It is disabled when the NO_COLOR environment variable is set.

Sponsors

Thanks to all individual sponsors:

GitHub Sponsors Patreon

...along with corporate sponsors:

AWS Zed Depot

...without whom this work could not exist.

Special thanks

The facet logo was drawn by Misiasart.

License

Licensed under either of:

at your option.

Dependencies

~15–20MB
~278K SLoC