Skip to content
//! Vendored, minimal argument parser (inlined from `nanoargs`).
//!
//! Provides flags, options, positional arguments, subcommands, environment
//! variable fallbacks, typed parsing, auto-generated help text, and version
//! handling. This is an internal module and is not exposed as a crate.

#![allow(dead_code, unused_imports, unused_macros)]

mod builders;
mod completions;
mod free;
mod help;
mod macros;
mod parser;
mod result;
mod types;
pub mod validators;

pub use builders::{ArgBuilder, Flag, Opt, Pos};
pub use completions::Shell;
pub use free::parse_loose;
pub use parser::ArgParser;
pub use result::{OptionError, ParseResult, ParseResultBuilder};
pub use types::{
    ConflictDef, FlagDef, GroupDef, OptionDef, ParseError, PositionalDef, SubcommandDef,
};
pub use validators::{Validator, max_length, min_length, non_empty, one_of, path_exists, range};

#[allow(unused_imports)]
pub(crate) use macros::extract;

#[cfg(test)]
mod tests;