ScriptsApr 11, 2026·1 min read

Starship — Minimal Blazing-Fast Customizable Shell Prompt

Starship is a minimal, blazing-fast, and infinitely customizable prompt for any shell. Works with bash, zsh, fish, PowerShell, nushell, and more. Single TOML config file and Rust-powered speed with gorgeous defaults.

SC
Script Depot · Community
Quick Use

Use it first, then decide how deep to go

This block should tell both the user and the agent what to copy, install, and apply first.

# Install
brew install starship                    # macOS
curl -sS https://starship.rs/install.sh | sh
scoop install starship                  # Windows

Add to shell config:

# ~/.bashrc
eval "$(starship init bash)"

# ~/.zshrc
eval "$(starship init zsh)"

# ~/.config/fish/config.fish
starship init fish | source

Customize ~/.config/starship.toml:

add_newline = true

[character]
success_symbol = "[➜](bold green)"
error_symbol = "[✗](bold red)"

[directory]
truncation_length = 3
truncate_to_repo = true

[git_branch]
symbol = "🌱 "

[nodejs]
format = "via [⬢ $version](bold green) "
Intro

Starship is a minimal, blazing-fast, and infinitely customizable prompt for any shell. Written in Rust, it reads a single TOML config file and renders contextual information (git status, node version, k8s context, cloud profile) without measurable latency. Compatible with bash, zsh, fish, PowerShell, nushell, cmd, xonsh, ion, elvish, and more.

What Starship Does

  • Git info — branch, status, stash, upstream
  • Language versions — Node, Python, Rust, Go, Java, Ruby, PHP, .NET, etc.
  • Cloud — AWS/GCP/Azure profile
  • Kubernetes — current context + namespace
  • Docker context — show active context
  • Package version — auto-detect package.json, Cargo.toml, pyproject.toml
  • Command duration — show time for slow commands
  • Exit code — red on non-zero
  • Custom modules — run any command and display output

Architecture

Starship runs as a subprocess on each prompt. Reads TOML config, collects context from environment + git + language detection + cloud CLIs, renders using a single starship prompt call. Aggressive caching keeps it below ~50ms.

Self-Hosting

CLI tool, self-contained Rust binary.

Key Features

  • Universal (any shell)
  • Single TOML config
  • 100+ built-in modules
  • Nerd Font symbol support
  • Command duration
  • Right prompt support
  • Conditional rendering
  • Highly customizable colors and formats
  • Lightning fast (<50ms)

Comparison

Prompt Language Shells Speed Config
Starship Rust All Fastest TOML
Powerlevel10k Zsh Zsh only Very fast Interactive
Spaceship Zsh Zsh only Slow zsh vars
pure Zsh Zsh only Fast zsh vars
oh-my-posh Go All Fast JSON/YAML/TOML

常见问题 FAQ

Q: 和 Powerlevel10k? A: p10k 在 zsh 里速度略快(无子进程),但仅限 zsh。Starship 跨 shell,配置更简洁。都是好选择。

Q: 需要 Nerd Font 吗? A: 默认配置用 Unicode 符号。Nerd Font(JetBrainsMono Nerd Font 等)能获得更好的图标体验。

Q: 性能怎样? A: Rust 写的,benchmark 一般 20-50ms。慢的话用 starship timings 诊断哪个 module 拖速度。

来源与致谢 Sources

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets