starship Cheatsheet
starship is a fast, highly customizable cross-shell prompt written in Rust (58K⭐). Supports Bash, Zsh, Fish, PowerShell, Elvish, and more with modular TOML-based configuration.
Updated: 2026-07-20·38 commands
Quick Start
``bash
starship init bash # Initialize for Bash (add to .bashrc)
starship init zsh # Initialize for Zsh (add to .zshrc)
starship init fish # Initialize for Fish
`Preset Themes
`bash
starship preset --list # List all presets
starship preset tokyo-night -o ~/.config/starship.toml # Apply Tokyo Night
starship preset nerd-font-symbols -o ~/.config/starship.toml # Nerd Font symbols
`Configuration Commands
`bash
starship config # View current config
starship config add_newline false # Disable leading newline
starship config character.style 'bold green' # Set character style
`Diagnostics
`bash
starship timings # Check module render times
starship explain # Explain prompt segments
starship bug-report # Generate bug report info
starship print-config # Show full resolved config
``
Install & Setup(10)
| Command | Level | ||
|---|---|---|---|
curl -sS https://starship.rs/install.sh | shInstall starship via official install script | Basic | curl -sS https://starship.rs/install.sh | sh | |
brew install starshipInstall starship via Homebrew (macOS) | Basic | brew install starship | |
scoop install starshipInstall starship via Scoop (Windows) | Basic | scoop install starship | |
starship init bashInitialize starship for Bash (add to .bashrc) | Basic | eval "$(starship init bash)" | |
starship init zshInitialize starship for Zsh (add to .zshrc) | Basic | eval "$(starship init zsh)" | |
starship init fishInitialize starship for Fish | Basic | starship init fish | source | |
starship init powershellInitialize starship for PowerShell | Basic | Invoke-Expression (&starship init powershell) | |
starship init elvishInitialize starship for Elvish | Intermediate | eval (starship init elvish) | |
STARSHIP_CONFIGEnvironment variable to set custom config path | Intermediate | export STARSHIP_CONFIG=~/.config/starship/custom.toml | |
STARSHIP_CACHEEnvironment variable to set custom cache directory | Intermediate | export STARSHIP_CACHE=~/.cache/starship-custom |
Configuration(6)
| Command | Level | ||
|---|---|---|---|
starship configView current starship configuration | Basic | starship config | |
starship config KEY VALUESet a config key-value (e.g. format, add_newline) | Basic | starship config add_newline false | |
~/.config/starship.tomlDefault starship config file path (TOML format) | Basic | vim ~/.config/starship.toml | |
starship config --helpShow starship config subcommand help | Basic | starship config --help | |
starship config paletteSet color palette | Intermediate | starship config palette catppuccin_mocha | |
starship config formatCustomize full prompt format | Expert | starship config format '$all'
# Or custom: starship config format '[$username](bold blue) at [$hostname](red) in [$directory](green) '
'$git_branch$character' |
Module Config(7)
| Command | Level | ||
|---|---|---|---|
starship config characterConfigure prompt character (e.g. use ➜) | Intermediate | starship config character.style 'bold green'
starship config character.success_symbol '[➜](bold green)' | |
starship config git_branchConfigure Git branch module | Intermediate | starship config git_branch.format '[$branch](bold purple)'
starship config git_branch.only_attached false | |
starship config nodejsConfigure Node.js version display | Intermediate | starship config nodejs.format 'via [⬢ $version](bold green)'
starship config nodejs.disabled false | |
starship config directoryConfigure directory display format | Intermediate | starship config directory.truncation_length 3
starship config directory.truncate_to_repo false | |
starship config pythonConfigure Python venv display | Intermediate | starship config python.format 'via [🐍 $version](bold yellow)'
starship config python.disabled false | |
starship config dockerConfigure Docker context display | Intermediate | starship config docker.format 'via [🐳 $context](bold blue)'
starship config docker.disabled false | |
starship config kubernetesConfigure Kubernetes context display | Intermediate | starship config kubernetes.format '[$context](bold purple) in [$namespace](bold cyan)'
starship config kubernetes.disabled false |
Prompt Customization(6)
| Command | Level | ||
|---|---|---|---|
starship presetList all available preset themes | Basic | starship preset --list | |
starship preset PRESET_NAME -o ~/.config/starship.tomlApply a preset theme to config file | Basic | starship preset nerd-font-symbols -o ~/.config/starship.toml | |
starship preset bracketed-segmentsApply bracketed-segments preset | Basic | starship preset bracketed-segments -o ~/.config/starship.toml | |
starship preset pastel-powerlineApply pastel-powerline preset | Basic | starship preset pastel-powerline -o ~/.config/starship.toml | |
starship preset tokyo-nightApply Tokyo Night preset | Basic | starship preset tokyo-night -o ~/.config/starship.toml | |
starship toggleToggle module visibility in prompt | Intermediate | starship toggle rust |
Advanced(9)
| Command | Level | ||
|---|---|---|---|
starship sessionGenerate shell init code for session | advanced | starship session --help | |
starship timingsAnalyze module rendering time (perf diagnosis) | Intermediate | starship timings | |
starship explainExplain what each segment of the current prompt means | Intermediate | starship explain | |
starship bug-reportGenerate info needed for a bug report | Basic | starship bug-report | |
starship tomlConvert config file to standard TOML format | advanced | starship toml < ~/.config/starship.toml | |
starship --versionShow starship version | Basic | starship --version | |
starship completionsGenerate shell completion script | advanced | starship completions bash > /usr/share/bash-completion/completions/starship | |
starship moduleRender a single module (for debugging) | Expert | starship module git_branch | |
starship print-configPrint the full resolved configuration | Intermediate | starship print-config |
FAQ
This cheatsheet is compiled from official tool documentation. Last updated: 2026-07-20.