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.
Powerlevel10k is a high-performance Zsh prompt theme that provides extensive customization through a configuration wizard and pre-built style templates. The system consists of a core Zsh script (`internal/p10k.zsh`) that handles prompt rendering, segment definitions, caching, and async background computation via a worker process. It includes a bundled C++ daemon (`gitstatusd`) for extremely fast git status queries, which communicates with the shell through a custom binary protocol. The architecture is a monolith within the Zsh ecosystem, with the prompt engine tightly integrated into the shell's widget system. Key entry points are the theme file (`powerlevel10k.zsh-theme`), the `p10k` command (for configuration, reload, and segment help), and the `gitstatusd` binary. External dependencies include Zsh ≥5.1, git, and optional tools for various prompt segments (e.g., kubectl, terraform, pyenv). The repository is explicitly in limited maintenance mode with no new features and most bugs unfixed, but the codebase is mature and well-optimized.