Skip to content

cloudblue/claudeblue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ClaudeBlue

ClaudeBlue

Note

Feeling blue about Claude? This is a terminal theme pack, not a therapy session — but honestly, a perfectly themed terminal is surprisingly therapeutic. Studies show that a well-themed terminal reduces existential AI dread by up to 11%.*

*Citation needed.

A terminal theme pack, Claude Code statusline collection, and session analytics dashboard — all in a cohesive blue palette. Ships terminal color profiles, statusline scripts, shell prompt themes, and automatic session tracking — so your entire Claude Code experience feels like one thing.

Not affiliated with or endorsed by Anthropic. A community project by CloudBlue.


Quick Install

One-liner:

curl -fsSL https://raw.githubusercontent.com/cloudblue/claudeblue/main/install.sh | bash

Or clone and run manually:

git clone https://github.com/cloudblue/claudeblue.git
cd claudeblue
./install.sh

What You Get

Claude Code Status Lines

Pre-built statusline scripts that display context usage, git info, costs, and model — all in the ClaudeBlue palette.

Theme Description
glacier Minimal. Branch + context bar in icy blues
midnight Full dashboard. Git, cost, model, context — deep navy tones
electric High-contrast neon blue. For dark terminals
# List available themes (▸ marks the active one)
claudeblue use

# Switch themes
claudeblue use glacier
claudeblue use midnight
claudeblue use electric

# Preview all themes with simulated data
claudeblue preview

Session Analytics

ClaudeBlue automatically tracks every Claude Code session — cost, model, context consumption, and working directory. A Stop hook silently appends a line to ~/.claudeblue/history.jsonl each time a session ends.

claudeblue stats — Full Dashboard

Shows cost summaries by period, model breakdown with bar charts, a daily spend chart, and your most active projects:

   _____ _                 _      ____  _
  / ____| |               | |    |  _ \| |
 | |    | | __ _ _   _  __| | ___| |_) | |_   _  ___
 | |    | |/ _` | | | |/ _` |/ _ \  _ <| | | | |/ _ \
 | |____| | (_| | |_| | (_| |  __/ |_) | | |_| |  __/
  \_____|_|\__,_|\__,_|\__,_|\___|____/|_|\__,_|\___|

  Session Analytics                     12 sessions tracked

               Cost         Sessions     Avg/Session
  ──────────────────────────────────────────────────
  Today        $5.82        3            $1.94
  This week    $30.92       12           $2.58
  This month   $30.92       12           $2.58
  All time     $30.92       12           $2.58

  Model Breakdown

  opus-4.6       █████████████████░░░  88%  $27.30
  sonnet-4.6     ██░░░░░░░░░░░░░░░░░░  11%  $3.47
  haiku-4.5      ░░░░░░░░░░░░░░░░░░░░   0%  $0.15

  Daily Spend (last 8 days)

  03-14  █░░░░░░░░░░░░░░░░░░░  $0.60
  03-15  ████████████░░░░░░░░  $3.90
  03-16  ████████████████████  $6.10
  03-17  ███░░░░░░░░░░░░░░░░░  $0.95
  03-18  █████████░░░░░░░░░░░  $2.80
  03-19  █████████████████░░░  $5.45
  03-20  █████████████████░░░  $5.30
  03-21  ███████████████████░  $5.82

  Top Projects

  ~/code/myapp                    $19.22    5 sessions
  ~/code/claudeblue               $10.95    5 sessions
  ~/code/scripts                  $0.75     2 sessions

claudeblue history — Recent Sessions

Shows a table of individual sessions, most recent first:

  Recent Sessions

  Date                 Model               Cost      Context  Project
  ────────────────────────────────────────────────────────────────────────
  2026-03-21 16:00     opus-4.6            $1.55   300k/1000k  ~/code/claudeblue
  2026-03-21 14:30     sonnet-4.6          $0.82    120k/200k  ~/code/myapp
  2026-03-21 10:00     opus-4.6            $3.45   500k/1000k  ~/code/claudeblue
  2026-03-20 15:00     sonnet-4.6          $1.10    150k/200k  ~/code/claudeblue
  2026-03-20 09:00     opus-4.6            $4.20   600k/1000k  ~/code/myapp
# Show last 20 sessions (default)
claudeblue history

# Show last 50 sessions
claudeblue history 50

Stats Utilities

# Dump raw session data as JSONL — pipe to jq, grep, awk, etc.
claudeblue stats --json

# Example: total cost for a specific project
claudeblue stats --json | jq -s '[.[] | select(.cwd | endswith("myapp"))] | [.[].cost | tonumber] | add'

# Example: sessions that used Opus
claudeblue stats --json | grep opus

# Clear all session history
claudeblue stats --reset

How Tracking Works

The installer registers a Claude Code Stop hook in ~/.claude/settings.json:

{
  "hooks": {
    "Stop": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "command",
            "command": "~/.claudeblue/hooks/session-log.sh"
          }
        ]
      }
    ]
  }
}

Each time a Claude Code session ends, the hook captures these environment variables and appends a JSON line to ~/.claudeblue/history.jsonl:

Variable What it captures
CLAUDE_MODEL Model used (e.g., claude-opus-4-6)
CLAUDE_SESSION_COST Total session cost in USD
CLAUDE_CONTEXT_TOKENS Tokens used in context window
CLAUDE_CONTEXT_MAX Maximum context window size
PWD Working directory (project)

Example JSONL entry:

{"ts":"2026-03-21T14:30:00Z","model":"claude-opus-4-6","cost":"3.45","ctx_used":500000,"ctx_max":1000000,"cwd":"/Users/you/code/myapp"}

All data stays local on your machine. Nothing is sent anywhere.

Terminal Color Profiles

Ready-to-import profiles for your terminal emulator, in Midnight (dark) and Light variants:

Terminal Files Location
iTerm2 .itermcolors + Dynamic Profile themes/iterm2/
Windows Terminal JSON color schemes themes/windows-terminal/
Alacritty TOML themes themes/alacritty/
Ghostty Config fragments themes/ghostty/
Warp YAML themes themes/warp/

iTerm2 users get automatic light/dark mode switching via the installed Dynamic Profile.

Shell Prompt Themes

Matching prompt configs for popular frameworks:

Framework File Install
Starship prompts/starship.toml cp ~/.claudeblue/prompts/starship.toml ~/.config/starship.toml
Oh-My-Zsh prompts/claudeblue.zsh-theme cp ~/.claudeblue/prompts/claudeblue.zsh-theme ~/.oh-my-zsh/custom/themes/ then set ZSH_THEME="claudeblue"
Powerlevel10k prompts/p10k-claudeblue.zsh cp ~/.claudeblue/prompts/p10k-claudeblue.zsh ~/.p10k.zsh

The Palette

Based on the official CloudBlue brand identity.

Name Hex Usage
Glacier #1CD8F9 Cyan accent, highlights
Sky #288AF9 Info, secondary elements
Azure #0723EA Primary brand blue
Cobalt #130EB1 Headers, active states
Midnight #0B0355 Deep backgrounds
Abyss #060228 Terminal background
Ice #E0F0FF Foreground text
Storm #264BFA Medium blue, comments
Gold #ECC30B Accent, warnings

Configuration

After install, your Claude Code settings.json includes a statusline and session tracking hook:

{
  "statusLine": {
    "type": "command",
    "command": "~/.claudeblue/statusline.sh"
  },
  "hooks": {
    "Stop": [
      {
        "matcher": "",
        "hooks": [
          { "type": "command", "command": "~/.claudeblue/hooks/session-log.sh" }
        ]
      }
    ]
  }
}

To customize the statusline, edit ~/.claudeblue/config:

CLAUDEBLUE_THEME="midnight"     # glacier | midnight | electric
CLAUDEBLUE_SHOW_COST=true       # show session cost
CLAUDEBLUE_SHOW_MODEL=true      # show active model
CLAUDEBLUE_SHOW_GIT=true        # show git branch + status
CLAUDEBLUE_SHOW_CONTEXT=true    # show context window bar

CLI Reference

claudeblue <command> [args]

Commands:
  install          Install ClaudeBlue and configure Claude Code
  use [theme]      Switch active theme (glacier, midnight, electric)
  preview          Preview all themes with simulated data
  status           Show current configuration
  stats            Session analytics dashboard
  stats --json     Dump raw session data as JSONL
  stats --reset    Clear all session history
  history [N]      Show last N sessions (default: 20)
  uninstall        Remove ClaudeBlue
  help             Show help

Requirements

  • bash 4+ (macOS ships with 3.2 — statuslines work fine; stats uses features available in zsh too)
  • jq — required for stats and history commands (brew install jq / apt install jq)
  • python3 — used during install to safely modify settings.json (available by default on macOS and most Linux)

Uninstall

claudeblue uninstall

This removes ~/.claudeblue/ and the CLI symlink. You'll need to manually remove the statusLine and hooks entries from ~/.claude/settings.json.


License

Apache-2.0

About

Terminal theme pack and Claude Code statusline collection based on CloudBlue brand colors

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages