Skip to main content
statuslinesSource-backedReview first Safety Privacy

Five Hour Window Tracker - Statuslines

A Claude Code statusline script (bash) that reads cost.total_duration_ms from the statusline JSON on stdin via jq, converts it to elapsed minutes, and renders a 20-character progress bar, a percent-used figure, and a countdown against a 300-minute (5-hour) ceiling, with green/yellow/red ANSI color coding at the 50%.

by JSONbored·added 2025-10-25·
HarnessClaude Code
Language:bash
Review first review before installing

Open the source and read safety notes before installing.

Citation facts

Source-backed facts for citing this resource, derived directly from the registry — also available as plain text for AI assistants.

Source URLs
https://code.claude.com/docs/en/statusline, https://github.com/JSONbored/awesome-claude/blob/main/content/statuslines/five-hour-window-tracker.mdx
Safety notes
The installation example runs package-manager commands with elevated privileges (brew install jq, sudo apt-get/yum install jq) and writes an executable script plus statusLine config into .claude/. Review it before running., The installation example overwrites the statusLine key in .claude/settings.json (via a jq rewrite and mv), which replaces any existing statusline configuration., The statusline command executes on every refresh (refreshInterval 1000ms) and shells out to jq and seq each time.
Privacy notes
The enhanced example writes per-session timestamp files keyed by session_id into ~/.claude-code-windows on local disk; these persist until manually deleted., The script parses the statusline JSON Claude Code passes on stdin (session_id, cost.total_duration_ms); it stays local and makes no network calls.
Author
JSONbored
Claim status
unclaimed
Last verified
2025-10-25

Decision playbook

Review trust signals before you adopt

Signals are present but mixed. Use the checklist below to confirm the source and operational safety for your environment.

Compare context
Selected

0

Current score

78

Baseline

Delta

No baseline selected

No major trust-signal divergence detected in the current selection.

Source and provenance checks

Complete

Confirm ownership and provenance before trusting install instructions.

  • Source link availableRequired

    Open the canonical repository and verify ownership.

    Done
  • Source provenance statusRequired

    Marked as source-backed.

    Done
  • Metadata reviewed

    Registry metadata indicates a reviewed listing.

    Done

Safety and privacy checks

Complete

Validate risk disclosures before installation or API wiring.

  • Safety notes presentRequired

    Review the listed safety guidance before running commands.

    Done
  • Privacy notes presentRequired

    Review data handling notes before connecting accounts or secrets.

    Done
  • Trust level risk gateRequired

    Trust level does not block evaluation.

    Done

Package and install checks

Needs review

Check package metadata and artifact integrity signals.

  • Install payload available

    Install or copy payload is available for review.

    Done
  • Package verification flag

    No package verification flag provided.

    Pending
  • Checksum metadata

    No checksum provided for downloaded artifact.

    Pending

Compare-driven decision checks

Needs review

Use compare context to validate trade-offs before adoption.

  • Compare tray has multiple entries

    Add at least one more entry to compare trust differences.

    Pending
  • Baseline comparison available

    No baseline peer selected yet.

    Pending
  • Diverging trust signals identified

    No major trust-signal divergence found.

    Pending

Setup at a glance

Config edit

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

4/100

Adoption plan

Balanced adoption plan

Current risk score 16/100. Use staged verification before broader rollout.

Risk 16

Pre-adoption checks

Validate source and review signals before any execution.

  • Confirm source provenanceRequired

    Source URL/provenance metadata is present.

    Done
  • Confirm metadata review state

    Listing has review metadata.

    Done
  • Verify install payload

    Install/config payload exists and can be inspected.

    Done

Security checks

Confirm safety, privacy, and package integrity signals.

  • Review safety notesRequired

    Safety notes are present.

    Done
  • Review privacy notesRequired

    Privacy notes are present.

    Done
  • Verify package integrity metadata

    No package verification/checksum metadata.

    Pending

Rollout

Adopt in controlled steps based on the selected plan.

  • Run in isolated sandbox firstRequired

    Use a constrained sandbox and observe behavior across multiple tasks.

    Pending
  • Roll out graduallyRequired

    Roll out to a small cohort before wider usage.

    Pending
  • Set monitoring and fallback

    Define rollback path and monitor errors after adoption.

    Pending

Evidence readiness

Evidence readiness matrix · balanced

Required evidence gates are covered (5/6 signals complete).

Risk 15

Source provenance

Present

Source repository/provenance is listed.

Required in this preset

Metadata review

Present

Review metadata is present.

Required in this preset

Safety notes

Present

Safety notes are present.

Required in this preset

Privacy notes

Present

Privacy notes are present.

Optional in this preset

Package integrity

Missing

Package integrity metadata is missing.

Optional in this preset

Install payload

Present

Install payload is available.

Required in this preset

Required evidence gates are covered for this preset.

Decision timeline

Decision timeline · balanced

5/6 steps complete with no blocking gaps for this preset.

Risk 14

triage

Confirm source provenanceRequired

Source/provenance metadata is available.

Done

triage

Check metadata review statusRequired

Review metadata is available.

Done

verify

Review safety notesRequired

Safety notes are available.

Done

verify

Review privacy notes

Privacy notes are available.

Done

verify

Validate package integrity metadata

Package integrity metadata is missing.

Pending

rollout

Verify install payload and commandsRequired

Install payload is available.

Done

No required blockers for this timeline preset.

Prerequisite readiness

Prerequisite readiness

6 prerequisites to line up before setup.

0/6 ready
Install & runtime1Network & hosting2General3

Safety & privacy surface

Safety & privacy surface

3 safety and 2 privacy notes across 3 risk areas. Review closely: credentials & tokens, permissions & scopes.

3 areas
  • SafetyPermissions & scopesThe installation example runs package-manager commands with elevated privileges (brew install jq, sudo apt-get/yum install jq) and writes an executable script plus statusLine config into .claude/. Review it before running.
  • SafetyExecution & processesThe installation example overwrites the statusLine key in .claude/settings.json (via a jq rewrite and mv), which replaces any existing statusline configuration.
  • SafetyExecution & processesThe statusline command executes on every refresh (refreshInterval 1000ms) and shells out to jq and seq each time.
  • PrivacyCredentials & tokensThe enhanced example writes per-session timestamp files keyed by session_id into ~/.claude-code-windows on local disk; these persist until manually deleted.
  • PrivacyCredentials & tokensThe script parses the statusline JSON Claude Code passes on stdin (session_id, cost.total_duration_ms); it stays local and makes no network calls.

Safety notes

  • The installation example runs package-manager commands with elevated privileges (brew install jq, sudo apt-get/yum install jq) and writes an executable script plus statusLine config into .claude/. Review it before running.
  • The installation example overwrites the statusLine key in .claude/settings.json (via a jq rewrite and mv), which replaces any existing statusline configuration.
  • The statusline command executes on every refresh (refreshInterval 1000ms) and shells out to jq and seq each time.

Privacy notes

  • The enhanced example writes per-session timestamp files keyed by session_id into ~/.claude-code-windows on local disk; these persist until manually deleted.
  • The script parses the statusline JSON Claude Code passes on stdin (session_id, cost.total_duration_ms); it stays local and makes no network calls.

Prerequisites

  • Claude Code CLI installed and configured
  • Bash shell available (bash 4.0+ recommended for arithmetic operations)
  • jq command-line JSON processor (jq 1.6+ recommended for safe extraction with // defaults)
  • Terminal with ANSI color code support (256-color mode recommended for color-coded window indicators)
  • Terminal with Unicode block character support (for █ and ░ progress bar characters, or use ASCII alternatives)
  • System clock accuracy (for accurate time remaining calculations)

Schema details

Install type
config
Reading time
2 min
Difficulty score
4
Troubleshooting
Yes
Breaking changes
No
Skill and platform metadata
Retrieval sources
https://code.claude.com/docs/en/statuslinehttps://jqlang.org/manual/https://manpages.ubuntu.com/manpages/jammy/man1/bash.1.html
Runtime and command metadata
Script language
bash
Script body
#!/usr/bin/env bash

# 5-Hour Session Window Tracker for Claude Code
# Tracks Claude's unique 5-hour rolling session window

# Read JSON from stdin
read -r input

# Extract session duration in milliseconds
total_duration_ms=$(echo "$input" | jq -r '.cost.total_duration_ms // 0')

# Convert to minutes and hours
duration_minutes=$((total_duration_ms / 60000))
duration_hours=$((duration_minutes / 60))
remaining_minutes=$((duration_minutes % 60))

# 5-hour window is 300 minutes
WINDOW_LIMIT=300
time_remaining=$((WINDOW_LIMIT - duration_minutes))

# Calculate percentage of window used
if [ $duration_minutes -gt 0 ]; then
  percentage_used=$(( (duration_minutes * 100) / WINDOW_LIMIT ))
else
  percentage_used=0
fi

# Prevent overflow (sessions can continue beyond 5 hours in practice)
if [ $percentage_used -gt 100 ]; then
  percentage_used=100
  time_remaining=0
fi

# Color coding based on window usage
if [ $percentage_used -lt 50 ]; then
  STATUS_COLOR="\033[38;5;46m"   # Green: < 50% used
  STATUS_ICON="✓"
elif [ $percentage_used -lt 80 ]; then
  STATUS_COLOR="\033[38;5;226m"  # Yellow: 50-80% used
  STATUS_ICON="⚠"
else
  STATUS_COLOR="\033[38;5;196m"  # Red: > 80% used
  STATUS_ICON="⏰"
fi

# Build progress bar (20 characters wide)
bar_filled=$(( percentage_used / 5 ))  # Each char = 5%
bar_empty=$(( 20 - bar_filled ))
bar=$(printf "█%.0s" $(seq 1 $bar_filled))$(printf "░%.0s" $(seq 1 $bar_empty))

# Format time remaining
if [ $time_remaining -gt 60 ]; then
  remaining_hours=$((time_remaining / 60))
  remaining_mins=$((time_remaining % 60))
  time_display="${remaining_hours}h ${remaining_mins}m"
elif [ $time_remaining -gt 0 ]; then
  time_display="${time_remaining}m"
else
  time_display="EXPIRED"
fi

RESET="\033[0m"

# Output statusline
echo -e "${STATUS_ICON} 5H Window: ${STATUS_COLOR}${bar}${RESET} ${percentage_used}% | ${STATUS_COLOR}${time_display}${RESET} left"
Full copyable content
{
  "statusLine": {
    "type": "command",
    "command": "$CLAUDE_PROJECT_DIR/.claude/statuslines/five-hour-window-tracker.sh",
    "refreshInterval": 1000
  }
}

About this resource

Features

  • Tracks the current session's elapsed wall-clock duration from cost.total_duration_ms against a 300-minute (5-hour) ceiling
  • Visual progress bar showing window consumption (20-char bar, each █ = 5%)
  • Time remaining countdown in hours/minutes format
  • Color-coded status alerts (green <50%, yellow 50-80%, red >80%)
  • Expiry warning when window approaches limit
  • Percentage used calculation for quick assessment
  • Handles overflow gracefully (sessions beyond 5 hours)
  • Lightweight bash implementation (requires jq for JSON parsing)

Use Cases

  • Watching how long the current Claude Code session has run
  • Preventing unexpected session expiry during critical work
  • Planning work sessions around 5-hour limit
  • Visualizing session duration as a progress bar in the statusline
  • Reminding yourself to break up long sessions
  • Session planning for long coding marathons

Requirements

  • Claude Code CLI installed and configured
  • Bash shell available (bash 4.0+ recommended for arithmetic operations)
  • jq command-line JSON processor (jq 1.6+ recommended for safe extraction with // defaults)
  • Terminal with ANSI color code support (256-color mode recommended for color-coded window indicators)
  • Terminal with Unicode block character support (for █ and ░ progress bar characters, or use ASCII alternatives)
  • System clock accuracy (for accurate time remaining calculations)

Configuration

{
  "statusLine": {
    "type": "command",
    "command": "$CLAUDE_PROJECT_DIR/.claude/statuslines/five-hour-window-tracker.sh",
    "refreshInterval": 1000
  }
}

Examples

Enhanced Five Hour Window Tracker with Session History

Extended version tracking multiple sessions within the 5-hour window

#!/usr/bin/env bash

# Enhanced 5-Hour Window Tracker with Session History

input=$(cat)

session_id=$(echo "$input" | jq -r '.session_id // ""')
total_duration_ms=$(echo "$input" | jq -r '.cost.total_duration_ms // 0')

# Session history directory
HISTORY_DIR="${HOME}/.claude-code-windows"
mkdir -p "$HISTORY_DIR"

# Current session file
SESSION_FILE="${HISTORY_DIR}/${session_id}.session"

# Store session start time if new session
if [ ! -f "$SESSION_FILE" ]; then
  echo "$(date +%s)" > "$SESSION_FILE"
fi

session_start=$(cat "$SESSION_FILE")
current_time=$(date +%s)
session_elapsed=$(( (current_time - session_start) / 60 ))

# Use actual duration from JSON or calculated elapsed time
duration_minutes=$((total_duration_ms / 60000))
if [ $duration_minutes -eq 0 ]; then
  duration_minutes=$session_elapsed
fi

WINDOW_LIMIT=300
time_remaining=$((WINDOW_LIMIT - duration_minutes))

if [ $duration_minutes -gt 0 ]; then
  percentage_used=$(( (duration_minutes * 100) / WINDOW_LIMIT ))
else
  percentage_used=0
fi

if [ $percentage_used -gt 100 ]; then
  percentage_used=100
  time_remaining=0
fi

if [ $percentage_used -lt 50 ]; then
  STATUS_COLOR="\033[38;5;46m"
  STATUS_ICON="✓"
elif [ $percentage_used -lt 80 ]; then
  STATUS_COLOR="\033[38;5;226m"
  STATUS_ICON="⚠"
else
  STATUS_COLOR="\033[38;5;196m"
  STATUS_ICON="⏰"
fi

bar_filled=$((percentage_used / 5))
bar_empty=$((20 - bar_filled))

if [ $bar_filled -gt 0 ]; then
  bar=$(printf "█%.0s" $(seq 1 $bar_filled))$(printf "░%.0s" $(seq 1 $bar_empty))
else
  bar="░░░░░░░░░░░░░░░░░░░░"
fi

if [ $time_remaining -gt 60 ]; then
  remaining_hours=$((time_remaining / 60))
  remaining_mins=$((time_remaining % 60))
  time_display="${remaining_hours}h ${remaining_mins}m"
elif [ $time_remaining -gt 0 ]; then
  time_display="${time_remaining}m"
else
  time_display="EXPIRED"
fi

RESET="\033[0m"

echo -e "${STATUS_ICON} 5H Window: ${STATUS_COLOR}${bar}${RESET} ${percentage_used}% | ${STATUS_COLOR}${time_display}${RESET} left"

Five Hour Window Tracker with Custom Window Limit

Configurable window limit for different usage scenarios

#!/usr/bin/env bash

# 5-Hour Window Tracker with Custom Window Limit

# Configurable window limit (default 300 minutes = 5 hours)
WINDOW_LIMIT=${FIVE_HOUR_WINDOW_LIMIT:-300}

input=$(cat)

total_duration_ms=$(echo "$input" | jq -r '.cost.total_duration_ms // 0')

duration_minutes=$((total_duration_ms / 60000))

time_remaining=$((WINDOW_LIMIT - duration_minutes))

if [ $duration_minutes -gt 0 ]; then
  percentage_used=$(( (duration_minutes * 100) / WINDOW_LIMIT ))
else
  percentage_used=0
fi

if [ $percentage_used -gt 100 ]; then
  percentage_used=100
  time_remaining=0
fi

if [ $percentage_used -lt 50 ]; then
  STATUS_COLOR="\033[38;5;46m"
  STATUS_ICON="✓"
elif [ $percentage_used -lt 80 ]; then
  STATUS_COLOR="\033[38;5;226m"
  STATUS_ICON="⚠"
else
  STATUS_COLOR="\033[38;5;196m"
  STATUS_ICON="⏰"
fi

bar_filled=$((percentage_used / 5))
bar_empty=$((20 - bar_filled))

if [ $bar_filled -gt 0 ]; then
  bar=$(printf "█%.0s" $(seq 1 $bar_filled))$(printf "░%.0s" $(seq 1 $bar_empty))
else
  bar="░░░░░░░░░░░░░░░░░░░░"
fi

if [ $time_remaining -gt 60 ]; then
  remaining_hours=$((time_remaining / 60))
  remaining_mins=$((time_remaining % 60))
  time_display="${remaining_hours}h ${remaining_mins}m"
elif [ $time_remaining -gt 0 ]; then
  time_display="${time_remaining}m"
else
  time_display="EXPIRED"
fi

RESET="\033[0m"

echo -e "${STATUS_ICON} ${WINDOW_LIMIT}min Window: ${STATUS_COLOR}${bar}${RESET} ${percentage_used}% | ${STATUS_COLOR}${time_display}${RESET} left"

Five Hour Window Tracker Installation Example

Complete setup script with Unicode character verification

#!/bin/bash
# Installation script for Five Hour Window Tracker

mkdir -p .claude/statuslines

# 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://jqlang.github.io/jq/"
    fi
fi

# Test Unicode block characters
if echo -e '█░' &> /dev/null; then
    echo "Unicode block characters supported"
else
    echo "Warning: Unicode block characters may not be supported in your terminal"
    echo "Script will use Unicode blocks (█ and ░) - if they don't display, consider ASCII alternatives"
fi

cat > .claude/statuslines/five-hour-window-tracker.sh << 'SCRIPT_EOF'
#!/usr/bin/env bash

# 5-Hour Session Window Tracker for Claude Code
# Tracks Claude's unique 5-hour rolling session window

read -r input

total_duration_ms=$(echo "$input" | jq -r '.cost.total_duration_ms // 0')

duration_minutes=$((total_duration_ms / 60000))

WINDOW_LIMIT=300
time_remaining=$((WINDOW_LIMIT - duration_minutes))

if [ $duration_minutes -gt 0 ]; then
  percentage_used=$(( (duration_minutes * 100) / WINDOW_LIMIT ))
else
  percentage_used=0
fi

if [ $percentage_used -gt 100 ]; then
  percentage_used=100
  time_remaining=0
fi

if [ $percentage_used -lt 50 ]; then
  STATUS_COLOR="\033[38;5;46m"
  STATUS_ICON="✓"
elif [ $percentage_used -lt 80 ]; then
  STATUS_COLOR="\033[38;5;226m"
  STATUS_ICON="⚠"
else
  STATUS_COLOR="\033[38;5;196m"
  STATUS_ICON="⏰"
fi

bar_filled=$((percentage_used / 5))
bar_empty=$((20 - bar_filled))

if [ $bar_filled -gt 0 ]; then
  bar=$(printf "█%.0s" $(seq 1 $bar_filled))$(printf "░%.0s" $(seq 1 $bar_empty))
else
  bar="░░░░░░░░░░░░░░░░░░░░"
fi

if [ $time_remaining -gt 60 ]; then
  remaining_hours=$((time_remaining / 60))
  remaining_mins=$((time_remaining % 60))
  time_display="${remaining_hours}h ${remaining_mins}m"
elif [ $time_remaining -gt 0 ]; then
  time_display="${time_remaining}m"
else
  time_display="EXPIRED"
fi

RESET="\033[0m"

echo -e "${STATUS_ICON} 5H Window: ${STATUS_COLOR}${bar}${RESET} ${percentage_used}% | ${STATUS_COLOR}${time_display}${RESET} left"
SCRIPT_EOF

chmod +x .claude/statuslines/five-hour-window-tracker.sh

# Add to settings.json
if [ ! -f .claude/settings.json ]; then
    echo '{"statusLine":{"type":"command","command":"$CLAUDE_PROJECT_DIR/.claude/statuslines/five-hour-window-tracker.sh","refreshInterval":1000}}' > .claude/settings.json
else
    jq '.statusLine = {"type":"command","command":"$CLAUDE_PROJECT_DIR/.claude/statuslines/five-hour-window-tracker.sh","refreshInterval":1000}' .claude/settings.json > .claude/settings.json.tmp
    mv .claude/settings.json.tmp .claude/settings.json
fi

echo "Five Hour Window Tracker installed successfully!"
echo "Note: This tracks Claude Code's unique 5-hour rolling session window (300 minutes)"

Troubleshooting

Progress bar not updating or showing as empty boxes

Ensure terminal supports Unicode block characters (█ and ░). Test with: echo -e '█████░░░░░'. If unsupported, replace with ASCII: bar_filled uses '#' and bar_empty uses '-' instead of Unicode blocks. Verify printf command works: printf '█%.0s' $(seq 1 5). Check terminal encoding: locale charmap (should be UTF-8).

Time remaining showing negative or EXPIRED incorrectly

Check cost.total_duration_ms field in JSON: echo '$input' | jq .cost.total_duration_ms. Verify calculation: duration_minutes should be total_duration_ms / 60000. If sessions overlap, this tracks CURRENT session only, not aggregate time. Check WINDOW_LIMIT is 300: echo $WINDOW_LIMIT. Verify time_remaining calculation: time_remaining=$((WINDOW_LIMIT - duration_minutes)).

Percentage exceeds 100% showing incorrect progress

Script caps percentage at 100% with overflow protection. Sessions can run longer than 300 minutes. If you see 100% + EXPIRED, the session has exceeded the configured ceiling (this is a display ceiling, not Claude's actual usage limit). This is expected behavior, not a bug. Start new session to reset window. Verify percentage calculation: percentage_used=$(( (duration_minutes * 100) / WINDOW_LIMIT )). Check overflow protection: if [ $percentage_used -gt 100 ]; then percentage_used=100; fi.

Warning colors not displaying at correct thresholds

Verify color thresholds: <50% green, 50-80% yellow, >80% red. Check percentage_used calculation: (duration_minutes * 100) / 300. Test with known durations: 150 min should be 50% yellow, 250 min should be 83% red. Verify ANSI color codes work: echo -e '\033[38;5;46mGREEN\033[0m'. Check terminal supports 256-color mode: echo $TERM (should be xterm-256color or similar).

Multiple overlapping sessions not reflected in tracker

Statusline tracks CURRENT session only (based on session_id in JSON). This script reads only the current session's total_duration_ms; it does not aggregate concurrent sessions. To track other sessions, run separate statusline instances or modify the script to read from multiple session files. Verify session_id exists: echo '$input' | jq .session_id. Check if session history tracking is enabled in enhanced version.

Time display showing incorrect hours/minutes format

Verify time_remaining calculation: time_remaining=$((WINDOW_LIMIT - duration_minutes)). Check hours calculation: remaining_hours=$((time_remaining / 60)). Check minutes calculation: remaining_mins=$((time_remaining % 60)). Test: time_remaining=150 should show '2h 30m'. Verify format logic: if [ $time_remaining -gt 60 ]; then show hours and minutes; elif [ $time_remaining -gt 0 ]; then show minutes only; else show EXPIRED.

Progress bar calculation showing wrong number of filled blocks

Verify bar_filled calculation: bar_filled=$((percentage_used / 5)) (each char = 5%). Test: percentage=50%; bar_filled=$((50 / 5)); echo $bar_filled (should be 10). Check bar_empty calculation: bar_empty=$((20 - bar_filled)). Verify printf command: printf '█%.0s' $(seq 1 5) should output 5 block characters. Ensure seq command is available: which seq.

Statusline not updating or stuck at 0%

Check JSON input is being read: echo '$input' | jq .. Verify cost.total_duration_ms exists: echo '$input' | jq .cost.total_duration_ms. Check jq is installed: which jq. Verify duration_minutes calculation: duration_minutes=$((total_duration_ms / 60000)). Test with sample JSON: echo '{"cost":{"total_duration_ms":180000}}' | jq -r '.cost.total_duration_ms // 0' (should return 180000). Check refreshInterval in settings.json is set to 1000ms or lower.

Source citations

Add this badge to your README

Show that Five Hour Window Tracker - Statuslines is listed on HeyClaude. Paste this Markdown into your README — it renders the badge and links back to this page.

Listed on HeyClaude
[![Listed on HeyClaude](https://heyclau.de/badge/statuslines/five-hour-window-tracker.svg)](https://heyclau.de/entry/statuslines/five-hour-window-tracker)

How it compares

Five Hour Window Tracker - Statuslines side by side with 3 alternatives on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.

Field

A Claude Code statusline script (bash) that reads cost.total_duration_ms from the statusline JSON on stdin via jq, converts it to elapsed minutes, and renders a 20-character progress bar, a percent-used figure, and a countdown against a 300-minute (5-hour) ceiling, with green/yellow/red ANSI color coding at the 50%.

Open dossier

Claude 5-hour conversation block tracker with visual countdown, expiration warnings, and color-coded indicators to prevent unexpected session terminations.

Open dossier

Claude Code daily usage quota tracker showing percentage of daily limit consumed with visual progress bar, time remaining, and budget pacing indicators.

Open dossier

Multi-provider AI performance dashboard with context occupancy tracking, truncation warnings, TTFT latency, tokens/min rate, and model comparison metrics.

Open dossier
Next steps
Trust
Review statusReviewedMaintainer reviewedReviewedMaintainer reviewedReviewedMaintainer reviewedReviewedMaintainer reviewed
Package trustPackage not verifiedPackage not verifiedPackage not verifiedPackage not verified
Source provenanceSource-backedSource-backedSource-backedSource-backed
Submitter
Install riskReview firstReview firstReview firstReview first
Notes Safety Privacy Safety Privacy Safety Privacy Safety Privacy
Brand
Categorystatuslinesstatuslinesstatuslinesstatuslines
Sourcesource-backedsource-backedsource-backedsource-backed
AuthorJSONboredJSONboredJSONboredJSONbored
Added2025-10-252025-10-232025-10-252025-10-23
Platforms
Claude Code
Claude Code
Claude Code
Claude Code
Source repo
Safety notesThe installation example runs package-manager commands with elevated privileges (brew install jq, sudo apt-get/yum install jq) and writes an executable script plus statusLine config into .claude/. Review it before running. The installation example overwrites the statusLine key in .claude/settings.json (via a jq rewrite and mv), which replaces any existing statusline configuration. The statusline command executes on every refresh (refreshInterval 1000ms) and shells out to jq and seq each time.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.
Privacy notesThe enhanced example writes per-session timestamp files keyed by session_id into ~/.claude-code-windows on local disk; these persist until manually deleted. The script parses the statusline JSON Claude Code passes on stdin (session_id, cost.total_duration_ms); it stays local and makes no network calls.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, token usage, context occupancy) and renders it in the local terminal; it does not send data off-machine.
Prerequisites
  • Claude Code CLI installed and configured
  • Bash shell available (bash 4.0+ recommended for arithmetic operations)
  • jq command-line JSON processor (jq 1.6+ recommended for safe extraction with // defaults)
  • Terminal with ANSI color code support (256-color mode recommended for color-coded window indicators)
  • Claude Code CLI installed and configured
  • Bash shell available (bash 4.0+ recommended for arithmetic operations and C-style for loops)
  • jq command-line JSON processor (jq 1.6+ recommended for safe extraction with // defaults)
  • date command with epoch conversion support (macOS: -j flag, Linux: -d flag)
  • Claude Code CLI installed and configured
  • Bash shell available (bash 4.0+ recommended for arithmetic operations)
  • jq command-line JSON processor (jq 1.6+ recommended for safe extraction with // defaults)
  • bc calculator (bc 1.07+ required for floating point calculations - script will fail without bc)
  • Claude Code CLI installed and configured
  • Bash shell available (bash 4.0+ recommended for arithmetic operations)
  • jq command-line JSON processor (jq 1.6+ recommended for safe extraction with // defaults)
  • date command with epoch conversion support (macOS: -j flag, Linux: -d flag)
Install
Config
{
  "statusLine": {
    "type": "command",
    "command": "$CLAUDE_PROJECT_DIR/.claude/statuslines/five-hour-window-tracker.sh",
    "refreshInterval": 1000
  }
}
{
  "statusLine": {
    "type": "command",
    "command": "$CLAUDE_PROJECT_DIR/.claude/statuslines/block-timer-tracker.sh",
    "refreshInterval": 1000
  }
}
{
  "statusLine": {
    "type": "command",
    "command": "$CLAUDE_PROJECT_DIR/.claude/statuslines/daily-usage-percentage-tracker.sh",
    "refreshInterval": 2000
  }
}
{
  "statusLine": {
    "type": "command",
    "command": "$CLAUDE_PROJECT_DIR/.claude/statuslines/ai-model-performance-dashboard.sh"
  }
}
Citations
ClaimUnclaimedUnclaimedUnclaimedUnclaimed
Open 4 picks in the interactive comparison tool

Signals

Loading live community signals…

More like this, weekly

A short, calm digest of reviewed Claude resources. Unsubscribe any time.