Starship guide: install, shell setup, starship.toml and presets
Starship is the most widely used cross-shell prompt. It is written in Rust, released under the ISC license, and works in more than ten shells with one config file. That last point is why many developers adopt it: if you switch between zsh on a Mac, bash on servers and PowerShell on Windows, the prompt looks and behaves the same everywhere.
Version 1.27.0 shipped on October 17, 2026. It added a set of modules for the Jujutsu version control system, a model and effort display for Claude, right-prompt support in bash through Flyline, and fixes for two security advisories, one of which stopped Starship from running sensitive git commands in untrusted folders.
Installing Starship
| Method | Command |
|---|---|
| Install script (macOS, Linux) | curl -sS https://starship.rs/install.sh | sh |
| Homebrew | brew install starship |
| Windows | winget install starship |
| Other | Packages for most Linux distributions, Scoop, Chocolatey, cargo |
To update, rerun the install script or your package manager. Updating does not touch your config.
Fonts. Starship's default symbols use a Nerd Font, a programming font patched with extra icons. Install one, such as JetBrains Mono Nerd Font or FiraCode Nerd Font, and select it in your terminal. If you cannot change fonts, use the plain-text preset described below.
Adding it to your shell
Add the init line at the end of your shell's config file:
| Shell | File | Line |
|---|---|---|
| bash | ~/.bashrc | eval "$(starship init bash)" |
| zsh | ~/.zshrc | eval "$(starship init zsh)" |
| fish | ~/.config/fish/config.fish | starship init fish | source |
| PowerShell | $PROFILE | Invoke-Expression (&starship init powershell) |
| Nushell | autoload folder | starship init nu | save -f ($nu.data-dir | path join "vendor/autoload/starship.nu") |
Elvish, Ion, Tcsh, Xonsh and Cmd (through Clink) are also supported. Open a new shell to see the prompt.
Configuring starship.toml
Starship works with no config. To customize it, create ~/.config/starship.toml:
"$schema" = 'https://starship.rs/config-schema.json'
add_newline = true
command_timeout = 800
[character]
success_symbol = '[➜](bold green)'
error_symbol = '[➜](bold red)'
[directory]
truncation_length = 3
truncate_to_repo = true
[git_status]
disabled = false
[cmd_duration]
min_time = 2000
[package]
disabled = true
The $schema line gives you autocompletion and validation in editors such as VS Code. Set STARSHIP_CONFIG to use a config file somewhere else, for example one per machine in a dotfiles repository.
Modules
A module shows one piece of context. Starship ships with more than 90, and the default format includes all of them in a set order, each appearing only when relevant. Common ones:
| Module | Shows |
|---|---|
directory | Current folder, shortened |
git_branch, git_status | Branch, and counts of changed, staged and untracked files |
nodejs, python, rust, golang and others | Language version, when the folder contains that kind of project |
aws, gcloud, azure, kubernetes | Active cloud profile or cluster context |
docker_context | Active Docker context |
cmd_duration | How long the last command took |
status | Exit code of the last command |
jobs | Background jobs |
time | Current time, off by default |
custom | Your own module, from any shell command |
To change the order or drop modules, set the top-level format. Use $all to keep the default and move specific modules: format = '$all$directory$character' puts the folder on the line with the cursor.
Presets
Presets are full configurations you can apply with one command:
starship preset nerd-font-symbols -o ~/.config/starship.toml
Useful starting points include plain-text-symbols for terminals without Nerd Fonts, no-runtime-versions for a shorter prompt, bracketed-segments, and full themes such as tokyo-night, gruvbox-rainbow and pastel-powerline. Run starship preset --list to see them all.
Keeping it fast
Starship runs modules in parallel, but a module that calls an external program, such as node --version, waits for that program. To find slow modules:
starship timings
Then disable the slow ones, or raise command_timeout if a module times out and disappears. In very large git repositories, the git_status module can take time. Set ignore_submodules = true in its section, or turn the module off if you check status yourself.
Moving from Oh My Zsh or Powerlevel10k
Many people arrive at Starship from a zsh framework. A clean switch takes a few minutes:
- Comment out the theme line in
~/.zshrc, such asZSH_THEME="powerlevel10k/powerlevel10k", and remove the Powerlevel10k instant prompt block at the top of the file. - Keep Oh My Zsh plugins you rely on, such as git aliases. Starship only replaces the prompt and works alongside them.
- Add
eval "$(starship init zsh)"as the last line of~/.zshrc. - Open a new terminal. If two prompts appear, an old theme is still loading.
- Apply a preset close to your old look, such as
pastel-powerlineortokyo-nightfor a powerline style, then adjust.
If startup time was your reason to leave Oh My Zsh, measure it before and after with time zsh -i -c exit. The framework's plugins often cost more time than the prompt.
Writing a custom module
A custom module runs any shell command and shows its output. For example, to show the current Terraform workspace only in folders that contain .tf files:
[custom.tfws]
command = "terraform workspace show"
detect_extensions = ["tf"]
symbol = "TF "
style = "bold purple"
detect_files, detect_folders and when control when the module runs. Keep custom commands fast, because they run every time the prompt draws.
Starship and AI agents
When you work with coding agents, the prompt is a quick check on state that agents change: which branch you are on after an agent created one, whether the working tree has uncommitted changes, and which runtime versions are active. The cmd_duration module shows how long a long agent command ran. Version 1.27 added an effort variable to the Claude model module, which displays the model setting for Claude Code sessions.
Limits
Needs a Nerd Font for default icons. Without one, you see boxes or question marks until you switch to the plain-text preset.
Security of prompts in untrusted folders. Any prompt that inspects a folder runs some commands there. Version 1.27 fixed an advisory about git commands in untrusted environments, so keep Starship updated.
Not a shell. Starship changes only the prompt. For autosuggestions and syntax highlighting, use a shell such as fish or zsh plugins.
Starship compared with other prompts
| Prompt | Shells | Config | Notes |
|---|---|---|---|
| Starship | 10+ shells | TOML | Fast, one config everywhere |
| Powerlevel10k | zsh only | Wizard and zsh file | Very fast on zsh, project in limited maintenance |
| Oh My Posh | Most shells | JSON, YAML or TOML | Many themes, popular on Windows |
| Pure | zsh | zsh variables | Minimal, asynchronous |
Choose Starship if you use more than one shell or want one prompt config in your dotfiles. Pair it with fish for autosuggestions and fzf for fuzzy history search. See the terminal tools guide for more.
Frequently asked questions
What does Starship do?
Starship replaces your shell's prompt with one that shows context about where you are. It detects what is in the current folder and shows matching modules: the git branch and changes, the language versions a project uses, the active Kubernetes context or AWS profile, a Python virtual environment, the exit status and how long the last command ran. Modules that do not apply stay hidden, so the prompt stays short.
How do I install Starship?
Run curl -sS https://starship.rs/install.sh | sh, or use brew install starship on macOS and Linux or winget install starship on Windows. Then add the init line for your shell, such as eval "$(starship init zsh)" at the end of ~/.zshrc or starship init fish | source at the end of ~/.config/fish/config.fish. Install a Nerd Font and select it in your terminal so the icons display.
How do I configure Starship?
Create ~/.config/starship.toml. Each module has its own section, such as [git_branch] or [nodejs], where you can change its symbol, style and format, or turn it off with disabled = true. The top-level format setting controls which modules appear and in what order. Add "$schema" = 'https://starship.rs/config-schema.json' at the top for autocompletion in editors that support JSON schemas.
What are Starship presets?
Presets are ready-made configurations you can apply with one command, such as starship preset nerd-font-symbols -o ~/.config/starship.toml. Options include plain-text symbols for terminals without Nerd Fonts, a bracketed style, a no-runtime-versions preset for a shorter prompt, and several full themes. Use one as a starting point and edit it.
Is Starship slow?
Usually not. Starship is a compiled Rust program and runs modules in parallel. Slowness tends to come from a few modules that call external commands, such as checking a language version in a large repository. Run starship timings to see which modules take longest, then disable them or raise command_timeout. Large git repositories can also slow the git_status module.