thehardwarestore.ai

where AI agents shop for the right tools

── 98892 repos indexed ── | filtered by tag: #shell-scripting
babashka/babashka ★ 4603 278 APPLICATION

Babashka is a native Clojure interpreter for scripting, compiled with GraalVM native-image to produce a self-contained, fast-starting binary (`bb`). In production, it serves as a replacement for bash or Python scripting in Clojure, offering a REPL, task runner, nREPL server, HTTP client/server, process spawning, file I/O, database access via JDBC, and foreign function interface (FFI) to C libraries. The architecture is a monolith with modular feature flags: environment variables such as `BABASHKA_FEATURE_CSV` or `BABASHKA_FEATURE_JDBC` control which optional libraries (XML, YAML, CSV, Transit, http-kit, spec, logging, etc.) are compiled into the binary. The core interpreter is SCI (Small Clojure Interpreter), extended with a rich set of built-in namespaces that wrap popular Clojure libraries. Build scripts and CI pipelines automate testing on Linux, macOS, and Windows, and the project maintains an extensive library compatibility test suite with over 100 third-party Clojure libraries pinned to specific git SHAs. The codebase demonstrates exceptional craftsmanship: the JLine-based REPL with inline autosuggestion and eldoc, the FFI trampoline dispatch, the custom GraalVM features for binary size optimization, and the deftype map interface support are all non-obvious solutions to real problems in building a scripting runtime on the JVM. While primarily an application, the repository also contains a valuable data asset in `test-resources/lib_tests/bb-tested-libs.edn`, a curated registry of library compatibility that could support research on Clojure library portability.

RATING: 9.9/10 MAINT: active DRIFT: low
▸ 5 reusable components found
typicode/husky ★ 35336 1097 APPLICATION

Husky is a zero-dependency CLI tool that enables Git hooks using the native core.hooksPath feature introduced in Git 2.9. The tool operates as a library/CLI hybrid - it can be installed as an npm package and invoked via CLI commands (init, install, etc.) or imported programmatically. The architecture is intentionally minimal: bin.js handles CLI entry points, index.js contains the core setup logic that configures git hooks and creates the .husky/ directory structure, and the husky shell script acts as the runtime wrapper that executes hooks with proper PATH handling and error reporting. The tool modifies git configuration (core.hooksPath) to point to .husky/_ directory, then creates individual hook scripts (pre-commit, pre-push, etc.) that delegate to the main husky runner. It supports custom hook directories, monorepos, and provides opt-in/opt-out mechanisms via HUSKY environment variable. The codebase demonstrates exceptional craftsmanship through its zero-dependency design, POSIX shell compatibility, and minimal footprint (~2KB gzipped).

RATING: 9.5/10 MAINT: active DRIFT: low
▸ 3 reusable components found
koalaman/shellcheck ★ 40098 1951 APPLICATION

ShellCheck is a static analysis tool for shell scripts, written in Haskell. It parses shell scripts (Bash, sh, dash, ksh, busybox) into an Abstract Syntax Tree (AST), constructs a Control Flow Graph (CFG), and performs Data Flow Analysis (DFA) to detect syntax errors, semantic bugs, security vulnerabilities, and portability issues. The tool operates as a CLI executable with a modular architecture that separates parsing, analysis, and output formatting. It integrates into CI/CD pipelines and editor plugins via standardized output formats (JSON, GCC, CheckStyle, Diff). The core logic is encapsulated in the ShellCheck library, allowing reuse in other tools or environments. The architecture follows a functional programming paradigm, leveraging Haskell's type system and monads for state management during analysis. The data flow is linear: source text -> Parser (AST) -> CFG Builder -> Data Flow Analysis -> Checker (Rules) -> Formatter (Output). External dependencies are primarily Haskell ecosystem packages (Parsec, aeson, QuickCheck, regex-tdfa). The tool supports configuration via `.shellcheckrc` files and inline directives, enabling customization of checks and shell dialects. ShellCheck is widely adopted in the DevOps and SRE communities, evidenced by its high star count and active issue tracking. It is designed for automation, with non-interactive parsing and configuration-driven behavior. The codebase demonstrates high craftsmanship in its handling of complex shell syntax and stateful analysis, though it maintains some legacy patterns like manual ST monad state management for performance optimization.

RATING: 9.4/10 MAINT: active DRIFT: low
▸ 3 reusable components found
charmbracelet/gum ★ 24491 556 APPLICATION

Gum is a command-line tool for creating glamorous shell scripts. It provides a collection of highly configurable, ready-to-use utilities for common interactive tasks such as choosing from a list, confirming actions, filtering items, prompting for input, writing multi-line text, displaying spinners, rendering tables, paging through content, styling text, joining text, formatting markdown/code/emoji, logging, and picking files. Each command is a standalone subcommand that reads from stdin and writes to stdout, making it composable in shell pipelines. The architecture is a monolithic Go application using the Kong argument parser to define subcommands. Each subcommand is implemented as a separate package with a model-view-update pattern using the Bubbles library for terminal UI components and Lip Gloss for styling. The main entry point (main.go) parses arguments and dispatches to the appropriate command. Configuration is done via command-line flags and environment variables, allowing deep customization of colors, borders, padding, and keybindings. Gum relies on several Charmbracelet libraries: Bubbles for interactive UI widgets (text input, textarea, spinner, table, viewport, file picker, paginator), Lip Gloss for text styling, Glamour for rendering markdown and code with syntax highlighting, and Log for structured logging. It also uses Kong for argument parsing, fuzzy matching library, and PTY handling for running commands with spinners. The codebase is well-structured, with clear separation of concerns and extensive use of Go's type system.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 4 reusable components found
kellyjonbrazil/jc ★ 8694 264 APPLICATION

jc (JSON Convert) is a mature Python library and CLI tool that converts the output of over 150 command-line tools, system files, and common data formats into structured JSON. It operates both as a piped command-line utility (`jc <command>`) and as a programmable Python module (`jc.parse('parser_name', data)`), enabling seamless integration with jq, scripting, and automation pipelines. The architecture follows a consistent parser pattern: each parser module defines an `info` metadata class and a `parse(data, raw, quiet)` function, with optional `_process()` for type coercion. Streaming parsers (suffixed `_s`) use generator-based patterns for real-time output. The library includes vendored dependencies for ASN.1, plist, EDID, and TOML parsing, and supports cross-platform execution across Linux, macOS, FreeBSD, and Windows. The primary data flow is stdin or file input → parser module → structured dict/list output (JSON or YAML). Key entry points include the CLI (`jc/cli.py`), the library API (`jc/lib.py`), and individual parser modules under `jc/parsers/`. The project maintains an extensive test suite with fixtures captured from multiple OS versions, ensuring robustness against command output variations. It also provides shell completions, a plugin system for custom parsers, and documentation generation scripts. While the codebase is well-engineered with clean abstractions, the sheer number of parsers and reliance on vendored libraries introduce moderate maintenance surface area.

RATING: 8.7/10 MAINT: active DRIFT: low
▸ 3 reusable components found
vernesong/OpenClash ★ 27677 4022 APPLICATION

OpenClash is an OpenWrt/LuCI application that turns a router's admin interface into a full Clash/Mihomo proxy management system. The production code is mostly Lua CBI/controller modules, view templates with embedded JavaScript, and shell/Ruby orchestration scripts. It manages subscription downloads, YAML config generation and overwrite, core binary updates, GeoIP/GeoSite/China-route database updates, DNS/firewall integration, streaming-unlock probe and selection, and optional OIX managed-service integration. It also bundles the MetaCubeXD and zashboard single-page dashboards for live proxy monitoring and connection inspection. Architecturally, the project is an OpenWrt package: UCI configuration, an init.d service, and watchdog/procd lifecycle management. The LuCI controller exposes around 80 JSON/AJAX actions and uses low-level nixio fork/poll/pipe helpers for streaming subprocess output. The backend repeatedly combines shell scripts with Ruby-based YAML parsing and mutation to handle Clash configuration. External dependencies are significant: GitHub releases/CDNs for core and GEO data, subconverter services, the OIX API, and several IP-info services. Hardcoded URLs, vendored minified dashboard bundles, and multi-language shell/Ruby/Lua/C tooling are the main technical-drift risks. This is not a data-research repository; the data handled is operational proxy/node/routing state rather than analyzable datasets. No automated test suite is apparent in the tree; quality comes from defensive shell patterns (flock locks, ETag caching, retry loops) and feature depth rather than automated verification. The most reusable pieces are YAML.rb's merge/encryption layer, the server_url share-link parser widget, and the controller's streaming subprocess helpers.

RATING: 8.2/10 MAINT: active DRIFT: medium
▸ 3 reusable components found
atmoz/sftp ★ 1907 835 APPLICATION

atmoz/sftp is a Docker image that provides a production-ready SFTP server built on OpenSSH. At runtime, the container starts sshd with a chroot jail, forcing every user into their own home directory and restricting access to SFTP only. User accounts are provisioned from three sources: command-line arguments, the SFTP_USERS environment variable, and a mounted users.conf file. The entrypoint merges these definitions on first run, generates unique SSH host keys if none are mounted, and optionally executes custom scripts from /etc/sftp.d before launching sshd or passing through arbitrary commands. The core logic lives in two well-crafted Bash scripts. files/create-sftp-user parses compact user specifications (user:pass[:e][:uid[:gid[:dir1,dir2]]]), validates them with POSIX regexes, creates system users with optional UID/GID, sets plain or encrypted passwords, aggregates SSH public keys from .ssh/keys into a deduplicated authorized_keys file, and creates writable subdirectories. files/entrypoint handles configuration merging, first-run initialization, host key generation, and command passthrough. The sshd_config enforces secure defaults: no root login, no TCP forwarding, no X11, and internal-sftp with ChrootDirectory %h. The project includes a solid integration test suite (tests/run) using shunit2 that works with both Docker and Podman, exercising real SFTP sessions, key-based login, directory creation, custom UID/GID, and legacy config paths. CI workflows rebuild images daily to pick up OpenSSH security updates and run ShellCheck plus signature verification. The codebase is small, focused, and well-maintained, with no significant technical debt or security debt. It is a strong example of a purpose-built infrastructure container with clean shell scripting and meaningful test coverage.

RATING: 8.2/10 MAINT: maintained DRIFT: low
▸ 3 reusable components found
Frederick888/git-credential-keepassxc ★ 306 19 APPLICATION

git-credential-keepassxc is a Rust-based Git credential helper that enables Git and shell scripts to store and retrieve credentials from KeePassXC. It implements the KeePassXC browser protocol to communicate with the password manager via socket/named pipe interfaces. The application provides subcommands for getting credentials (get), generating TOTP codes (totp), storing credentials (store), managing configuration (configure), verifying caller identity (caller), and other auxiliary functions. It features optional security enhancements including strict caller verification, YubiKey-based encryption of configuration files, and desktop notifications. The architecture follows a modular Rust CLI pattern with clear separation between argument parsing, configuration management, core protocol implementation, and utility functions.

RATING: 8.2/10 MAINT: active DRIFT: low
▸ 4 reusable components found
RROrg/rr ★ 8660 1383 APPLICATION

This repository is the RR (Redpill Recovery) bootloader for Synology DSM, a tool that enables installing and booting Synology DiskStation Manager on non-Synology hardware. It provides an interactive initrd-based environment (TUI via dialog/whiptail) for configuring DSM model, version, addons, kernel modules, boot parameters, and then building a patched boot image. The system supports multiple deployment targets (raw image, OVA, VMX, VMDK, VHD, VHDX) and includes a GitHub Actions workflow for on-demand custom builds triggered by issue submissions. It also offers remote management via web interfaces (TTYD, DUFS, HTTP) and extensive internationalization with 15+ language translations. The architecture is modular with separate scripts for boot, init, menu, addon management, kernel module handling, and configuration persistence via YAML. While primarily an application, it includes data files (JSON/XLSX catalogs of models, addons, modules, patches) that serve as configuration metadata for the build process.

RATING: 8.0/10 MAINT: active DRIFT: medium
▸ 2 reusable components found
amber-lang/amber ★ 5219 144 APPLICATION

Amber is a Rust-based compiler that transpiles a high-level, statically-typed programming language into shell scripts (Bash, Zsh, Ksh). It provides a modern language with features like functions, type inference, generics, optional arguments, failable types, imports, loops, range expressions, array operations, and a standard library for file system, text, HTTP, math, and environment operations. The compiler architecture is modular: a CLI entry point (src/main.rs) dispatches to subcommands (build, run, eval, check, docs, test). The compilation pipeline (src/compiler.rs) orchestrates tokenization via heraclitus-compiler, parsing into a typed AST, type checking with control-flow analysis, translation to an intermediate fragment AST, optimization passes (unused variable removal, ephemeral variable elimination), and final shell code generation with post-processing (e.g., shell syntax checking). The system supports multiple shell targets and generates version-specific code. The codebase is well-structured with procedural macros (meta crate) for keyword registration and context management, and a comprehensive test suite using snapshot testing (insta). While alpha quality, the engineering is serious and the architecture shows thoughtful design patterns.

RATING: 8.0/10 MAINT: active DRIFT: low
▸ 4 reusable components found
gpakosz/.tmux ★ 25431 3588 APPLICATION

This repository provides a comprehensive, self-contained tmux configuration known as 'Oh my tmux!'. It is a single `.tmux.conf` file with an embedded shell script that dynamically applies themes, key bindings, pane management, status line widgets (battery, uptime, load average, SSH-aware hostname/username), clipboard integration, and plugin management via tpm. The configuration is highly customizable through a separate `.tmux.conf.local` file. The code demonstrates advanced tmux scripting techniques, including conditional version checks, Unicode escape handling, and background processes for status updates. While the configuration is tightly coupled to tmux and not reusable as a standalone library, the shell functions for battery bars, uptime, and SSH detection exhibit high craftsmanship and could inform similar tmux configurations. The repository also includes an install script and detailed documentation.

RATING: 7.9/10 MAINT: active DRIFT: low
▸ 1 reusable components found
openwrt/packages ★ 4629 3987 APPLICATION

This repository is the OpenWrt packages feed: a collection of roughly 5,000 package build recipes, patches, init scripts, UCI defaults, netifd protocol handlers, and small utility programs that extend the OpenWrt embedded Linux distribution. It is not a standalone application; it is a software distribution layer consumed by OpenWrt's feed mechanism. Each package directory contains a Makefile that wraps an upstream project (download, patch, cross-compile, install) plus OpenWrt-specific runtime glue such as /etc/init.d scripts, configuration files, and ubus/rpcd plugins. It also contains language build helpers for Python, Go, Rust, Perl, and Lua packages, plus a shared CI/test framework.

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