Install
openclaw skills install @mina-atef-00/starship-promptExpert knowledge of Starship cross-shell prompt — installation, CLI, TOML config, all modules, style strings, presets, advanced features including transient prompts, custom modules, palettes, right prompt, and Fish shell integration.
openclaw skills install @mina-atef-00/starship-promptStarship is the minimal, blazing-fast, infinitely customizable prompt for any shell. Written in Rust. Installed at /usr/sbin/starship v1.24.2 on this system.
This skill covers the entire Starship surface: CLI, configuration, all ~70 modules, advanced features, presets, Fish-specific integration, and debugging.
# Via Copr (recommended for Fedora)
dnf copr enable atim/starship
dnf install starship
# Via curl install script
curl -sS https://starship.rs/install.sh | sh
# Via cargo
cargo install starship --locked
# Via Linuxbrew
brew install starship
Add this to the end of ~/.config/fish/config.fish:
starship init fish | source
Verify with: starship --version (expected: starship 1.24.2)
starship <COMMAND>
Commands:
bug-report Create a pre-populated GitHub issue with config info
completions Generate shell completions for your shell to stdout
config Edit the starship configuration
explain Explains the currently showing modules
init Prints the shell function used to execute starship
module Prints a specific prompt module (e.g. `starship module rust`)
preset Prints a preset config to stdout or file
print-config Prints the computed starship configuration
prompt Prints the full starship prompt
session Generate random session key
timings Prints timings of all active modules (debugging)
toggle Toggle a given starship module on/off
help Print this message or the help of the given subcommand(s)
Key flags for starship prompt: --status, --jobs, --cmd-duration, --keymap, --terminal-width, --logical-path, --path.
Default path: ~/.config/starship.toml
Override via environment variable: STARSHIP_CONFIG
"$schema" = 'https://starship.rs/config-schema.json'
| Option | Default | Description |
|---|---|---|
format | '$all' | Prompt format string |
right_format | '' | Right-aligned prompt content |
scan_timeout | 30 | File-scan timeout (ms) |
command_timeout | 500 | Command-execution timeout (ms) |
add_newline | true | Blank line between prompts |
palette | '' | Active color palette name |
palettes | {} | Collection of color palettes |
follow_symlinks | true | Follow symlinks for directory checks |
continuation_prompt | '[∙](bright-black) ' | Prompt for incomplete input |
$variable_name (letters, numbers, _)[content](style) — styles the content(@$region) — only shows if $region is non-empty$all — expands to all enabled modules (in default order)Space-separated tokens: bold, italic, underline, dimmed, inverted, blink, hidden, strikethrough, fg:<color>, bg:<color>, <color>, none
Color specifiers:
black, red, green, blue, yellow, purple, cyan, whitebright- prefix (e.g. bright-red)#RRGGBB0–255prev_fg, prev_bg| Module | Key Config | Default Triggers |
|---|---|---|
git_branch | truncation_length, ignore_branches, only_attached | Git repo |
git_commit | commit_hash_length, tag_disabled, only_detached | Detached HEAD |
git_state | rebase, merge, revert, bisect labels | Rebase/merge/etc. in progress |
git_status | conflicted, ahead, behind, staged, deleted | Git repo |
git_metrics | added_style, deleted_style | Git repo |
hg_branch | — | Mercurial repo |
fossil_branch | truncation_length | Fossil checkout |
pijul_channel | — | Pijul repo |
All share this pattern:
[<module>]
format = 'via [$symbol($version )]($style)'
version_format = 'v${raw}'
symbol = '...'
style = '<style>'
detect_extensions = [...]
detect_files = [...]
detect_folders = [...]
disabled = false
Modules include: bun, c, cmake, cobol, cpp, daml, dart, deno, dotnet, elixir, elm, erlang, fennel, fortran, gleam, golang, gradle, haskell, haxe, helm, java, julia, kotlin, lua, maven, mojo, nim, nodejs, ocaml, odin, opa, perl, php, pulumi, purescript, python, quarto, raku, rlang, red, ruby, rust, scala, solidity, swift, terraform, typst, vlang, vagrant, xmake, zig, buf, crystal, meson
| Module | Default | Notes |
|---|---|---|
aws | bold yellow | Region + profile + expiration timer |
gcloud | bold blue | Active GCP config, account, region |
azure | Disabled | Azure subscription name |
openstack | — | Cloud config |
docker_context | — | Active Docker context |
kubernetes | — | K8s context/namespace |
nats | — | NATS context |
singularity | — | Singularity container |
| Module | Description |
|---|---|
username | Shows when not default user, ssh, or container |
hostname | SSH-visible hostname |
shlvl | Shell nesting level |
localip | IPv4 of primary network interface |
memory_usage | RAM usage |
battery | Only below 10% by default |
sudo | When sudo credentials are cached |
cmd_duration | Last command execution time |
jobs | Background job count |
status | Exit code of last command |
shell | Current shell name |
os | OS name (symbol) |
container | Container indicator |
netns | Network namespace |
| Module | Key Features |
|---|---|
directory | Truncation, git-root detection, fish_style_pwd_dir_length, substitutions, home_symbol |
direnv | direnv status indicator |
nix_shell | Nix shell indicator |
guix_shell | Guix shell indicator |
conda | Conda environment |
pixi | Pixi project environment |
spack | Spack environment |
| Module | Description |
|---|---|
env_var | Arbitrary env var display. Supports per-var: [env_var.SHELL] |
custom | Arbitrary command output. Supports per-command: [custom.mything] |
fill | Space-filler for alignment |
time | Date/time display (disabled by default) |
line_break | Line break between segments |
character | Input prompt symbol (❯) — changes color/style on error |
| Module | Description |
|---|---|
package | Current package version from package.json, Cargo.toml, etc. |
mise | mise (rtx) tool version manager |
Three dedicated modules for Claude Code statusline (via starship statusline claude-code):
claude_model — current model being usedclaude_context — context usage gauge + percentage with threshold stylingclaude_cost — session cost in USD with threshold stylingCustomize via [profiles]:
[profiles]
claude-code = "$claude_model$git_branch$claude_context$claude_cost"
# ~/.config/fish/config.fish
starship init fish | source
Replace previous prompt with a minimal one after command execution. Requires Fish 3.7+ (Fish 4.6+ on this system).
Critical ordering: enable_transience must come AFTER starship init fish | source:
# ~/.config/fish/config.fish
starship init fish | source
# ── Transient prompt ──
enable_transience
function starship_transient_prompt_func
# Collapse to just the ❯ character on success/error
starship module character
end
function starship_transient_rprompt_func
# Clear right prompt so no leftover time/memory shows
end
How it works: With enable_transience, Fish redraws the prompt after command execution. The starship_transient_prompt_func is called instead of the full Starship init, producing a minimal collapsed prompt. The starship_transient_rprompt_func similarly controls the right prompt (set it to empty to clear).
Important: Transient prompt only prints when the commandline is non-empty and syntactically correct.
Supported in Fish via right_format in starship.toml:
right_format = "$all"
The character module supports vim-mode symbols in Fish:
vimcmd_symbol (normal mode, ❮ green)vimcmd_replace_one_symbol (❮ purple)vimcmd_replace_symbol (❮ purple)vimcmd_visual_symbol (❮ yellow)Define arbitrary command outputs:
[custom.mything]
command = "echo hello"
when = "test -f .mything" # Boolean or shell command
shell = ['bash', '--noprofile'] # Optional shell override
require_repo = true # Only in git repos
detect_files = ['.mything']
detect_folders = ['mything']
detect_extensions = ['thing']
os = "linux" # OS filter
unsafe_no_escape = false # Escape shell sequences
ignore_timeout = false # Bypass global timeout
Reference ${custom.foo} in top-level format.
palette = "mytheme"
[palettes.mytheme]
blue = "21"
mustard = "#af8700"
green = "bright-green"
Palettes override color names used in style strings.
[directory.substitutions]
'/Volumes/network/path' = '/net'
'src/com/long/java/path' = 'mypath'
Regex substitutions also supported:
substitutions = [
{ from = "^/", to = "<root>/", regex = true },
{ from = "/", to = " | " },
]
function set_win_title
echo -ne "\033]0; (basename "$PWD") \007"
end
starship_precmd_user_func="set_win_title"
Apply presets with:
starship preset <preset-name> -o ~/.config/starship.toml
Available presets:
| Preset | Description |
|---|---|
nerd-font-symbols | Nerd Font icons for all modules |
no-nerd-font | Plain Unicode, no Nerd Font dependency |
bracketed-segments | Bracketed module segments instead of "via"/"on" |
plain-text | Plain text symbols (no Unicode) |
no-runtimes | Hides language runtime versions |
no-empty-icons | Hides icons when tool not found |
pure-preset | Emulates Pure prompt style |
pastel-powerline | Pastel powerline with path substitution example |
tokyo-night | Tokyo Night VS Code theme inspired |
gruvbox-rainbow | Gruvbox rainbow theme |
jetpack | Pseudo-minimalist inspired by geometry/spaceship |
catppuccin-powerline | Catppuccin theme variant of Gruvbox Rainbow |
# Set log level
STARSHIP_LOG=trace starship module rust # Debug a single module
STARSHIP_LOG=trace starship timings # Find slow modules
STARSHIP_LOG=error starship prompt # Suppress non-critical warnings
Logs written to ~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log. Override with STARSHIP_CACHE.
starship explain # Explain each visible module in current prompt
starship timings # Show execution time of each module (>1ms)
starship print-config # Print full resolved config
starship bug-report # Generate pre-populated GitHub issue
locale, LANG=en_US.UTF-8)command_timeout = 500 in config, or set ignore_timeout = true on custom modulesstarship timings to identify slow modulesdisabled = false, verify detection conditions matchDO NOT use [format] / [right_format] section headers. These are top-level string variables, not TOML tables. Write them unpackaged:
# ✅ Correct
format = """
[┌─](bold bright-white)$directory
│ $python
[└─](bold bright-white) ❯
"""
# ❌ Wrong — "invalid type: map, expected a string"
[format]
format = """..."""
format / right_format are raw strings, not Starship format strings wrapped in TOML tables. They go at the top level, period.
TOML multiline basic strings ("""...""") — Real newlines inside are preserved, and Starship treats them the same as $newline. So you can use literal newlines directly:
format = """
Line 1
Line 2
"""
This produces a two-line prompt with a blank line between them. Starship collapses consecutive newlines the same way $newline does.
\\ at end of line in TOML multiline strings is a line continuation — it strips the real newline, concatenating the next line as if it's the same line. Use this when you want to write a very long format string across multiple source lines:
format = """\
$directory$git_branch\
$fill$time\
$newline\
$character\
"""
# Actual string value: "$directory$git_branch$fill$time$newline$character"
[fill] dots: By default, $fill in the format expands to . characters. Set symbol = " " under [fill] to make it invisible (spaces instead of dots).
up_to_date in [git_status]: The key is up_to_date (with underscores), not uptodate. Using uptodate produces a warning: "Unknown key".
Character module with literal ❯: If you hardcode ❯ or ❮ in the format string instead of using $character, disable the character module explicitly to avoid redundant rendering:
[character]
format = ''
success_symbol = ''
error_symbol = ''
starship module character still works even when the character module is disabled — it internally handles exit code detection and returns success_symbol or error_symbol. Use it in transient prompt functions even with a disabled character module.
Time zone duplicates: Having $time in both format and right_format causes it to render twice. Keep it only where you want it — typically right_format for right-edge alignment.
Runtime detection: Modules like python, nodejs, bun trigger on detect_files, detect_extensions, or detect_folders. They run shell commands (e.g., python --version) only when their trigger conditions match. This keeps the prompt fast — scanning the filesystem for triggers is cheaper than running version commands on every prompt.
| Variable | Purpose |
|---|---|
STARSHIP_CONFIG | Override config file path |
STARSHIP_CACHE | Override cache directory |
STARSHIP_LOG | Log level: trace, debug, info, warn, error |
STARSHIP_SESSION_KEY | Session identifier for logs |
STARSHIP_SHELL | Shell override used by custom modules |
A complete, production-tested config designed for Fish with enable_transience on Fedora Atomic (Catppuccin Mocha terminal, JetBrainsMono Nerd Font). Demonstrates multi-line box-drawing layout, right-aligned time, runtime detection, and proper Fish transient wiring.
"$schema" = 'https://starship.rs/config-schema.json'
format = """
[┌─](bold bright-white)$directory$git_branch$git_status$fill$time
│ $python$nodejs$bun$cmd_duration
[└─](bold bright-white) ❯
"""
[fill]
symbol = " "
[directory]
truncation_length = 3
truncation_symbol = '…/'
fish_style_pwd_dir_length = 1
style = 'bold cyan'
home_symbol = '~'
format = '[$path]($style)'
read_only = ' '
[git_branch]
format = '[$symbol$branch]($style)'
style = 'bold purple'
symbol = ' '
truncation_length = 20
truncation_symbol = '…'
[git_status]
format = '[$all_status$ahead_behind]($style)'
style = 'bold yellow'
conflicted = '🏳'
up_to_date = ''
ahead = '⇡${count}'
behind = '⇣${count}'
diverged = '⇕${ahead_count}⇣${behind_count}'
staged = '●${count}'
modified = '✎${count}'
deleted = '✗${count}'
renamed = '➜${count}'
stashed = '≡ '
untracked = '?${count}'
ignore_submodules = false
[time]
format = '[$time]($style)'
style = 'bright-black'
time_format = '%l:%M %p'
disabled = false
[nodejs]
format = 'via [$symbol$version]($style) '
style = 'bold green'
symbol = ' '
detect_extensions = ['js', 'ts', 'mjs', 'cjs', 'jsx', 'tsx', 'vue']
detect_files = ['package.json', '.node-version', 'bun.lock']
detect_folders = ['node_modules']
[python]
format = 'via [$symbol$version]($style) '
style = 'bold yellow'
symbol = ' '
detect_extensions = ['py', 'pyw']
detect_files = ['requirements.txt', 'pyproject.toml', 'Pipfile', 'poetry.lock']
detect_folders = ['.venv', 'venv', 'env', '.env']
[bun]
format = 'via [$symbol$version]($style) '
style = 'bold red'
symbol = '🥟 '
detect_files = ['bun.lock', 'bun.lockb', 'bunfig.toml']
[cmd_duration]
format = ' took [$duration]($style)'
style = 'bold yellow'
min_time = 2_000
show_milliseconds = false
[character]
success_symbol = '[❯](bold green)'
error_symbol = '[❯](bold red)'
# Disable unused modules
[package]
disabled = true
[shell]
disabled = true
[line_break]
disabled = true
[golang]
disabled = true
[rust]
disabled = true
[dart]
disabled = true
[elixir]
disabled = true
[helm]
disabled = true
[terraform]
disabled = true
starship init fish | source
# ── Transient prompt ──
enable_transience
function starship_transient_prompt_func
# Pass $argv so --status is forwarded for red ❯ on errors
starship module character $argv
end
function starship_transient_rprompt_func
# Clear right prompt on transient (no leftover time/memory)
end
┌─ ~/src/my-project main ●1 ⇡2 1:15 AM
│ via v3.14.5 took 3s
└─ ❯
After command execution (transient): ❯
starship explain # Explain each visible module
starship timings # Ensure all modules <5ms
starship print-config # Verify resolved config