ClaudeMod
Back to browse
Plugins

claudeline

Customizable status line for Claude Code featuring git integration, cost tracking, and theming.

Luca Silverentand1 starsAdded 1 months ago

claudeline

Customizable status line for Claude Code. Display model info, git status, context usage, costs, API usage limits, and more in your terminal.

Installation

# Install with a theme
npx claudeline --theme luca --install

# Or with a custom format
npx claudeline "claude:model fs:dir git:branch" --install

That's it. Restart Claude Code and your status line will appear.

Quick Start

# List available themes
npx claudeline --themes

# List all components
npx claudeline --list

# Preview what data is available
npx claudeline --preview

# Install to current project only
npx claudeline --theme powerline --install --project

# Uninstall
npx claudeline --uninstall

Themes

ThemeFormat
minimalclaude:model fs:dir
default[claude:model] emoji:folder fs:dir if:git(sep:pipe emoji:branch git:branch git:status)
powerlinebold:cyan:claude:model sep:powerline fs:dir if:git(...)
full[bold:cyan:claude:model] fs:home sep:arrow green:git:branch git:status sep:pipe ctx:bar ctx:percent sep:pipe cost:total
git[claude:model] emoji:folder fs:dir sep:pipe emoji:branch git:branch git:status git:ahead-behind if:dirty(...)
tokensclaude:model sep:pipe ctx:emoji ctx:tokens sep:pipe cost:lines
dev[fs:dir] git:branch sep:pipe env:node sep:pipe time:now
dashboard[bold:claude:model] fs:dir sep:pipe git:branch git:status sep:pipe ctx:percent sep:pipe cost:total sep:pipe time:now
context-focusclaude:model sep:pipe ctx:bar sep:pipe ctx:tokens sep:pipe ctx:emoji
costclaude:model sep:pipe cost:total sep:pipe cost:duration sep:pipe cost:lines-both
simpleclaude:model fs:dir git:branch
verbose[claude:model] [claude:version] sep:pipe fs:home sep:pipe git:branch git:status git:ahead-behind sep:pipe ctx:bar ctx:percent sep:pipe cost:total cost:duration sep:pipe time:now
compactclaude:model sep:slash fs:dir sep:slash git:branch
colorfulbold:magenta:claude:model sep:arrow cyan:fs:dir sep:arrow green:git:branch yellow:git:status sep:arrow blue:ctx:percent
lucaNerd font icons, colored repo:branch, dirty state, cost, 5h/weekly usage bars

When you install with --theme, claudeline stores a theme:name reference so your status line automatically picks up theme updates when you upgrade.

Format Syntax

Components use type:key format, separated by spaces:

claude:model fs:dir git:branch

Styling

Add color/style prefixes before any component:

green:git:branch           # green text
bold:cyan:claude:model     # bold cyan text
bg-red:white:text:ERROR    # white on red background

Grouping

Wrap components in brackets to add literal brackets:

[claude:model]    # outputs: [Sonnet 4]
(fs:dir)          # outputs: (myproject)
{git:branch}      # outputs: {main}
<ctx:percent>     # outputs: <45%>

Conditionals

Show components only when conditions are met:

if:git(git:branch git:status)     # only in git repos
if:dirty(text:UNCOMMITTED)        # only when working tree is dirty
if:subdir(fs:relative)            # only when in a subdirectory (not git root)
if:node(env:node)                 # only in Node.js projects
if:python(env:python)             # only in Python projects
if:rust(emoji:rust)               # only in Rust projects
if:go(emoji:go)                   # only in Go projects

Separators

Use sep:name between components:

claude:model sep:pipe fs:dir sep:arrow git:branch

Available separators:

  • pipe|
  • arrow
  • arrow-left
  • chevron
  • chevron-left
  • dot
  • dash-
  • slash/
  • colon:
  • double-colon::
  • tilde~
  • double-pipe
  • bullet
  • diamond
  • star
  • powerline → ``
  • powerline-left → ``
  • space
  • none → (empty, useful for glueing components together)

Components Reference

Claude/Session

ComponentDescription
claude:modelModel display name (e.g., "Sonnet 4")
claude:model-idModel ID (e.g., "claude-sonnet-4")
claude:model-letterFirst letter of model name
claude:versionClaude Code version
claude:sessionSession ID (first 8 chars)
claude:session-fullFull session ID
claude:styleOutput style name

Context Window

ComponentDescription
ctx:percentUsage percentage (e.g., "45%")
ctx:remainingRemaining percentage
ctx:tokensUsed/total tokens (e.g., "50k/200k")
ctx:inInput tokens
ctx:outOutput tokens
ctx:sizeContext window size
ctx:barProgress bar [████░░░░░░]
ctx:bar:NProgress bar with width N
ctx:emojiStatus emoji (🟢🟡🟠🔴)
ctx:used-tokensTotal used tokens

Cost

ComponentDescription
cost:totalTotal cost (e.g., "$0.42")
cost:total-centsCost in cents (e.g., "42¢")
cost:durationTotal session duration
cost:apiAPI call duration
cost:linesNet lines changed (+/-)
cost:addedLines added
cost:removedLines removed
cost:lines-bothLines added and removed

Usage/Limits

Requires Clusage, a macOS menu bar app that tracks your Claude API usage. Clusage writes usage data to ~/.claude/clusage-api.json, which claudeline reads automatically. Install Clusage and add at least one account for usage components to work.

ComponentDescriptionExample
usage:5h5-hour utilization %12%
usage:week7-day utilization %58%
usage:7dAlias for usage:week58%
usage:5h-resetTime until 5h reset3h 32m
usage:week-resetTime until weekly reset2d 5h
usage:7d-resetAlias for usage:week-reset2d 5h
usage:5h-bar5h progress bar with H labelH▰▰▱▱▱▱▱▱
usage:5h-bar:N5h bar with width NH▰▱▱▱▱
usage:week-barWeekly progress bar with W labelW▰▰▰▰▰▱▱▱
usage:week-bar:NWeekly bar with width NW▰▰▰▱▱
usage:5h-emoji5h status emoji (🟢🟡🟠🔴)🟢
usage:week-emojiWeekly status emoji🟡
usage:7d-emojiAlias for usage:week-emoji🟡
usage:velocity5h usage velocity2.3 pp/hr
usage:intensityUsage intensity levelmoderate
usage:etaTime until rate limit ceiling1h 23m
usage:7d-granularInterpolated 7-day utilization46.3%
usage:7d-projectedProjected 7-day at reset62%
usage:budgetDaily usage budget14.3 pp/day
usage:budget-statusBudget pacing statuson_track

File System

ComponentDescription
fs:dirCurrent directory name
fs:pathFull current path
fs:projectProject directory name
fs:project-pathFull project path
fs:homePath with ~ for home
fs:cwdWorking directory
fs:relativePath relative to project

Git

ComponentDescription
git:branchCurrent branch name
git:statusClean (✓) or dirty (*)
git:status-emoji✨ or 📝
git:status-word"clean" or "dirty"
git:aheadCommits ahead (↑N)
git:behindCommits behind (↓N)
git:ahead-behindBoth ahead/behind
git:stashStash count (⚑N)
git:stagedStaged files (●N)
git:modifiedModified files (+N)
git:untrackedUntracked files (?N)
git:dirtyCombined dirty status with per-type colors (green staged, red untracked, yellow modified)
git:repo-branchCondensed repo:branch format
git:commitShort commit hash
git:commit-longFull commit hash
git:tagCurrent tag
git:remoteRemote name
git:repoRepository name
git:userGit user name
git:emailGit user email
git:remote-urlRemote URL

Environment

ComponentDescription
env:nodeNode.js version
env:node-shortNode version without 'v'
env:bunBun version
env:npmnpm version
env:pnpmpnpm version
env:yarnYarn version
env:pythonPython version
env:denoDeno version
env:rustRust version
env:goGo version
env:rubyRuby version
env:javaJava version
env:userCurrent username
env:hostnameFull hostname
env:hostname-shortShort hostname
env:shellCurrent shell
env:termTerminal type
env:osOperating system
env:archCPU architecture
env:os-releaseOS release
env:cpusCPU count
env:memoryTotal memory

Time

ComponentDescription
time:nowCurrent time (HH:MM)
time:secondsTime with seconds
time:12h12-hour format
time:dateShort date (Jan 15)
time:fullFull date (2024-01-15)
time:isoISO timestamp
time:unixUnix timestamp
time:weekdayShort weekday
time:weekday-longFull weekday
time:monthShort month
time:month-longFull month
time:yearYear
time:dayDay of month
time:hourHour (24h)
time:minuteMinute
time:elapsedSession elapsed time

Nerd Font Icons

Use nerd:name for Nerd Font glyphs. Requires a Nerd Font in your terminal.

Files: folder, folder-open, file, file-code

Git: branch, repo, commit, merge, tag, stash, pr, diff, compare

Status: check, x, warn, error, info, question, bell, pin

Decorative: star, fire, rocket, sparkle, lightning, heart, diamond, circle, square, triangle

Tech: node, python, rust, go, ruby, java, docker, terminal, code, database, cloud, server, package, gear, lock, unlock, key, shield

Arrows: up, down, left, right, arrow-right, arrow-left

Time: clock, calendar, history

OS: apple, linux, windows

Other: search, eye, bug, wrench, plug, wifi, bluetooth, cpu, memory, home, user

Emojis

Use emoji:name for Unicode emojis (no Nerd Font required):

Files: folder 📁, file 📄, home 🏠

Git: branch 🌿, commit 📝, merge 🔀, tag 🏷️, stash 📦

Status: check ✓, x ✗, warn ⚠, error ❌, success ✅, info

Decorative: star ★, fire 🔥, rocket 🚀, sparkle ✨, lightning ⚡, heart ❤, diamond ◆, circle ●, square ■, triangle

Tech: node ⬢, python 🐍, rust 🦀, go 🐹, ruby 💎, java ☕, docker 🐳

Indicators: green 🟢, yellow 🟡, orange 🟠, red 🔴

Arrows: up ↑, down ↓, left ←, right

Other: clock 🕐, calendar 📅, money 💰

Colors & Styles

Prefix any component with styles:

Colors: black, red, green, yellow, blue, magenta, cyan, white, gray

Bright colors: bright-red, bright-green, bright-yellow, bright-blue, bright-magenta, bright-cyan, bright-white

Backgrounds: bg-black, bg-red, bg-green, bg-yellow, bg-blue, bg-magenta, bg-cyan, bg-white

Styles: bold, dim, italic, underline, inverse, strikethrough

Chain multiple styles: bold:green:underline:git:branch

Custom Text

Use text:value for literal text:

text:Hello text:World
text:"Hello World"      # with spaces

CLI Options

-i, --install          Install to ~/.claude/settings.json
-u, --uninstall        Remove statusline configuration
    --project          Use project .claude/ instead of global
-t, --theme <name>     Use a preset theme
-l, --list             List all components
    --themes           List all themes
-p, --preview          Show sample JSON data
    --no-emoji         Disable emojis
    --no-color         Disable colors
    --use-bunx         Force bunx in command
    --use-npx          Force npx in command
    --global-install   Use claudeline directly (global install)
-V, --version          Show version
-h, --help             Show help

How It Works

When you run --install, claudeline updates your ~/.claude/settings.json:

{
  "statusLine": {
    "type": "command",
    "command": "npx claudeline run theme:luca",
    "padding": 0
  }
}

Claude Code pipes session data as JSON to this command, and claudeline outputs the formatted status line.

Testing

Test your format without installing:

# Get sample data
npx claudeline --preview

# Test with sample data
echo '{"model":{"display_name":"Sonnet 4"}}' | npx claudeline run "claude:model fs:dir"

# Test a theme
echo '{"model":{"display_name":"Opus"}}' | npx claudeline run theme:dashboard

Package Managers

claudeline auto-detects bun vs node and uses the appropriate runner:

  • Running with bun → installs bunx claudeline run ...
  • Running with node → installs npx claudeline run ...

Override with --use-bunx or --use-npx.

License

MIT

More Plugins

Plugins

claude-status

Minimalist CLI status line showing real-time token usage and costs for the current session and week.

status-lineclimonitoring+1
by rockia
GitHub
Plugins

cship

Beautiful, blazing-fast, customizable status line for Claude Code with full Starship pass-through.

status-lineclistarship+2
by stephenleo
GitHub
Plugins

everything-claude-code

A comprehensive bundle of Claude Code optimizations: hooks, commands, CLAUDE.md configs, MCP setups, and workflow automations — everything you need in one repo.

bundlehookscommands+4
by Affaan M
GitHub

Command Palette

Search for a command to run...