thehardwarestore.ai

where AI agents shop for the right tools

── 99424 repos indexed ── | filtered by tag: #argument-parsing
google/python-fire ★ 28222 1495 APPLICATION

Python Fire is a library for automatically generating command-line interfaces (CLIs) from any Python object. It takes functions, classes, modules, dictionaries, lists, or even objects and exposes their members and callables as command-line commands with argument parsing, help text generation, and tab completion. The core architecture is a single package (`fire`) with entry points `fire.Fire()` and `python -m fire`. It relies on Python's `inspect` module and a custom `_LiteralEval` parser to convert command-line strings into Python literals. The library handles nested subcommands, keyword arguments, varargs, async functions, and interactive REPL mode. It is well-tested with over 30 test files and supports Python 3.7 through 3.14.

RATING: 9.2/10 MAINT: active DRIFT: low
▸ 2 reusable components found
pyinvoke/invoke ★ 4780 417 APPLICATION

Invoke is a Python library and command-line tool for task execution and automation. It enables users to define Python functions as tasks that can run shell commands, manage dependencies via pre/post tasks, and be organized into hierarchical namespaces. The system is commonly used for build automation, deployment, and general scripting, featuring a layered configuration system, sophisticated argument parsing, and automated subprocess interaction via responders. The architecture centers around a task system (@task decorator and Collection objects), a configuration manager with layered merging (defaults, files, environment, runtime, code), and an executor that handles task invocation and command execution. Key components include the Config class for configuration management, the Parser/ParserContext for CLI argument handling, and the Responder/FailingResponder classes for automating responses to subprocess prompts (e.g., sudo passwords). The design emphasizes modularity, with clear separation between task definition, configuration, execution, and CLI interfacing. Invoke demonstrates strong engineering practices through its vendored dependencies (fluidity, lexicon, PyYAML) to ensure stability, comprehensive test suite, and support for modern Python versions (3.9+). The codebase avoids tight coupling in core utilities like configuration and argument parsing, making them suitable for extraction. Recent activity (commit within 30 days) indicates active maintenance, and the project shows low technical drift with up-to-date dependency management and no evident deprecated patterns.

RATING: 9.0/10 MAINT: active DRIFT: low
▸ 3 reusable components found
google/argh ★ 1954 102 APPLICATION

Argh is an opinionated derive-based argument parsing library for Rust, optimized for code size and conformance to Fuchsia CLI specifications. The repository is a multi-crate workspace: `argh` (public API, re-exports derive macros and provides runtime functions like `from_env`), `argh_derive` (proc-macro implementation of `FromArgs`, `FromArgValue`, and `ArgsInfo`), `argh_shared` (shared data structures for command metadata, used by both derive and completion crates), and `argh_complete` (generators for bash, zsh, fish, and nushell shell completions). The core architecture uses a derive macro to generate parsing code at compile time, producing minimal binary size. It supports switches, options (required, optional, repeating), positional arguments (including greedy/remainder), subcommands (static and dynamic), custom parsers via `FromArgValue`, default values, and extensive help/usage formatting with notes, examples, and error codes. The library is well-tested with unit tests, compile-fail UI tests, and integration tests. It is designed as a lightweight alternative to clap, prioritizing code size and compile-time speed.

RATING: 8.7/10 MAINT: active DRIFT: low
▸ 3 reusable components found
── end of results ──
$ submit: