Open-Source Wikis

/

Starship

/

Starship

starship/starship

Starship

Starship is a minimal, fast, customizable cross-shell prompt written in Rust. A single starship binary plugs into Bash, Zsh, Fish, PowerShell, Cmd, Nushell, Elvish, Ion, Tcsh, and Xonsh by emitting an init snippet for each shell. On every prompt redraw the binary inspects the working directory, environment, and version control state, then prints a styled prompt assembled from ~100 independent modules.

What it does

  • Detects what kind of project you are in (Rust crate, Node package, Kubernetes context, AWS profile, Git repo, …) and shows a relevant snippet.
  • Renders modules in parallel via rayon so the prompt stays sub-100ms even with many active modules.
  • Lets you fully reshape the prompt through a single ~/.config/starship.toml file, with TOML schema autocompletion provided by .github/config-schema.json.
  • Ships preset configurations (docs/public/presets/toml/) and a built-in Claude Code statusline profile.

Who uses it

Anyone who lives at a shell prompt and wants the same look and information across machines and shells. Starship is packaged in most major package repositories (Homebrew, apt, dnf, pacman, scoop, winget, Termux, FreeBSD ports, NixOS, …). The full install matrix lives in the project README.md.

  • Architecture — a tour of how a prompt gets rendered.
  • Getting started — build, test, and try the binary locally.
  • Glossary — module, segment, profile, target, and other Starship terms.
  • Modules — every prompt module the binary ships.
  • Subsystems — context, configuration, formatter, init scripts, and the rest of the engine.
  • How to contribute — branch, code, test, PR.

Tech stack at a glance

Layer Technology
Language Rust (edition 2024, MSRV 1.90)
CLI parsing clap with derive macros, in src/main.rs
Parallelism rayon thread pool sized via STARSHIP_NUM_THREADS
Git access gix (gitoxide) with selective features
Config format TOML (toml, toml_edit, jsonc-parser for JSONC files)
Format DSL parser pest, grammar in src/formatter/spec.pest
ANSI styling nu-ansi-term
Schema generation schemars (config-schema feature)
Docs site VitePress under docs/, hosted at starship.rs
CI GitHub Actions (.github/workflows/workflow.yml) on Ubuntu, macOS, Windows

Where to look first

  • The end-to-end flow starts in src/main.rs and ends in src/print.rs.
  • The list of prompt modules the binary knows about lives in src/module.rs (ALL_MODULES).
  • The default order of modules is PROMPT_ORDER in src/configs/starship_root.rs.
  • Per-module logic lives in src/modules/<name>.rs; per-module config structs live in src/configs/<name>.rs.
  • Shell-specific init script templates are in src/init/starship.<shell>.

If you only have time to read three files, read src/main.rs, src/print.rs, and src/modules/mod.rs.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Starship – Starship wiki | Factory