Ruplacer is a command-line tool written in Rust for finding and replacing text in files. It supports literal string, regex, and case-preserving replacements, and provides a diff-like output of changes. The tool respects .gitignore, allows filtering by file type, and can operate in a dry-run mode. The architecture is modular, with separate modules for argument parsing, console output, directory traversal, file processing, and the core replacement logic. The replacement logic is particularly notable for its use of the strategy pattern to handle different matching algorithms in a uniform way.
x-cmd is a modular POSIX shell command framework providing 300+ modules and 600+ curated CLI tools behind a unified `x` dispatcher. In production it functions as a cross-platform developer toolkit: it wraps package managers (apt, brew, scoop, winget, pixi, asdf), provides AI/LLM client integrations (OpenAI, Gemini, Claude, DeepSeek, Ollama, Kimi), wraps git-forge APIs (GitHub, GitLab, Gitea, Gitee, Codeberg), and offers system utilities (process/disk/network/GPU monitoring, DNS, routing, file operations). The core is a shell bootstrap (`X`) that sources module entry points (`mod/<name>/latest`), with lazy-loading via the `xrc:mod:lib` DSL and a metadata layer (`adv/*.jso`) driving shell completions, help text, and TLDR examples. The framework explicitly targets bash, zsh, dash, fish, nushell, xonsh, and PowerShell with per-shell code paths, and supports Linux, macOS, Windows (Git Bash/WSL), and Termux. Architecturally this is a monolith of loosely-coupled shell modules rather than a single binary. Each module follows a consistent pattern: a `latest` manifest declaring the main function, subcommand dispatch via `case` statements, and AWK scripts for data transformation. Configuration flows through a YAML profile system (`cfgy`), command output caching via `ccmd`, and on-demand binary provisioning through `pkg`/`pixi`/`snap` fallbacks. The most impressive craftsmanship lives in the AWK libraries: a pure-AWK JSON parser, a QR encoder with GF(256) Reed-Solomon error correction, a Chinese lunar calendar converter, and a TSV-based ontology engine. These are genuinely reusable, self-contained data-processing components. However, the codebase also contains many stub modules, duplicated AI-provider wrappers, hardcoded version pins, and heavy `eval` usage — the breadth of scope (300+ modules) trades completeness for coverage. The repo has a hybrid character: while dominantly an application, it embeds data-oriented subsystems (ondb ontology database, CVE/OSV/KEV vulnerability data, agent token-cost analytics) that could be extracted independently.