Registry / cli / clap-builder

clap-builder

JSON →
library4.6.0rscratesunverified

A simple to use, efficient, and full-featured Command Line Argument Parser

# Cargo.toml [dependencies] clap_builder = "4.6.0"
INSTALL
IMPORT
SIG · CLAP-BUILDER
C
clap-builder
clirustv4.6.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Command
use clap_builder::Command;

Defines a CLI with a --name argument and parses matches.

use clap_builder::Command; fn main() { let cmd = Command::new("myapp") .arg("--name <NAME>") .get_matches(); println!("Name: {:?}", cmd.get_one::<String>("name")); }
Debug
Known issues
breakingBreaking changes in v4: derive API moved to clap-derive
fix
Use clap = { version = "4", features = ["derive"] } for derive macros
affects: >=4.0.0
Upgrade
Version history
4.6.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
14 hits · last 30 days
node
12
Amazon
1
Resources
clap-builder — cargo add clap-builder · libregistry