This is the reference configuration file of the starship prompt
-
Install Latest Version With Shell:
curl -sS https://starship.rs/install.sh | sh
Or with Homebrew:
brew install starship
Or with Winget:
winget install starship
Or with Chocolatey:
choco install starship
-
Add the following line to your shell configuration file:
Bash - Add the following to the end of ~/.bashrc:
# ~/.bashrc eval "$(starship init bash)"
Zsh - Add the following to the end of ~/.zshrc:
# ~/.zshrc eval "$(starship init zsh)"
Powershell - Add the following to the end of Microsoft.PowerShell_profile.ps1. You can check the location of this file by querying the $PROFILE variable in PowerShell. Typically the path is ~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1 or ~/.config/powershell/Microsoft.PowerShell_profile.ps1 on -Nix.
Invoke-Expression (&starship init powershell)
Important
for most up-to-date details, please refer to the starship documentation
Important
After installing, you can customize the prompt by creating a configuration file at ~/.config/starship.toml
. The default my configuration file is available in this repository as starship.toml
.
mkdir -p ~/.config && touch ~/.config/starship.toml
Tip
In Windows, the configuration file is typically located >at C:\Users\<YourUsername>\.config\starship.toml
If you don't have starship.toml
file, you can create it manually or copy the default configuration file from this repository.
Tip
Or You can get preset configuration files from the starship presets.