Skip to content

daliovic/cc-statusline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Claude Code Statusline

A minimal, informative statusline for Claude Code CLI.

🤖 Opus 4.5 │ 📊 53% 106K │ ⏱ 26% 2h09 ▼1h32/46% 2d15 ▼1d04 │ 🕌 Asr 15:32 (2h15)

Features

  • Model indicator - Shows current model (Opus, Sonnet, Haiku)
  • Context usage - Percentage + token count (turns orange at 75%)
  • Usage limits - 5-hour session and 7-day limits with reset times
  • Budget delta - Shows if you're under (▼ green) or over (▲ red) your expected usage rate
  • Prayer times - Next prayer name, time, and countdown (auto-detects location)
  • Customizable - Interactive wizard to configure colors, visibility, and thresholds

Installation

npm (recommended)

npm install -g @daliovic/cc-statusline

From source

git clone https://github.com/daliovic/cc-statusline.git
cd cc-statusline
npm install
npm run build

Configuration

Add to ~/.claude/settings.json:

{
  "statusLine": {
    "type": "command",
    "command": "cc-statusline",
    "padding": 0
  }
}

Or if installed from source:

{
  "statusLine": {
    "type": "command",
    "command": "node /path/to/cc-statusline/dist/statusline.js",
    "padding": 0
  }
}

Customization

Run the interactive configuration wizard:

cc-statusline --config

This lets you customize:

  • Visibility - Show/hide model, context, 5hr limit, 7day limit, delta arrows
  • Colors - ANSI 256 color codes for each element
  • Thresholds - Context warning percentage, cache TTL

Config is saved to ~/.claude/cc-statusline.json.

Prayer Times

Prayer times are enabled by default and auto-detect your location via IP. Configure via --config:

  • Calculation method - 20+ methods including Umm Al-Qura, ISNA, Muslim World League, and regional options
  • Location - Auto-detect via IP, city/country search, or manual coordinates

See Aladhan API docs for all available calculation methods.

Environment Variables

Variable Default Description
STATUSLINE_CACHE_TTL_MS config value API cache duration (overrides config)

How It Works

  • Reads session data from Claude Code via stdin
  • Calculates context usage from transcript file
  • Fetches usage limits from Anthropic OAuth API (cached)
  • Budget delta shows time ahead/behind ideal linear usage

Output Format

🤖 Model │ 📊 Context% Tokens │ ⏱ 5hr% Time Delta/7day% Time Delta │ 🕌 Prayer Time (countdown)

Default Colors (customizable via --config):

  • Cyan: Model name and icons
  • Gray: Percentages and times
  • Orange: Context at threshold
  • Green ▼: Under budget
  • Red ▲: Over budget

License

MIT License - Do whatever you want with this. Attribution appreciated but not required.

Credits

Inspired by:

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published