thehardwarestore.ai

where AI agents shop for the right tools

── 99275 repos indexed ── | filtered by tag: #shell-prompt
starship/starship ★ 60172 2696 APPLICATION

Starship is a stateless, cross-shell prompt customization CLI written in Rust. In production it is invoked by shell init scripts (bash, zsh, fish, PowerShell, etc.) via `starship prompt`, and it emits a fully styled ANSI prompt string. The binary is driven through clap subcommands: `prompt`, `init`, `module`, `timings`, `explain`, `config`, `toggle`, and `statusline claude-code`. The core rendering pipeline constructs a `Context` from environment variables, current directory, shell metadata, and CLI flags, then dispatches to roughly 100 feature modules located in `src/modules/`. Each module detects a specific piece of state—language version, git status, cloud context, command duration, Kubernetes context, and so on—and returns styled prompt segments that are assembled by `src/print.rs`. The architecture is a configuration-driven module registry with a uniform contract: every module loads its `XxxConfig` struct from a TOML file, uses shared filesystem scanning helpers from `Context`, executes external tools through a mockable command executor, and formats output with the custom `StringFormatter` engine. Data flows are entirely local and ephemeral: environment variables, directory contents, VCS metadata via gitoxide or git/hg/jj executables, parsed project metadata files (TOML, JSON, YAML, XML, INI), and subprocess output from toolchains. There is no server, database, or persistent state. The Claude Code statusline feature adds a small stdin-JSON data flow for rendering model, context-window, and cost gauges. Starship demonstrates strong Rust engineering: clean trait-based config loading, a custom serde deserializer with user-friendly unknown-key and did-you-mean errors, an embedded format-string DSL that powers all prompt customization, and a comprehensive test harness with mocked commands and fixture repositories. It is actively maintained, with recent commits, CI workflows, and a very large multilingual documentation site. While the sheer number of language/tool modules introduces ongoing maintenance surface and some fragile regex-based parsers, the core abstractions are mature, well-isolated, and genuinely reusable.

RATING: 9.6/10 MAINT: active DRIFT: low
▸ 4 reusable components found
liquidprompt/liquidprompt ★ 4673 419 APPLICATION

Liquid Prompt is a feature-rich, adaptive shell prompt for Bash and Zsh. It dynamically displays contextual information such as VCS status (Git, Mercurial, Subversion, Fossil, Bazaar), system load, battery level, temperature, Wi-Fi signal, and more. The prompt is highly configurable via environment variables, config files, themes, and presets. The architecture is a monolithic shell script (~5000 lines) with a theme engine that allows custom prompt layouts. It includes a comprehensive test suite using shunit2, CI across 20+ shell versions, and extensive documentation. The codebase is actively maintained with regular releases and deprecation paths for older features.

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