Starship — Cross-Shell Prompt
You are an expert in Starship, the minimal, blazing-fast, cross-shell prompt written in Rust. You help developers customize their terminal prompt with git status, language versions, cloud context, battery level, time, and custom modules — working identically across Bash, Zsh, Fish, PowerShell, and any shell with a single TOML config file.
Core Capabilities
Configuration
# ~/.config/starship.toml
format = """
$username\
$hostname\
$directory\
$git_branch\
$git_status\
$nodejs\
$python\
$rust\
$golang\
$docker_context\
$kubernetes\
$aws\
$terraform\
$cmd_duration\
$line_break\
$character"""
[character]
success_symbol = "[❯](bold green)"
error_symbol = "[❯](bold red)"
[directory]
truncation_length = 3
truncate_to_repo = true
style = "bold cyan"
[git_branch]
symbol = "🌿 "
style = "bold purple"
[git_status]
conflicted = "⚔️ "
ahead = "⇡${count} "
behind = "⇣${count} "
diverged = "⇕⇡${ahead_count}⇣${behind_count} "
untracked = "?${count} "
stashed = "📦 "
modified = "!${count} "
staged = "+${count} "
deleted = "✘${count} "
[nodejs]
symbol = "⬢ "
detect_files = ["package.json", ".nvmrc"]
style = "bold green"
[python]
symbol = "🐍 "
detect_extensions = ["py"]
style = "bold yellow"
[rust]
symbol = "🦀 "
style = "bold red"
[docker_context]
symbol = "🐳 "
[kubernetes]
disabled = false
symbol = "☸ "
detect_files = ["k8s", "kubernetes"]
[aws]
symbol = "☁️ "
format = '[$symbol($profile )(\($region\))]($style)'
[cmd_duration]
min_time = 2000 # Show if command took >2s
format = "took [$duration]($style) "
style = "bold yellow"
[time]
disabled = false
format = "🕐 [$time]($style) "
time_format = "%H:%M"
# Custom module
[custom.docker_running]
command = "docker ps -q | wc -l | tr -d ' '"
when = "docker ps -q"
symbol = "🐳 "
format = "[$symbol$output containers]($style) "
style = "blue"
Installation
# macOS
brew install starship
# Linux
curl -sS https://starship.rs/install.sh | sh
# Add to shell:
# Bash: eval "$(starship init bash)" >> ~/.bashrc
# Zsh: eval "$(starship init zsh)" >> ~/.zshrc
# Fish: starship init fish | source >> ~/.config/fish/config.fish
Best Practices
- Cross-shell — Same config works in Bash, Zsh, Fish, PowerShell; switch shells without reconfiguring
- Lazy detection — Modules only show when relevant (Node.js only in JS projects); clean prompt by default
- Git status at a glance — Shows ahead/behind, modified, staged, untracked counts inline
- Command duration — Set
min_time = 2000 to show timing for slow commands; helps identify bottlenecks
- Cloud context — Show AWS profile, K8s context, Terraform workspace; never deploy to wrong environment
- Custom modules — Use
[custom.name] for any shell command output; docker containers, VPN status, etc.
- Presets — Start with a preset:
starship preset nerd-font-symbols -o ~/.config/starship.toml
- Performance — Written in Rust; renders in <10ms; never slows down your terminal
1---2name: starship3description: You are an expert in Starship, the minimal, blazing-fast, cross-shell prompt written in Rust. You help developers customize their terminal prompt with git status, language versions, cloud context, battery level, time, and custom modules — working identically across Bash, Zsh, Fish, PowerShell, and any shell with a single TOML config file.4license: Apache-2.05---67# Starship — Cross-Shell Prompt89You are an expert in Starship, the minimal, blazing-fast, cross-shell prompt written in Rust. You help developers customize their terminal prompt with git status, language versions, cloud context, battery level, time, and custom modules — working identically across Bash, Zsh, Fish, PowerShell, and any shell with a single TOML config file.1011## Core Capabilities1213### Configuration1415```toml16# ~/.config/starship.toml17format = """18$username\19$hostname\20$directory\21$git_branch\22$git_status\23$nodejs\24$python\25$rust\26$golang\27$docker_context\28$kubernetes\29$aws\30$terraform\31$cmd_duration\32$line_break\33$character"""3435[character]36success_symbol = "[❯](bold green)"37error_symbol = "[❯](bold red)"3839[directory]40truncation_length = 341truncate_to_repo = true42style = "bold cyan"4344[git_branch]45symbol = "🌿 "46style = "bold purple"4748[git_status]49conflicted = "⚔️ "50ahead = "⇡${count} "51behind = "⇣${count} "52diverged = "⇕⇡${ahead_count}⇣${behind_count} "53untracked = "?${count} "54stashed = "📦 "55modified = "!${count} "56staged = "+${count} "57deleted = "✘${count} "5859[nodejs]60symbol = "⬢ "61detect_files = ["package.json", ".nvmrc"]62style = "bold green"6364[python]65symbol = "🐍 "66detect_extensions = ["py"]67style = "bold yellow"6869[rust]70symbol = "🦀 "71style = "bold red"7273[docker_context]74symbol = "🐳 "75only_with_files = true7677[kubernetes]78disabled = false79symbol = "☸ "80detect_files = ["k8s", "kubernetes"]8182[aws]83symbol = "☁️ "84format = '[$symbol($profile )(\($region\))]($style)'8586[cmd_duration]87min_time = 2000 # Show if command took >2s88format = "took [$duration]($style) "89style = "bold yellow"9091[time]92disabled = false93format = "🕐 [$time]($style) "94time_format = "%H:%M"9596# Custom module97[custom.docker_running]98command = "docker ps -q | wc -l | tr -d ' '"99when = "docker ps -q"100symbol = "🐳 "101format = "[$symbol$output containers]($style) "102style = "blue"103```104105## Installation106107```bash108# macOS109brew install starship110111# Linux112curl -sS https://starship.rs/install.sh | sh113114# Add to shell:115# Bash: eval "$(starship init bash)" >> ~/.bashrc116# Zsh: eval "$(starship init zsh)" >> ~/.zshrc117# Fish: starship init fish | source >> ~/.config/fish/config.fish118```119120## Best Practices1211221. **Cross-shell** — Same config works in Bash, Zsh, Fish, PowerShell; switch shells without reconfiguring1232. **Lazy detection** — Modules only show when relevant (Node.js only in JS projects); clean prompt by default1243. **Git status at a glance** — Shows ahead/behind, modified, staged, untracked counts inline1254. **Command duration** — Set `min_time = 2000` to show timing for slow commands; helps identify bottlenecks1265. **Cloud context** — Show AWS profile, K8s context, Terraform workspace; never deploy to wrong environment1276. **Custom modules** — Use `[custom.name]` for any shell command output; docker containers, VPN status, etc.1287. **Presets** — Start with a preset: `starship preset nerd-font-symbols -o ~/.config/starship.toml`1298. **Performance** — Written in Rust; renders in <10ms; never slows down your terminal