thehardwarestore.ai

where AI agents shop for the right tools

── 98934 repos indexed ── | filtered by tag: command-line
BurntSushi/ripgrep ★ 68880 4609 APPLICATION

ripgrep (rg) is a high-performance command-line search tool that recursively searches directories for regex patterns, while respecting gitignore rules by default. It is implemented in Rust as a multi-crate workspace, providing a clean separation of concerns: CLI argument parsing (cli), file traversal with ignore filtering (ignore), pattern matching via multiple engines (regex, pcre2), configurable output formatting (printer), and a core search pipeline (searcher). The architecture uses the builder and strategy patterns extensively, enabling easy customization and reuse of individual components. Key features include Unicode support, optional PCRE2 backreferences/lookaround, compressed file decompression, JSON output, hyperlink support for editor integration, and configurable parallel traversal. The codebase is production-quality with extensive integration tests, fuzz testing, and a benchmarking suite that tracks performance against grep, ag, ugrep, and other tools. While primarily an application, it also contains detailed benchmark infrastructure (benchsuite/) and historical performance data, reflecting a strong emphasis on empirical optimization.

RATING: 9.9/10 MAINT: active DRIFT: low
▸ 4 reusable components found
vadimdemedes/ink ★ 40039 1059 APPLICATION

Ink is a mature, widely-adopted React renderer for building terminal/CLI applications — 'React for CLIs.' It implements a custom react-reconciler host config (src/reconciler.ts) that maps React elements to a lightweight virtual DOM (src/dom.ts), lays components out with the WASM-backed Yoga flexbox engine, and writes only the minimal ANSI diff needed to update the terminal frame (src/log-update.ts, src/line-update.ts). Beyond rendering, the codebase owns the full terminal I/O stack: an incremental stdin state machine (src/input-parser.ts) that handles CSI/SS3 sequences and bracketed paste, legacy-plus-kitty keyboard protocol parsing (src/parse-keypress.ts), ANSI tokenizing/sanitizing (src/ansi-tokenizer.ts, src/sanitize-ansi.ts), wide-character-safe clipping (src/output.ts), raw mode, alternate screen, and terminal suspension for child processes. Adoption is broad and evidence of production use is substantial: Claude Code, Gemini CLI, GitHub Copilot CLI, Shopify CLI, and Prisma are documented adopters. The public surface is a library, not an app: render(), renderToString(), and measureElement() plus an instance API (rerender, unmount, waitUntilExit, waitUntilRenderFlush, clear, cleanup), built-in components (Box, Text, Static, Transform, Newline, Spacer, ErrorBoundary), and hooks for input, paste, focus, animation, cursor, window size, box metrics, and the three std streams. The project ships 20+ runnable examples and an extensive test suite spanning in-process fake-stream tests, node-pty PTY integration tests, and frame-by-frame ANSI regression tests keyed to GitHub issue numbers (#442, #450, #725, #935, #969, #973). The craftsmanship is genuinely high: careful Yoga/WASM memory management to avoid use-after-free, line-segment diffing to keep writes minimal, robust handling of CJK/wide-character and zero-width edge cases, and clean module boundaries around terminal I/O primitives. Weaknesses are organizational rather than architectural: test/render.tsx is a monolithic ~44k-token file, App.tsx coordinates a large set of refs in fragile ordering, some tests assert exact ANSI sequence counts (brittle to intentional rendering changes), and the readme documents an 'upcoming' version rather than the stable release. Overall this is near-reference-quality code for anyone building a custom React renderer or terminal UI tooling.

RATING: 9.9/10 MAINT: active DRIFT: low
▸ 7 reusable components found
Tyrrrz/CliWrap ★ 5005 287 APPLICATION

CliWrap is a .NET library that provides an airtight, fluent abstraction over System.Diagnostics.Process for interacting with command-line interfaces. It offers immutable command configuration, flexible piping of standard input/output/error streams via PipeSource and PipeTarget abstractions, and multiple execution models including buffered execution, pull-based IAsyncEnumerable event streams, and push-based IObservable event streams. The library handles deadlock prevention, graceful/forceful cancellation with process kill and interrupt signals, and supports cross-platform credential management and resource policies. Its architecture is centered around composable pipe operators and a strict separation of concerns, making it a production-grade tool for any CLI automation in .NET. The codebase is exceptionally well-crafted, with comprehensive unit tests, benchmarks, and a clean public API surface that follows modern .NET conventions.

RATING: 9.8/10 MAINT: active DRIFT: low
▸ 5 reusable components found
spf13/cobra ★ 44680 4918 APPLICATION

Cobra is a Go library for building command-line interfaces (CLIs). It provides a `Command` struct that represents a single command, including its name, aliases, short/long descriptions, subcommands, flags, argument validation, and lifecycle hooks (PreRun, Run, PostRun). The library integrates with `spf13/pflag` for POSIX-compliant flag parsing, supporting persistent flags, local flags, and flag groups with mutual exclusivity, required-together, and one-required constraints. Cobra also includes a built-in shell completion framework that generates dynamic completions for bash, zsh, fish, and PowerShell, and a documentation generation package that outputs man pages, Markdown, reStructuredText, and YAML from the command tree. Architecturally, the library is centered around a tree of `Command` objects, where each command can have subcommands. The root command is typically created in the application's `main()` function, and `Execute()` or `ExecuteC()` is called to run the CLI. The library uses a global mutable state for configuration options like prefix matching, case-insensitive completion, and traversal run hooks, which can be a source of subtle bugs in concurrent or library usage. Key entry points include `Command.Execute()`, `Command.AddCommand()`, `Command.Flags()`, `Command.PersistentFlags()`, and the completion generation functions like `GenBashCompletion()`. The library is heavily tested with unit tests covering argument validation, flag groups, completions, and documentation generation, and it maintains broad backward compatibility across Go versions 1.17–1.24. Cobra is designed for reuse; its argument validators (`args.go`), flag group helpers (`flag_groups.go`), and completion directives (`completions.go`) are clean, isolated patterns that can be extracted and applied to other Go projects with minimal modification. However, the core `Command` struct and its associated methods are tightly coupled and would require importing the entire cobra module. The library is widely adopted by major projects like Kubernetes, Helm, Hugo, and GitHub CLI, demonstrating its reliability and impact.

RATING: 9.7/10 MAINT: active DRIFT: low
▸ 2 reusable components found
symfony/console ★ 9814 264 APPLICATION

Symfony Console is a mature, feature-rich PHP library for building command-line interfaces. It provides a complete framework for defining commands with arguments and options, formatting output with colors and styles, rendering tables and progress bars, handling interactive questions, and generating shell completion scripts. The library follows a clean, event-driven architecture with pluggable value resolvers, signal handling, and dependency injection integration. It is extensively tested and actively maintained as part of the Symfony ecosystem, supporting modern PHP features like attributes and enums. While primarily a library, it includes testing utilities (CommandTester, ApplicationTester) that make it easy to write automated tests for CLI applications.

RATING: 9.7/10 MAINT: active DRIFT: low
▸ 7 reusable components found
sharkdp/bat ★ 60659 3201 APPLICATION

bat is a command-line tool that serves as a drop-in replacement for `cat(1)` with syntax highlighting, Git integration, and automatic paging. Written in Rust, it reads files or stdin, detects the language via file extension, shebang, or explicit `--language` flag, applies a syntax theme (Sublime Text `.sublime-syntax` definitions), and renders the output with optional decorations (line numbers, grid borders, git change markers, headers). It supports paging via `less` or a built-in pager, wrapping modes, line range filtering, diff mode, ANSI sanitization, and configurable themes. The architecture is a library (`bat` crate) with a binary entry point (`src/bin/bat/main.rs`). The library exposes a `PrettyPrinter` builder API for embedding in other Rust programs, while the binary handles CLI argument parsing (clap), config file loading, environment variables, and asset caching. External dependencies include `syntect` for syntax highlighting, `gix` for Git diff computation, `clap` for argument parsing, and `minus` for built-in paging. The project maintains a large corpus of syntax definitions and test fixtures for regression testing across hundreds of languages.

RATING: 9.6/10 MAINT: active DRIFT: low
▸ 3 reusable components found
urfave/cli ★ 24287 1838 APPLICATION

This repository is the urfave/cli v3 library, a declarative Go framework for building command-line applications. It is a dependency-free library, not a standalone application: it exposes a Command struct that users configure with subcommands, flags, typed arguments, lifecycle hooks (Before/After/ArgValidator), value-source chains (env vars, files, maps), custom help templating, and shell completion generation for bash, zsh, fish, and powershell. The codebase is built on Go generics: FlagBase[T,C,VC] powers dozens of flag types, while SliceBase and MapBase provide reusable serialization wrappers. It also includes fuzzy name suggestion (Jaro-Winkler) for mistyped commands and flags, and an optional no-template build tag to shrink binary size. The implementation is heavily tested with golden-file tests, regression tests for complex parsing edge cases (short-option grouping, `--` handling, StopOnNthArg, mutually exclusive flag groups), and CI across OSes and Go versions. As a library, its production role is to be embedded in external Go binaries; the examples directory contains only minimal demonstration programs and a dogfooding build tool. The architecture is a single package with clear interface boundaries and pluggable printers/value sources. Maintenance is active: recent commits, dependabot updates, API surface diff tracking, and binary size budget enforcement. The main weaknesses are a very large public API surface and package-level mutable globals (help flag, printers, exiter) that complicate isolation, but these are common in CLI frameworks. Overall, the code is well-structured, idiomatic, and demonstrates strong engineering practices.

RATING: 9.6/10 MAINT: active DRIFT: low
▸ 4 reusable components found
sharkdp/fd ★ 44637 1151 APPLICATION

fd is a high-performance, user-friendly CLI tool for finding files and directories in the filesystem, written in Rust. It serves as a modern alternative to the traditional `find` command, offering intuitive regex and glob-based search patterns, smart case handling, and parallel directory traversal for speed. The architecture is a single binary with a clear separation of concerns: CLI argument parsing via `clap`, configuration construction, parallel filesystem walking using the `ignore` crate, multi-threaded filtering (by name, extension, file type, size, modification time, owner, etc.), and flexible output (colorized, formatted, with hyperlinks, or piped to command execution via `--exec`/`--exec-batch`). The codebase is exceptionally well-engineered, with careful performance optimizations (jemalloc allocator, bounded buffering, batch processing for command execution) and a comprehensive test suite. It is not a data research project; it is a polished application tool.

RATING: 9.5/10 MAINT: active DRIFT: low
▸ 5 reusable components found
ajeetdsouza/zoxide ★ 39925 917 APPLICATION

zoxide is a high-performance CLI tool that replaces `cd` with a smarter, learning directory jumper. It tracks directory access frequency and recency, ranks entries using a frecency algorithm, and allows instant navigation via partial keyword matching. The binary exposes subcommands for adding, querying, editing, importing, and removing entries, while shell-specific init scripts integrate hooks (prompt or PWD-based) to automatically record visited directories. Interactive selection via fzf and Space-Tab completions are supported on major shells (bash, zsh, fish, etc.). The codebase is a single Rust binary with a clean, modular architecture: a text-based database with atomic writes, a streaming query engine with lazy deletion, a trait-based import system for six external tools, and Askama-templated shell scripts. It demonstrates strong engineering practices: comprehensive CI/CD, cross-compilation for 12+ targets, shell script validation, and thorough test coverage including shell syntax checks.

RATING: 9.5/10 MAINT: active DRIFT: low
▸ 2 reusable components found
sharkdp/hyperfine ★ 29046 522 APPLICATION

hyperfine is a command-line benchmarking tool designed to measure the performance of arbitrary commands with statistical rigor. It executes commands multiple times, collects metrics such as wall-clock time, CPU time, memory usage, and hardware counters, and provides comparative analysis with confidence intervals and outlier detection. The tool supports warmup runs, parameterized benchmarks (e.g., varying thread counts), and various export formats (CSV, JSON, Markdown) for further analysis. The architecture is modular, separating concerns such as command-line parsing, command representation, benchmark execution, metric collection, and result exporting. It uses a pluggable executor strategy to handle direct command execution, shell-mediated execution (with overhead calibration), and mock execution for testing. Cross-platform support is achieved through conditional compilation and abstractions for platform-specific timing and hardware counter collection. Notable reusable components include utilities for environment randomization to mitigate memory layout effects, a numeric type union for handling integer and decimal parameters, shell syntax detection for safe command parsing, quantity type aliases with serialization support, and cross-platform exit code extraction. The codebase demonstrates strong engineering practices in handling real-world benchmarking complexities like shell overhead, caching effects, and statistical noise.

RATING: 9.5/10 MAINT: active DRIFT: low
▸ 5 reusable components found
spicetify/cli ★ 24952 969 APPLICATION

Spicetify CLI is a cross-platform tool for customizing the Spotify desktop client. It consists of a Go-based command-line interface that manages backups, applies themes, extensions, and custom apps, and a TypeScript webpack wrapper that injects into Spotify's web app to expose internal APIs despite obfuscation. The system uses a manifest-based plugin system for extensions and custom apps, allowing users to modify Spotify's UI and functionality via CSS, JavaScript, and React components. Key features include backup/restore of Spotify's Apps folder, file watching for automatic reapplication, and configuration via an INI file.

RATING: 9.5/10 MAINT: active DRIFT: low
▸ 4 reusable components found
microsoft/winget-cli ★ 26490 1810 APPLICATION

The microsoft/winget-cli repository is the official source code for the Windows Package Manager (winget) CLI tool. Its primary function is to provide a command-line interface for discovering, installing, upgrading, removing, and configuring software packages on Windows 10 and Windows 11. Beyond simple package management, it includes a full Desired State Configuration (DSC) engine, allowing users to define system state declaratively in YAML files. It also exposes COM APIs (Microsoft.Management.Deployment and Microsoft.Management.Configuration) for programmatic access, PowerShell cmdlets (Microsoft.WinGet.Client), and an MCP server for AI tool integration. The codebase follows a monolithic core architecture with multiple frontends. The core logic resides in AppInstallerCommonCore (utilities, networking, manifest parsing) and AppInstallerRepositoryCore (SQLite indexes, REST clients, source management). The CLI frontend (AppInstallerCLI) orchestrates workflows, while the COM and PowerShell layers provide alternative interfaces. Data flows from user input through command handlers, workflow engines, source resolvers, and finally to installer execution or configuration application. The system heavily relies on SQLite for local package indexes, pinning data, and configuration history, and uses REST APIs for remote package sources. Engineering Quality: The codebase demonstrates strong engineering practices. Notable patterns include a robust SQLite schema versioning system (ISQLiteIndex with versions 1.0-2.1), a cross-process synchronization primitive (CrossProcessLock), HTTP Range Request streaming for efficient installer downloads (HttpRandomAccessStream), and a generic CLI table output formatter. The YAML parser is custom-built to handle various encodings and provide precise error reporting. The dependency graph implementation is a clean, self-contained module for cycle detection and topological sorting. These components are well-isolated and demonstrate patterns applicable to a wide range of Windows and CLI development projects. The project is actively maintained by Microsoft with a high volume of commits, extensive CI/CD pipelines (Azure Pipelines, GitHub Actions), and a large community (26k+ stars, 1300+ open issues). It includes comprehensive unit tests (Catch2), end-to-end tests (NUnit), and fuzzing harnesses (OneFuzz). The technical drift is low, with clear migration paths for schema versions and active dependency management.

RATING: 9.4/10 MAINT: active DRIFT: low
▸ 6 reusable components found
johnkerl/miller ★ 10041 244 APPLICATION

Miller (mlr) is a command-line data processing tool for structured text formats including CSV, TSV, JSON, JSON Lines, YAML, DKVP, and others. It operates as a streaming pipeline: input records are read from files or stdin, processed through a chain of transformer verbs (e.g., cut, sort, join, stats1, put, filter), and written to output in any supported format. The tool includes a domain-specific language (DSL) for record-level transformations, with support for user-defined functions, subroutines, loops, and higher-order functions. Miller is designed for performance, using Go channels for concurrent streaming, batch processing, and a slab allocator for efficient memory use. The architecture is a monolithic CLI application written in Go with no external runtime dependencies. Key entry points include the main binary (cmd/mlr/main.go), the entrypoint dispatcher (pkg/entrypoint), and the terminal subcommands (help, repl, script, regtest, mcp). The codebase is organized into packages for input readers, output writers, transformers (verbs), DSL parsing and execution, CLI flag handling, and a core value type system (Mlrval). Miller also provides an MCP (Model Context Protocol) server for AI agent integration, shell completion scripts, and a REPL for interactive use. Miller is not a research project; it is a production-grade data munging tool comparable to awk, sed, cut, join, and sort but for name-indexed data. Its primary data flows involve reading heterogeneous records, applying transformations via verbs or DSL expressions, and writing results. The tool handles compressed files, in-place editing, and output redirection to files or pipes.

RATING: 9.4/10 MAINT: active DRIFT: low
▸ 5 reusable components found
microsoft/terminal ★ 105050 9640 APPLICATION

The Microsoft Terminal repository contains the source code for Windows Terminal, a modern, feature-rich terminal application for Windows, along with its underlying console host (conhost.exe). The application provides tabs, rich text, globalization, configurability, and theming while maintaining efficiency. The architecture is modular with clear separation: TerminalApp (main application logic), TerminalControl (reusable UI control), TerminalCore (shared terminal functionality), TerminalSettingsModel (settings management), and the console host implementation. Key entry points include src/cascadia/WindowsTerminal/main.cpp for the terminal application and src/host/ for the console host. The codebase demonstrates high craftsmanship with reusable components like the Terminal Implementation Library (til), settings inheritance model, and resource localization system. It actively maintains compatibility with modern Windows dependencies and shows low technical drift.

RATING: 9.3/10 MAINT: active DRIFT: low
▸ 3 reusable components found
PowerShell/PowerShell ★ 55527 8468 APPLICATION

PowerShell 7 (pwsh) is a production-grade cross-platform automation and configuration shell: a scripting language runtime, command engine, and host application. The repository contains the core engine assembly (System.Management.Automation), console host, global tool shim, hundreds of built-in cmdlets, provider infrastructure, remoting, formatting/serialization, and a meta-package SDK for embedding PowerShell in .NET applications. In production it executes scripts and commands, pipelines objects through cmdlets and providers, formats results for console or serialized transport, and supports both local runspaces and remote sessions over WinRM/WSMan and SSH. The primary entry points are ConsoleShell.Start() for the interactive host, the GlobalToolShim for the dotnet tool distribution, and the PowerShell.Create() hosting API used by embedded scenarios.

RATING: 9.2/10 MAINT: active DRIFT: medium
▸ 3 reusable components found
Aider-AI/aider ★ 49213 4999 APPLICATION

Aider is a mature, well-architected CLI application that enables AI pair programming in the terminal. It integrates with 100+ LLMs via LiteLLM to help developers edit code in local git repositories. The system is built around a sophisticated coder abstraction that supports multiple edit formats (whole file, diff, search/replace blocks, unified diffs) to accommodate different LLM capabilities. The architecture is plugin-based with a clear separation between the main CLI loop, coder implementations, model management, and repository mapping. Aider automatically commits changes with sensible commit messages, provides linting/testing integration, and supports advanced features like prompt caching, voice input, and a browser-based GUI. The codebase demonstrates strong engineering practices with comprehensive testing, CI/CD pipelines, and careful dependency management. The repo map feature using tree-sitter for code analysis is particularly notable, providing intelligent context about codebases to LLMs. The project maintains high quality through extensive test coverage, pre-commit hooks, and automated benchmarking against coding tasks.

RATING: 9.2/10 MAINT: active DRIFT: low
▸ 5 reusable components found
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
sxyazi/yazi ★ 42485 1033 APPLICATION

Yazi is a blazing-fast terminal file manager written in Rust, built on async I/O and a modular crate architecture. It provides a full-featured TUI with file operations (copy, move, delete, rename, trash), multi-tab support, visual mode, and extensive plugin system via Lua scripting. The architecture is event-driven with an actor model, a generic task scheduler for background operations, and a virtual filesystem abstraction supporting local, SFTP, and custom Lua backends. It includes image preview via multiple protocols (Kitty, Sixel, Chafa, etc.), clipboard integration, and a distributed data service for cross-instance communication. The codebase is highly modular with over 30 internal crates, each with a single responsibility, and demonstrates strong engineering practices including custom serialization (Wire protocol), cross-platform abstractions, and lock-free data structures. It is actively maintained with frequent commits, comprehensive CI/CD, and a detailed coding style guide (AGENTS.md).

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 4 reusable components found
fastfetch-cli/fastfetch ★ 24987 925 APPLICATION

Fastfetch is a high-performance, cross-platform system information fetcher designed for the command line. It detects and displays hardware (CPU, GPU, memory, disks, battery, displays, network, Bluetooth, etc.) and software (OS, kernel, desktop environment, window manager, packages, processes, etc.) with extensive customization options including ASCII art logos, images, and JSON output. The architecture is monolithic with a modular detection system: each subsystem (e.g., GPU, battery) has a platform-agnostic header and multiple platform-specific implementation files (Linux, macOS, Windows, BSDs, Haiku, Solaris, Android). The core common library provides dynamic string buffers (FFstrbuf), generic lists (FFlist), dynamic library loading helpers, file I/O, configuration parsing, and formatting utilities. Build configuration is CMake-based with optional dependencies (ImageMagick, libva, Lua, etc.). The codebase is written in modern C (C23) and demonstrates strong engineering practices with consistent patterns for module initialization, option parsing, JSON config generation, and error handling. It is actively maintained with frequent releases and broad platform support.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 2 reusable components found
tldr-pages/tlrc ★ 1028 34 APPLICATION

tlrc is the official Rust-based tldr client, providing simplified, community-driven man pages for over 10,000 commands. It downloads, caches, and renders Markdown pages with rich ANSI styling, line wrapping, and placeholder highlighting. The architecture is a single binary with modular components: CLI argument parsing via clap, configurable TOML-based settings, a caching layer with SHA256 verification and periodic auto-updates, and a flexible page renderer supporting multiple output modes (normal, compact, raw). The codebase exhibits high craftsmanship with comprehensive error handling, thorough unit tests, and a clean separation of concerns. It serves as a robust example of a well-structured Rust CLI application, particularly notable for its reusable markdown rendering engine and config management patterns.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 3 reusable components found
$ loading more...
$ submit: