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: >-4 You are an expert in Starship, the minimal, blazing-fast, cross-shell5 prompt written in Rust. You help developers customize their terminal prompt6 with git status, language versions, cloud context, battery level, time, and7 custom modules — working identically across Bash, Zsh, Fish, PowerShell, and8 any shell with a single TOML config file.9license: Apache-2.010compatibility: ''11metadata:12 source: https://skillmd.com/skills/eliferjunior/starship13 author: terminal-skills14 version: 1.0.015 category: Developer Tools16 tags:17 - terminal18 - prompt19 - shell20 - customization21 - rust22 - fast23 - cross-shell24---2526# Starship — Cross-Shell Prompt2728You 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.2930## Core Capabilities3132### Configuration3334```toml35# ~/.config/starship.toml36format = """37$username\38$hostname\39$directory\40$git_branch\41$git_status\42$nodejs\43$python\44$rust\45$golang\46$docker_context\47$kubernetes\48$aws\49$terraform\50$cmd_duration\51$line_break\52$character"""5354[character]55success_symbol = "[❯](bold green)"56error_symbol = "[❯](bold red)"5758[directory]59truncation_length = 360truncate_to_repo = true61style = "bold cyan"6263[git_branch]64symbol = "🌿 "65style = "bold purple"6667[git_status]68conflicted = "⚔️ "69ahead = "⇡${count} "70behind = "⇣${count} "71diverged = "⇕⇡${ahead_count}⇣${behind_count} "72untracked = "?${count} "73stashed = "📦 "74modified = "!${count} "75staged = "+${count} "76deleted = "✘${count} "7778[nodejs]79symbol = "⬢ "80detect_files = ["package.json", ".nvmrc"]81style = "bold green"8283[python]84symbol = "🐍 "85detect_extensions = ["py"]86style = "bold yellow"8788[rust]89symbol = "🦀 "90style = "bold red"9192[docker_context]93symbol = "🐳 "94only_with_files = true9596[kubernetes]97disabled = false98symbol = "☸ "99detect_files = ["k8s", "kubernetes"]100101[aws]102symbol = "☁️ "103format = '[$symbol($profile )(\($region\))]($style)'104105[cmd_duration]106min_time = 2000 # Show if command took >2s107format = "took [$duration]($style) "108style = "bold yellow"109110[time]111disabled = false112format = "🕐 [$time]($style) "113time_format = "%H:%M"114115# Custom module116[custom.docker_running]117command = "docker ps -q | wc -l | tr -d ' '"118when = "docker ps -q"119symbol = "🐳 "120format = "[$symbol$output containers]($style) "121style = "blue"122```123124## Installation125126```bash127# macOS128brew install starship129130# Linux131curl -sS https://starship.rs/install.sh | sh132133# Add to shell:134# Bash: eval "$(starship init bash)" >> ~/.bashrc135# Zsh: eval "$(starship init zsh)" >> ~/.zshrc136# Fish: starship init fish | source >> ~/.config/fish/config.fish137```138139## Best Practices1401411. **Cross-shell** — Same config works in Bash, Zsh, Fish, PowerShell; switch shells without reconfiguring1422. **Lazy detection** — Modules only show when relevant (Node.js only in JS projects); clean prompt by default1433. **Git status at a glance** — Shows ahead/behind, modified, staged, untracked counts inline1444. **Command duration** — Set `min_time = 2000` to show timing for slow commands; helps identify bottlenecks1455. **Cloud context** — Show AWS profile, K8s context, Terraform workspace; never deploy to wrong environment1466. **Custom modules** — Use `[custom.name]` for any shell command output; docker containers, VPN status, etc.1477. **Presets** — Start with a preset: `starship preset nerd-font-symbols -o ~/.config/starship.toml`1488. **Performance** — Written in Rust; renders in <10ms; never slows down your terminal