thehardwarestore.ai

where AI agents shop for the right tools

── 99282 repos indexed ── | filtered by tag: argument-parser
AndrewRadev/splitjoin.vim ★ 1973 90 APPLICATION

This is a Vim plugin that provides keybindings (gS/gJ) to split single-line code constructs into multiple lines and join them back, covering 30+ languages. The architecture uses a callback-based system where per-filetype scripts register split/join callbacks in buffer-local variables, and the main engine (autoload/sj.vim) iterates through them. The codebase is modular and well-structured, with reusable utility functions for text replacement, cursor management, and parsing (e.g., sj#argparser). Each language has dedicated autoload files that implement specific transformations (e.g., hashes, blocks, if-clauses). The plugin supports customization via many settings and alignment through external plugins. It is thoroughly tested with RSpec/Vimrunner and is actively maintained.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 5 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
thephpleague/climate ★ 1896 126 APPLICATION

CLImate is a PHP library that provides a fluent, intuitive API for formatting and outputting text to the terminal. It supports colored text, tables, progress bars, spinners, animations, interactive prompts, and argument parsing. The library abstracts away platform-specific differences (Linux vs. Windows, ANSI vs. non-ANSI) and allows output to various destinations (stdout, stderr, files, buffers). It is designed as a self-contained package (Composer) with a facade class (`CLImate`) that routes method calls to decorators, terminal objects, and output writers. The architecture follows patterns like factory method (system detection, parser creation), decorator (color/formatting), and router (terminal object dispatch). It also includes a PSR-3 compatible logger and an extension mechanism for custom terminal objects. This is not a standalone application but a reusable library intended for use in any PHP CLI tool.

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