DEV Community

Alex Spinov
Alex Spinov

Posted on

Starship Has a Free Prompt: The Cross-Shell Prompt That Shows Git Status, Language Versions, and Cloud Context in Milliseconds

Your terminal prompt shows user@hostname:~/dir$. You cd into a Node project — no indication of Node version. You check out a branch — no git status. You connect to AWS — no profile info. Starship turns your prompt into a contextual dashboard that shows exactly what you need, when you need it.

What Starship Actually Does

Starship is a cross-shell prompt written in Rust. It detects your current context (git branch, language version, cloud provider, battery level, etc.) and displays only the relevant information. In a Python project, it shows the Python version. In a Kubernetes context, it shows the cluster. In a git repo, it shows branch, ahead/behind, and dirty status.

Starship is blazing fast (renders in <10ms) because it's compiled Rust, not a shell script. It works with bash, zsh, fish, PowerShell, Elvish, Tcsh, Nushell, and Ion. One configuration file works across all shells.

Open-source (ISC license). 40K+ GitHub stars.

Quick Start

# Install
curl -sS https://starship.rs/install.sh | sh

# Add to your shell
# Bash: echo 'eval "$(starship init bash)"' >> ~/.bashrc
# Zsh:  echo 'eval "$(starship init zsh)"' >> ~/.zshrc
# Fish: echo 'starship init fish | source' >> ~/.config/fish/config.fish
Enter fullscreen mode Exit fullscreen mode

That's it. Your prompt now shows:

~/projects/my-api on  main [!?] via  v20.11.0 took 3s
❯
Enter fullscreen mode Exit fullscreen mode

Configure in ~/.config/starship.toml:

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

[git_branch]
format = "on [$branch]($style) "

[nodejs]
format = "via [$symbol($version)]($style) "

[python]
format = "via [$symbol$version($virtualenv)]($style) "

[docker_context]
format = "via [$symbol$context]($style) "

[aws]
format = "on [$symbol($profile)(\($region\))]($style) "
Enter fullscreen mode Exit fullscreen mode

3 Practical Use Cases

1. Git-Aware Prompt

Starship shows:

  • Branch name
  • Ahead/behind remote
  • Staged, modified, untracked counts
  • Stash count
  • Merge/rebase state
~/project on  feature/auth [↑2↓1] [+3 !2 ?1] ≡1
Enter fullscreen mode Exit fullscreen mode

All at a glance, no git status needed.

2. Polyglot Project Context

~/microservices/api via 🐹 v1.21 via 🐳 desktop-linux on ☁️ staging
~/microservices/web via ⬢ v20.11 📦 v2.1.0
~/ml-pipeline via 🐍 v3.11 (venv)
Enter fullscreen mode Exit fullscreen mode

Every directory shows its relevant context automatically.

3. Custom Modules

[custom.terraform]
command = "terraform workspace show"
when = "test -f main.tf"
format = "via [tf $output]($style) "
style = "bold purple"
Enter fullscreen mode Exit fullscreen mode

Add any custom context to your prompt.

Why This Matters

Your terminal prompt is information you see thousands of times a day. Starship makes it useful without making it slow. The cross-shell compatibility means you configure once and it works everywhere — local terminal, SSH session, VS Code integrated terminal.


Need custom data extraction or web scraping solutions? I build production-grade scrapers and data pipelines. Check out my Apify actors or email me at spinov001@gmail.com for custom projects.

Follow me for more free API discoveries every week!

Top comments (0)