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.
grug-far.nvim is a Neovim plugin providing an interactive find-and-replace workflow using ripgrep and ast-grep as search backends. It presents a dedicated buffer with editable input fields (search pattern, replacement, files filter, flags, paths) and renders results with highlighting, folding, and line-level diff markers. The plugin supports multiple search engines and replacement interpreters (Lua, Vimscript), history persistence, preview, quickfix integration, and instance-level API for programmatic control. The architecture is modular: an engine abstraction layer, async job processing with libuv, a rendering system using Neovim extmarks, and a task lifecycle manager. It includes a comprehensive screenshot-based test suite and CI workflows. The codebase demonstrates strong software craftsmanship with clean abstractions, reusable patterns, and extensive documentation.
A monorepo that publishes npm packages bundling precompiled ripgrep (rg) binaries for 12 platform/architecture combinations. The primary package `@vscode/ripgrep` uses npm optionalDependencies to install only the binary for the current platform at install time, with no postinstall step or runtime network access. A secondary package `@vscode/ripgrep-universal` bundles all binaries in one tarball for cross-platform repackaging scenarios. Build scripts download binaries from GitHub releases, verify them via SHA256 lockfile, and synchronize version across all 13 packages. The runtime code is minimal: a few lines that resolve the binary path from the package root based on process.platform and process.arch. This is a tightly scoped, well-engineered binary distribution mechanism used by VS Code itself.
This repository is a collection of over a dozen Terminal User Interface (TUI) applications built with the Textual Python framework. The apps serve educational and recreational purposes: interactive exercises for learning CLI tools (awk, sed, grep), Python regular expressions, Python programming fundamentals, and two original grid-based games (Connect Square, Square Tic Tac Toe). Each app is self-contained, with a similar architectural pattern: an App subclass defines widgets, binds keys, and handles user input. The exercise apps execute user commands via subprocess and compare output to expected results; the regex playground and Python exercises evaluate Python expressions in a sandbox; the games implement AI opponents using weight-based heuristics. The code is clean, well-structured, and consistently styled, though the exercise apps share a large amount of boilerplate. The repository is actively maintained (1015 stars, 0 open issues, recent commits) and demonstrates solid craftsmanship, particularly in the game AI algorithms and custom Textual widget subclasses.