Skip to main content

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)

CommandLevel
curl -sS https://starship.rs/install.sh | sh
Install starship via official install script
Basic
brew install starship
Install starship via Homebrew (macOS)
Basic
scoop install starship
Install starship via Scoop (Windows)
Basic
starship init bash
Initialize starship for Bash (add to .bashrc)
Basic
starship init zsh
Initialize starship for Zsh (add to .zshrc)
Basic
starship init fish
Initialize starship for Fish
Basic
starship init powershell
Initialize starship for PowerShell
Basic
starship init elvish
Initialize starship for Elvish
Intermediate
STARSHIP_CONFIG
Environment variable to set custom config path
Intermediate
STARSHIP_CACHE
Environment variable to set custom cache directory
Intermediate

Configuration(6)

CommandLevel
starship config
View current starship configuration
Basic
starship config KEY VALUE
Set a config key-value (e.g. format, add_newline)
Basic
~/.config/starship.toml
Default starship config file path (TOML format)
Basic
starship config --help
Show starship config subcommand help
Basic
starship config palette
Set color palette
Intermediate
starship config format
Customize full prompt format
Expert

Module Config(7)

CommandLevel
starship config character
Configure prompt character (e.g. use ➜)
Intermediate
starship config git_branch
Configure Git branch module
Intermediate
starship config nodejs
Configure Node.js version display
Intermediate
starship config directory
Configure directory display format
Intermediate
starship config python
Configure Python venv display
Intermediate
starship config docker
Configure Docker context display
Intermediate
starship config kubernetes
Configure Kubernetes context display
Intermediate

Prompt Customization(6)

CommandLevel
starship preset
List all available preset themes
Basic
starship preset PRESET_NAME -o ~/.config/starship.toml
Apply a preset theme to config file
Basic
starship preset bracketed-segments
Apply bracketed-segments preset
Basic
starship preset pastel-powerline
Apply pastel-powerline preset
Basic
starship preset tokyo-night
Apply Tokyo Night preset
Basic
starship toggle
Toggle module visibility in prompt
Intermediate

Advanced(9)

CommandLevel
starship session
Generate shell init code for session
advanced
starship timings
Analyze module rendering time (perf diagnosis)
Intermediate
starship explain
Explain what each segment of the current prompt means
Intermediate
starship bug-report
Generate info needed for a bug report
Basic
starship toml
Convert config file to standard TOML format
advanced
starship --version
Show starship version
Basic
starship completions
Generate shell completion script
advanced
starship module
Render a single module (for debugging)
Expert
starship print-config
Print the full resolved configuration
Intermediate

FAQ

This cheatsheet is compiled from official tool documentation. Last updated: 2026-07-20.