Install command
Not provided
Starship-inspired powerline statusline with Nerd Font glyphs, modular segments, and Git integration for Claude Code
Open the source and read safety notes before installing.
Source-backed facts for citing this resource, derived directly from the registry — also available as plain text for AI assistants.
Decision playbook
Signals are present but mixed. Use the checklist below to confirm the source and operational safety for your environment.
0
78
—
No baseline selected
No major trust-signal divergence detected in the current selection.
Confirm ownership and provenance before trusting install instructions.
Source link availableRequired
Open the canonical repository and verify ownership.
Source provenance statusRequired
Marked as source-backed.
Metadata reviewed
Registry metadata indicates a reviewed listing.
Validate risk disclosures before installation or API wiring.
Safety notes presentRequired
Review the listed safety guidance before running commands.
Privacy notes presentRequired
Review data handling notes before connecting accounts or secrets.
Trust level risk gateRequired
Trust level does not block evaluation.
Check package metadata and artifact integrity signals.
Install payload available
Install or copy payload is available for review.
Package verification flag
No package verification flag provided.
Checksum metadata
No checksum provided for downloaded artifact.
Use compare context to validate trade-offs before adoption.
Compare tray has multiple entries
Add at least one more entry to compare trust differences.
Baseline comparison available
No baseline peer selected yet.
Diverging trust signals identified
No major trust-signal divergence found.
Setup at a glance
Copy-ready — paste the snippet to get started.
Install command
Not provided
Config snippet
Provided
Copy snippet
Provided
Prerequisites
6 to clear
Platforms
1 listed
Difficulty
2/100
Adoption plan
Current risk score 16/100. Use staged verification before broader rollout.
Validate source and review signals before any execution.
Confirm source provenanceRequired
Source URL/provenance metadata is present.
Confirm metadata review state
Listing has review metadata.
Verify install payload
Install/config payload exists and can be inspected.
Confirm safety, privacy, and package integrity signals.
Review safety notesRequired
Safety notes are present.
Review privacy notesRequired
Privacy notes are present.
Verify package integrity metadata
No package verification/checksum metadata.
Adopt in controlled steps based on the selected plan.
Run in isolated sandbox firstRequired
Use a constrained sandbox and observe behavior across multiple tasks.
Roll out graduallyRequired
Roll out to a small cohort before wider usage.
Set monitoring and fallback
Define rollback path and monitor errors after adoption.
Evidence readiness
Required evidence gates are covered (5/6 signals complete).
Source repository/provenance is listed.
Required in this preset
Review metadata is present.
Required in this preset
Safety notes are present.
Required in this preset
Privacy notes are present.
Optional in this preset
Package integrity metadata is missing.
Optional in this preset
Install payload is available.
Required in this preset
Required evidence gates are covered for this preset.
Decision timeline
5/6 steps complete with no blocking gaps for this preset.
triage
Source/provenance metadata is available.
triage
Review metadata is available.
verify
Safety notes are available.
verify
Privacy notes are available.
verify
Package integrity metadata is missing.
rollout
Install payload is available.
No required blockers for this timeline preset.
Prerequisite readiness
6 prerequisites to line up before setup.
Safety & privacy surface
1 safety and 1 privacy notes across 1 risk area. Review closely: credentials & tokens.
#!/usr/bin/env bash
# Starship-Inspired Powerline Theme
# Requires Nerd Font
read -r input
# Extract data
model=$(echo "$input" | jq -r '.model // "unknown"' | sed 's/claude-//' | sed 's/sonnet/snnt/' | sed 's/-4-5//')
tokens=$(echo "$input" | jq -r '.session.totalTokens // 0')
workdir=$(echo "$input" | jq -r '.workspace.path // "."')
# Git info
cd "$workdir" 2>/dev/null
if git rev-parse --git-dir > /dev/null 2>&1; then
branch=$(git symbolic-ref --short HEAD 2>/dev/null || echo "detached")
if [ -z "$(git status --porcelain)" ]; then
git_icon=""
git_color="\033[32m"
else
git_icon=""
git_color="\033[33m"
fi
git_segment="${git_color} ${branch} ${git_icon}\033[0m"
fi
# Model segment
model_segment="\033[36m ${model}\033[0m"
# Token segment with icon
token_k=$((tokens / 1000))
token_segment="\033[35m ${token_k}k\033[0m"
# Build powerline
echo -e "${model_segment} ${token_segment}${git_segment}"{
"statusLine": {
"type": "command",
"command": "$CLAUDE_PROJECT_DIR/.claude/statuslines/starship-powerline-theme.sh",
"refreshInterval": 1000
}
}{
"statusLine": {
"type": "command",
"command": "$CLAUDE_PROJECT_DIR/.claude/statuslines/starship-powerline-theme.sh",
"refreshInterval": 1000
}
}
Extended version showing cost alongside tokens and git status
#!/usr/bin/env bash
# Enhanced Starship Powerline with Cost Display
read -r input
model=$(echo "$input" | jq -r '.model.id // .model.display_name // "unknown"' | sed 's/claude-//' | sed 's/sonnet/snnt/' | sed 's/-4-5//' | sed 's/-4//' | sed 's/opus/ops/' | sed 's/haiku/hk/')
tokens=$(echo "$input" | jq -r '.cost.total_lines_added // .session.totalTokens // 0')
cost=$(echo "$input" | jq -r '.cost.total_cost_usd // .session.estimatedCost // 0')
workdir=$(echo "$input" | jq -r '.workspace.current_dir // .workspace.project_dir // .cwd // "."')
# Git info
if [ -n "$workdir" ] && [ "$workdir" != "." ]; then
cd "$workdir" 2>/dev/null || cd .
else
cd . 2>/dev/null || true
fi
if git rev-parse --git-dir > /dev/null 2>&1; then
branch=$(git symbolic-ref --short HEAD 2>/dev/null || echo "detached")
if [ -z "$(git status --porcelain 2>/dev/null)" ]; then
git_icon=""
git_color="\033[32m"
else
git_icon=""
git_color="\033[33m"
fi
git_segment="${git_color} ${branch} ${git_icon}\033[0m"
else
git_segment=""
fi
# Model segment
model_segment="\033[36m ${model}\033[0m"
# Token segment
if [ $tokens -gt 0 ]; then
token_k=$((tokens / 1000))
if [ $token_k -eq 0 ]; then
token_k=1
fi
token_segment="\033[35m ${token_k}k\033[0m"
else
token_segment="\033[35m 0k\033[0m"
fi
# Cost segment (yellow)
if command -v awk > /dev/null 2>&1; then
cost_formatted=$(awk "BEGIN {printf \"%.3f\", $cost}" 2>/dev/null || echo "0.000")
else
cost_formatted="0.000"
fi
cost_segment="\033[33m \$${cost_formatted}\033[0m"
RESET="\033[0m"
# Build powerline: model | tokens | cost | git
if [ -n "$git_segment" ]; then
echo -e "${model_segment} ${token_segment} ${cost_segment}${git_segment}${RESET}"
else
echo -e "${model_segment} ${token_segment} ${cost_segment}${RESET}"
fi
Version with configurable model name abbreviations via environment variables
#!/usr/bin/env bash
# Starship Powerline with Custom Model Abbreviations
read -r input
# Custom model abbreviations via environment variables (defaults to standard)
SONNET_ABBR=${STARSHIP_SONNET_ABBR:-snnt}
OPUS_ABBR=${STARSHIP_OPUS_ABBR:-ops}
HAIKU_ABBR=${STARSHIP_HAIKU_ABBR:-hk}
GPT4_ABBR=${STARSHIP_GPT4_ABBR:-gpt4}
GEMINI_ABBR=${STARSHIP_GEMINI_ABBR:-gem}
# Extract model
model=$(echo "$input" | jq -r '.model.id // .model.display_name // "unknown"' | sed 's/claude-//')
# Apply custom abbreviations
if [[ "$model" == *"sonnet"* ]]; then
model=$(echo "$model" | sed "s/sonnet/$SONNET_ABBR/" | sed 's/-4-5//' | sed 's/-4//')
elif [[ "$model" == *"opus"* ]]; then
model=$(echo "$model" | sed "s/opus/$OPUS_ABBR/")
elif [[ "$model" == *"haiku"* ]]; then
model=$(echo "$model" | sed "s/haiku/$HAIKU_ABBR/")
elif [[ "$model" == *"gpt-4"* ]] || [[ "$model" == *"gpt4"* ]]; then
model=$GPT4_ABBR
elif [[ "$model" == *"gemini"* ]]; then
model=$GEMINI_ABBR
fi
tokens=$(echo "$input" | jq -r '.cost.total_lines_added // .session.totalTokens // 0')
workdir=$(echo "$input" | jq -r '.workspace.current_dir // .workspace.project_dir // .cwd // "."')
# Git info
if [ -n "$workdir" ] && [ "$workdir" != "." ]; then
cd "$workdir" 2>/dev/null || cd .
else
cd . 2>/dev/null || true
fi
if git rev-parse --git-dir > /dev/null 2>&1; then
branch=$(git symbolic-ref --short HEAD 2>/dev/null || echo "detached")
if [ -z "$(git status --porcelain 2>/dev/null)" ]; then
git_icon=""
git_color="\033[32m"
else
git_icon=""
git_color="\033[33m"
fi
git_segment="${git_color} ${branch} ${git_icon}\033[0m"
else
git_segment=""
fi
# Model segment
model_segment="\033[36m ${model}\033[0m"
# Token segment
if [ $tokens -gt 0 ]; then
token_k=$((tokens / 1000))
if [ $token_k -eq 0 ]; then
token_k=1
fi
token_segment="\033[35m ${token_k}k\033[0m"
else
token_segment="\033[35m 0k\033[0m"
fi
RESET="\033[0m"
# Build powerline
if [ -n "$git_segment" ]; then
echo -e "${model_segment} ${token_segment}${git_segment}${RESET}"
else
echo -e "${model_segment} ${token_segment}${RESET}"
fi
Complete setup script with Nerd Font verification and Git command testing
#!/bin/bash
# Installation script for Starship Powerline Theme
# Check for jq (required for JSON parsing)
if ! command -v jq &> /dev/null; then
echo "Installing jq for JSON parsing..."
if [[ "$OSTYPE" == "darwin"* ]]; then
brew install jq
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
sudo apt-get install -y jq || sudo yum install -y jq
else
echo "Please install jq manually: https://stedolan.github.io/jq/"
fi
fi
# Check for Git (optional, for git segment)
if ! command -v git &> /dev/null; then
echo "Warning: Git command not found - git segment will not display"
echo "Install Git: macOS (brew install git), Linux (sudo apt-get install git or sudo yum install git)"
else
echo "Git command available: $(git --version 2>/dev/null || echo 'version unknown')"
fi
# Test Git commands
if command -v git &> /dev/null; then
if git rev-parse --git-dir &> /dev/null 2>&1; then
echo "Git repository detected: $(git symbolic-ref --short HEAD 2>/dev/null || echo 'detached HEAD')"
else
echo "Not in a git repository (git segment will be empty)"
fi
if git status --porcelain &> /dev/null 2>&1; then
echo "Git status command working"
else
echo "Warning: Git status command test failed"
fi
fi
# Test Nerd Font glyphs
if echo -e ' ' &> /dev/null; then
echo "Nerd Font glyphs supported: (branch icons)"
else
echo "Warning: Nerd Font glyphs may not display correctly"
echo "Install Nerd Font: https://www.nerdfonts.com/"
echo "Recommended fonts: FiraCode Nerd Font, MesloLGS NF, Hack Nerd Font"
echo "After installation, set terminal font and run: fc-cache -fv"
fi
# Test ANSI color codes
if echo -e '\033[36mCyan\033[0m' &> /dev/null; then
echo "ANSI color codes supported: \033[36mCyan\033[0m, \033[35mMagenta\033[0m, \033[32mGreen\033[0m, \033[33mYellow\033[0m"
else
echo "Warning: ANSI color codes may not display correctly"
fi
# Test model abbreviation
if echo 'claude-sonnet-4-5' | sed 's/claude-//' | sed 's/sonnet/snnt/' | sed 's/-4-5//' | grep -q 'snnt'; then
echo "Model abbreviation working: $(echo 'claude-sonnet-4-5' | sed 's/claude-//' | sed 's/sonnet/snnt/' | sed 's/-4-5//')"
else
echo "Warning: Model abbreviation test failed"
fi
# Test token formatting
if [ $((12345 / 1000)) -eq 12 ]; then
echo "Token formatting working: 12345 tokens = $((12345 / 1000))k"
else
echo "Warning: Token formatting test failed"
fi
# Create statuslines directory
mkdir -p .claude/statuslines
cat > .claude/statuslines/starship-powerline-theme.sh << 'SCRIPT_EOF'
#!/usr/bin/env bash
# Starship-Inspired Powerline Theme for Claude Code
# Requires Nerd Font for glyphs
read -r input
model=$(echo "$input" | jq -r '.model.id // .model.display_name // "unknown"' | sed 's/claude-//' | sed 's/sonnet/snnt/' | sed 's/-4-5//' | sed 's/-4//' | sed 's/opus/ops/' | sed 's/haiku/hk/')
tokens=$(echo "$input" | jq -r '.cost.total_lines_added // .session.totalTokens // 0')
workdir=$(echo "$input" | jq -r '.workspace.current_dir // .workspace.project_dir // .cwd // "."')
if [ -n "$workdir" ] && [ "$workdir" != "." ]; then
cd "$workdir" 2>/dev/null || cd .
else
cd . 2>/dev/null || true
fi
if git rev-parse --git-dir > /dev/null 2>&1; then
branch=$(git symbolic-ref --short HEAD 2>/dev/null || echo "detached")
if [ -z "$(git status --porcelain 2>/dev/null)" ]; then
git_icon=""
git_color="\033[32m"
else
git_icon=""
git_color="\033[33m"
fi
git_segment="${git_color} ${branch} ${git_icon}\033[0m"
else
git_segment=""
fi
model_segment="\033[36m ${model}\033[0m"
if [ $tokens -gt 0 ]; then
token_k=$((tokens / 1000))
if [ $token_k -eq 0 ]; then
token_k=1
fi
token_segment="\033[35m ${token_k}k\033[0m"
else
token_segment="\033[35m 0k\033[0m"
fi
RESET="\033[0m"
if [ -n "$git_segment" ]; then
echo -e "${model_segment} ${token_segment}${git_segment}${RESET}"
else
echo -e "${model_segment} ${token_segment}${RESET}"
fi
SCRIPT_EOF
chmod +x .claude/statuslines/starship-powerline-theme.sh
# Add to settings.json
if [ ! -f .claude/settings.json ]; then
echo '{"statusLine":{"type":"command","command":"$CLAUDE_PROJECT_DIR/.claude/statuslines/starship-powerline-theme.sh","refreshInterval":1000}}' > .claude/settings.json
else
jq '.statusLine = {"type":"command","command":"$CLAUDE_PROJECT_DIR/.claude/statuslines/starship-powerline-theme.sh","refreshInterval":1000}' .claude/settings.json > .claude/settings.json.tmp
mv .claude/settings.json.tmp .claude/settings.json
fi
echo "Starship Powerline Theme installed successfully!"
echo "Note: Install Nerd Font for glyphs to display correctly"
echo "Recommended: FiraCode Nerd Font, MesloLGS NF, Hack Nerd Font"
echo "After font installation, set terminal font and run: fc-cache -fv"
echo "Test: echo -e ' ' (should display branch icons, not boxes)"
Install Nerd Font and configure terminal. Test: echo -e ' ' (should display branch icons, not boxes). Set font to 'FiraCode Nerd Font Mono' or 'MesloLGS NF'. Run fc-cache -fv to refresh font cache. Verify font installation: fc-list | grep -i nerd (should list Nerd Fonts). For VS Code: Add to settings.json: "terminal.integrated.fontFamily": "'FiraCode Nerd Font Mono'". Restart terminal after font change. If still showing boxes, terminal may not support Unicode - use no-nerd-font version.
You're in detached HEAD state (normal for commit checkouts). Run git branch -q to see state. Checkout branch: git checkout main or create: git checkout -b feature-name. Verify branch: git symbolic-ref --short HEAD (should return branch name, not 'detached'). Check git state: git rev-parse --git-dir (should return .git path). If in detached state, script shows 'detached' - this is expected behavior. To fix: Checkout a branch or create new branch from current commit.
Add to settings.json: "terminal.integrated.fontFamily": "'FiraCode Nerd Font Mono'". Restart VS Code. If issues persist, install: sudo apt install fonts-symbola (Linux) or use system font installer (macOS). Verify font in VS Code: Open terminal, check font settings. Alternative: Use no-nerd-font version if Nerd Fonts unavailable. Test glyphs: echo -e ' ' (should display icons, not boxes). Check VS Code terminal settings: File > Preferences > Settings > Terminal > Integrated > Font Family.
Increase refreshInterval if statusline lags git state. Use git status --porcelain for reliable scripting. Verify read access: test -r .git && echo OK. Check git command execution: git status --porcelain (should return empty or file list). Test git branch: git symbolic-ref --short HEAD (should return branch name). If statusline not updating, increase refreshInterval in settings.json: {"refreshInterval": 2000} (2 seconds). Verify git repository: git rev-parse --git-dir (should return .git path, not error).
Modify sed patterns to preserve model info. Script shortens 'claude-sonnet-4-5' to 'snnt'. Keep full name by removing: | sed 's/sonnet/snnt/' line. Customize abbreviations: Set environment variables STARSHIP_SONNET_ABBR, STARSHIP_OPUS_ABBR, etc. Test abbreviation: echo 'claude-sonnet-4-5' | sed 's/claude-//' | sed 's/sonnet/snnt/' | sed 's/-4-5//' (should return 'snnt'). Adjust sed patterns: Add more patterns to preserve version numbers or model details. Check current abbreviation: echo "$model" (should show abbreviated name).
Check token extraction: echo '$input' | jq '.cost.total_lines_added' (should return number). Try alternative: echo '$input' | jq '.session.totalTokens'. Verify calculation: token_k=$((tokens / 1000)) (should calculate thousands). Test with sample: tokens=12345; echo $((tokens / 1000)) (should return 12). Check if tokens is zero: echo $tokens (should be > 0). Verify JSON structure: echo '$input' | jq .cost (should show cost object with total_lines_added). If still 0k, JSON structure may have changed - update jq extraction path.
Verify terminal supports ANSI colors: echo -e '\033[36mCyan\033[0m' (should display cyan text). Check color codes: Model (\033[36m cyan), Tokens (\033[35m magenta), Git clean (\033[32m green), Git dirty (\033[33m yellow). Test colors: echo -e '\033[36mCyan \033[35mMagenta \033[32mGreen \033[33mYellow\033[0m'. Verify RESET code: echo -e '\033[0m' (should reset colors). If colors not working, terminal may only support 16 colors - modify color codes to use standard ANSI: \033[36m for cyan, \033[35m for magenta, etc. Check terminal color support: echo $TERM (should show terminal type).
Check workspace path: echo '$input' | jq '.workspace.current_dir' (should return valid path). Verify path exists: test -d "$workdir" && echo "Directory exists" || echo "Directory not found". Test cd with error handling: cd "$workdir" 2>/dev/null || cd . (should not error). Check permissions: test -r "$workdir" && echo "Readable" || echo "Not readable". If path is empty or invalid, script defaults to current directory (cd .). Verify workspace extraction: workdir=$(echo '$input' | jq -r '.workspace.current_dir // .workspace.project_dir // .cwd // "."'). Test with sample: cd /tmp 2>/dev/null && echo "Success" || echo "Failed".
Show that Starship Powerline Theme - Statuslines is listed on HeyClaude. Paste this Markdown into your README — it renders the badge and links back to this page.
[](https://heyclau.de/entry/statuslines/starship-powerline-theme)Starship Powerline Theme - Statuslines side by side with 3 alternatives on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.
| Field | Starship-inspired powerline statusline with Nerd Font glyphs, modular segments, and Git integration for Claude Code Open dossier | Soothing Catppuccin Mocha theme statusline with 26 pastel colors, Powerline separators, and modular segments for Git, model info, and token tracking. Open dossier | Git-focused statusline showing branch, dirty status, ahead/behind indicators, and stash count alongside Claude session info Open dossier | Clean, performance-optimized statusline with Powerline glyphs showing model, directory, and token count Open dossier |
|---|---|---|---|---|
| Next steps | ||||
| Trust | ||||
| Review status | ReviewedMaintainer reviewed | ReviewedMaintainer reviewed | ReviewedMaintainer reviewed | ReviewedMaintainer reviewed |
| Package trust | Package not verified | Package not verified | Package not verified | Package not verified |
| Source provenance | Source-backed | Source-backed | Source-backed | Source-backed |
| Submitter | — | — | — | — |
| Install risk | Review first | Review first | Review first | Review first |
| Notes | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ |
| Brand | — | — | — | — |
| Category | statuslines | statuslines | statuslines | statuslines |
| Source | source-backed | source-backed | source-backed | source-backed |
| Author | JSONbored | JSONbored | JSONbored | JSONbored |
| Added | 2025-10-16 | 2025-10-23 | 2025-10-01 | 2025-10-01 |
| Platforms | Claude Code | Claude Code | Claude Code | Claude Code |
| Source repo | — | — | — | — |
| Safety notes | ✓Runs as a Claude Code statusline command on every refresh and depends on the local shell environment; a failure only affects status rendering, not your session. | ✓Runs as a Claude Code statusline command on every refresh and depends on the local shell environment; a failure only affects status rendering, not your session. | ✓Runs as a Claude Code statusline command on every refresh and depends on the local shell environment; a failure only affects status rendering, not your session. | ✓Runs as a Claude Code statusline command on every refresh and depends on the local bash environment, jq, and a Powerline-patched font; a failure only affects status rendering, not your session. |
| Privacy notes | ✓Reads the Claude Code statusline JSON from stdin (model, workspace path, token usage) and renders it in the local terminal; it does not send data off-machine. | ✓Reads the Claude Code statusline JSON from stdin (model, workspace path, token usage) and renders it in the local terminal; it does not send data off-machine. | ✓Reads the Claude Code statusline JSON from stdin (model, workspace path, token usage) and renders it in the local terminal; it does not send data off-machine. | ✓Reads the Claude Code statusline JSON from stdin (model, workspace path, token count) and renders it in the local terminal; it does not send data off-machine. |
| Prerequisites |
|
|
|
|
| Install | — | — | — | — |
| Config | | | | |
| Citations | ||||
| Claim | Unclaimed | Unclaimed | Unclaimed | Unclaimed |
Source-backed guides for putting this to work.
Loading live community signals…
A short, calm digest of reviewed Claude resources. Unsubscribe any time.