Install command
Not provided
Real-time burn rate monitor showing cost per minute, tokens per minute, and projected daily spend to prevent budget overruns during Claude Code sessions.
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
5/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
# Burn Rate Monitor Statusline for Claude Code
# Calculates real-time cost/minute and tokens/minute
# Read JSON from stdin
read -r input
# Extract values
total_cost=$(echo "$input" | jq -r '.cost.total_cost_usd // 0')
total_duration_ms=$(echo "$input" | jq -r '.cost.total_duration_ms // 1')
lines_added=$(echo "$input" | jq -r '.cost.total_lines_added // 0')
lines_removed=$(echo "$input" | jq -r '.cost.total_lines_removed // 0')
# Calculate duration in minutes (avoid division by zero)
if [ "$total_duration_ms" -gt 0 ]; then
duration_minutes=$(echo "scale=2; $total_duration_ms / 60000" | bc)
else
duration_minutes=0.01 # Prevent division by zero
fi
# Calculate burn rate (cost per minute)
if (( $(echo "$duration_minutes > 0" | bc -l) )); then
cost_per_minute=$(echo "scale=4; $total_cost / $duration_minutes" | bc)
else
cost_per_minute=0
fi
# Calculate total tokens (estimate: lines * 10 tokens per line avg)
total_tokens=$(( (lines_added + lines_removed) * 10 ))
# Calculate tokens per minute
if (( $(echo "$duration_minutes > 0" | bc -l) )); then
tokens_per_minute=$(echo "scale=0; $total_tokens / $duration_minutes" | bc)
else
tokens_per_minute=0
fi
# Project daily spend (assuming current burn rate for 24 hours)
if (( $(echo "$cost_per_minute > 0" | bc -l) )); then
daily_projection=$(echo "scale=2; $cost_per_minute * 1440" | bc) # 1440 minutes in 24 hours
else
daily_projection=0
fi
# Color coding for burn rate alerts
if (( $(echo "$cost_per_minute > 0.10" | bc -l) )); then
BURN_COLOR="\033[38;5;196m" # Red: High burn rate (>$0.10/min)
elif (( $(echo "$cost_per_minute > 0.05" | bc -l) )); then
BURN_COLOR="\033[38;5;226m" # Yellow: Medium burn rate ($0.05-$0.10/min)
else
BURN_COLOR="\033[38;5;46m" # Green: Low burn rate (<$0.05/min)
fi
RESET="\033[0m"
# Format output
echo -e "${BURN_COLOR}🔥 Burn: \$${cost_per_minute}/min${RESET} | 📊 ${tokens_per_minute} tok/min | 📅 Daily: \$${daily_projection}"{
"statusLine": {
"type": "command",
"command": "$CLAUDE_PROJECT_DIR/.claude/statuslines/burn-rate-monitor.sh",
"refreshInterval": 500
}
}{
"statusLine": {
"type": "command",
"command": "$CLAUDE_PROJECT_DIR/.claude/statuslines/burn-rate-monitor.sh",
"refreshInterval": 500
}
}
Extended version with daily budget threshold warnings
#!/usr/bin/env bash
# Enhanced Burn Rate Monitor with Budget Alerts
DAILY_BUDGET=${DAILY_BUDGET_USD:-50.00}
input=$(cat)
total_cost=$(echo "$input" | jq -r '.cost.total_cost_usd // 0')
total_duration_ms=$(echo "$input" | jq -r '.cost.total_duration_ms // 1')
lines_added=$(echo "$input" | jq -r '.cost.total_lines_added // 0')
lines_removed=$(echo "$input" | jq -r '.cost.total_lines_removed // 0')
if [ "$total_duration_ms" -gt 0 ]; then
duration_minutes=$(echo "scale=2; $total_duration_ms / 60000" | bc 2>/dev/null || echo "$((total_duration_ms / 60000))")
else
duration_minutes=0.01
fi
if (( $(echo "$duration_minutes > 0" | bc -l 2>/dev/null || echo "1") )); then
cost_per_minute=$(echo "scale=4; $total_cost / $duration_minutes" | bc 2>/dev/null || echo "0")
else
cost_per_minute=0
fi
total_tokens=$(( (lines_added + lines_removed) * 10 ))
if (( $(echo "$duration_minutes > 0" | bc -l 2>/dev/null || echo "1") )); then
tokens_per_minute=$(echo "scale=0; $total_tokens / $duration_minutes" | bc 2>/dev/null || echo "0")
else
tokens_per_minute=0
fi
if (( $(echo "$cost_per_minute > 0" | bc -l 2>/dev/null || echo "0") )); then
daily_projection=$(echo "scale=2; $cost_per_minute * 1440" | bc 2>/dev/null || echo "0")
else
daily_projection=0
fi
# Budget alert color
if (( $(echo "$daily_projection > $DAILY_BUDGET" | bc -l 2>/dev/null || echo "0") )); then
BURN_COLOR="\033[38;5;196m"
BUDGET_ALERT=" ⚠ OVER BUDGET"
elif (( $(echo "$cost_per_minute > 0.10" | bc -l 2>/dev/null || echo "0") )); then
BURN_COLOR="\033[38;5;196m"
BUDGET_ALERT=""
elif (( $(echo "$cost_per_minute > 0.05" | bc -l 2>/dev/null || echo "0") )); then
BURN_COLOR="\033[38;5;226m"
BUDGET_ALERT=""
else
BURN_COLOR="\033[38;5;46m"
BUDGET_ALERT=""
fi
RESET="\033[0m"
echo -e "${BURN_COLOR}🔥 Burn: $${cost_per_minute}/min${RESET} | 📊 ${tokens_per_minute} tok/min | 📅 Daily: $${daily_projection}${BUDGET_ALERT}${RESET}"
# Budget warning (stderr)
if (( $(echo "$daily_projection > $DAILY_BUDGET" | bc -l 2>/dev/null || echo "0") )); then
echo "⚠ BUDGET ALERT: Projected daily spend ($${daily_projection}) exceeds budget ($${DAILY_BUDGET})" >&2
fi
Configurable burn rate thresholds for different budget scenarios
#!/usr/bin/env bash
# Burn Rate Monitor with Custom Thresholds
HIGH_THRESHOLD=${BURN_RATE_HIGH:-0.10}
MEDIUM_THRESHOLD=${BURN_RATE_MEDIUM:-0.05}
input=$(cat)
total_cost=$(echo "$input" | jq -r '.cost.total_cost_usd // 0')
total_duration_ms=$(echo "$input" | jq -r '.cost.total_duration_ms // 1')
lines_added=$(echo "$input" | jq -r '.cost.total_lines_added // 0')
lines_removed=$(echo "$input" | jq -r '.cost.total_lines_removed // 0')
if [ "$total_duration_ms" -gt 0 ]; then
duration_minutes=$(echo "scale=2; $total_duration_ms / 60000" | bc 2>/dev/null || echo "$((total_duration_ms / 60000))")
else
duration_minutes=0.01
fi
if (( $(echo "$duration_minutes > 0" | bc -l 2>/dev/null || echo "1") )); then
cost_per_minute=$(echo "scale=4; $total_cost / $duration_minutes" | bc 2>/dev/null || echo "0")
else
cost_per_minute=0
fi
total_tokens=$(( (lines_added + lines_removed) * 10 ))
if (( $(echo "$duration_minutes > 0" | bc -l 2>/dev/null || echo "1") )); then
tokens_per_minute=$(echo "scale=0; $total_tokens / $duration_minutes" | bc 2>/dev/null || echo "0")
else
tokens_per_minute=0
fi
if (( $(echo "$cost_per_minute > 0" | bc -l 2>/dev/null || echo "0") )); then
daily_projection=$(echo "scale=2; $cost_per_minute * 1440" | bc 2>/dev/null || echo "0")
else
daily_projection=0
fi
# Custom thresholds
if (( $(echo "$cost_per_minute > $HIGH_THRESHOLD" | bc -l 2>/dev/null || echo "0") )); then
BURN_COLOR="\033[38;5;196m"
elif (( $(echo "$cost_per_minute > $MEDIUM_THRESHOLD" | bc -l 2>/dev/null || echo "0") )); then
BURN_COLOR="\033[38;5;226m"
else
BURN_COLOR="\033[38;5;46m"
fi
RESET="\033[0m"
echo -e "${BURN_COLOR}🔥 Burn: $${cost_per_minute}/min${RESET} | 📊 ${tokens_per_minute} tok/min | 📅 Daily: $${daily_projection}"
Complete setup script with bc installation check
#!/bin/bash
# Installation script for Burn Rate Monitor
mkdir -p .claude/statuslines
# Check for bc (required for floating point calculations)
if ! command -v bc &> /dev/null; then
echo "Installing bc for floating point calculations..."
if [[ "$OSTYPE" == "darwin"* ]]; then
brew install bc
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
sudo apt-get install -y bc || sudo yum install -y bc
else
echo "Please install bc manually: https://www.gnu.org/software/bc/"
fi
fi
cat > .claude/statuslines/burn-rate-monitor.sh << 'SCRIPT_EOF'
#!/usr/bin/env bash
# Paste the full statusline script from the primary example above before running this installer.
SCRIPT_EOF
chmod +x .claude/statuslines/burn-rate-monitor.sh
# Add to settings.json
if [ ! -f .claude/settings.json ]; then
echo '{"statusLine":{"type":"command","command":"$CLAUDE_PROJECT_DIR/.claude/statuslines/burn-rate-monitor.sh","refreshInterval":500}}' > .claude/settings.json
else
jq '.statusLine = {"type":"command","command":"$CLAUDE_PROJECT_DIR/.claude/statuslines/burn-rate-monitor.sh","refreshInterval":500}' .claude/settings.json > .claude/settings.json.tmp
mv .claude/settings.json.tmp .claude/settings.json
fi
echo "Burn Rate Monitor installed successfully!"
echo "Note: bc is required for floating point calculations. Script refreshes every 500ms for real-time monitoring."
Verify cost.total_cost_usd and cost.total_duration_ms fields exist in JSON: echo '$input' | jq .cost. Ensure bc is installed: which bc. Check division by zero protection is working for very short sessions. Test calculations: echo 'scale=4; 0.05 / 1.5' | bc (should return 0.0333). Verify duration_minutes calculation: duration_minutes=$((total_duration_ms / 60000)).
Install bc calculator: brew install bc (macOS), apt install bc (Linux), or download from https://www.gnu.org/software/bc/. Alternative: use awk for calculations if bc unavailable: awk -v cost=$total_cost -v dur=$duration_minutes 'BEGIN {print cost/dur}'. Verify bc installation: bc --version. Check PATH includes bc location.
Daily projection assumes CONTINUOUS usage at current burn rate for 24 hours. This is intentional for worst-case budgeting. Actual daily cost will be lower if you don't use Claude Code 24/7. Adjust multiplier from 1440 to expected active minutes. Formula: dailyprojection = cost_per_minute * activeminutes_per_day. For 8-hour workday: cost_per_minute * 480.
Script estimates 10 tokens per line (conservative average). Actual token count varies by language/verbosity. For precise tracking, integrate with Claude API token counting if exposed in future JSON fields. Current estimate is sufficient for burn rate trend monitoring. Adjust multiplier: total_tokens=$(( (lines_added + lines_removed) * 15 )) for more verbose code (15 tokens/line).
Ensure terminal supports ANSI colors. Test: echo -e '\033[38;5;196mRED\033[0m' (should show red text). Verify statusline script outputs to stdout not stderr. Check Claude Code settings.json has correct command path. Verify echo -e flag is used for escape sequence interpretation. Check terminal emulator color support settings.
This indicates bc is not working or fallback to integer math is active. Check bc installation: bc --version. Verify bc command in script: echo 'scale=4; 0.05 / 1.5' | bc (should return 0.0333). If bc fails, script uses integer division which truncates decimals. Install bc for decimal precision. Check bc syntax: bc -l enables math library for comparisons.
Verify bc comparison is working: echo '0.15 > 0.10' | bc -l (should return 1). Check cost_per_minute calculation is correct: echo 'scale=4; $total_cost / $duration_minutes' | bc. Ensure thresholds are correct: HIGH_THRESHOLD=0.10, MEDIUM_THRESHOLD=0.05. Test color logic: if (( $(echo "$cost_per_minute > 0.10" | bc -l) )); then echo "RED"; fi.
Check lines*added and lines_removed are being extracted correctly: echo '$input' | jq '.cost.total_lines_added, .cost.total_lines_removed'. Verify token estimation: total_tokens=$(( (lines_added + lines_removed) * 10 )). Test calculation: lines=100; tokens=$((lines _ 10)); echo $tokens (should be 1000). Check duration_minutes > 0 before division. Verify bc division: echo 'scale=0; 1000 / 5' | bc (should return 200).
Burn Rate Monitor - Statuslines side by side with 3 alternatives on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.
1 trust signal differ across this comparison (Submitter).
| Field | Real-time burn rate monitor showing cost per minute, tokens per minute, and projected daily spend to prevent budget overruns during Claude Code sessions. Open dossier | Real-time AI cost tracking statusline with per-session spend analytics, model pricing, and budget alerts Open dossier | A Claude Code statusline that reads prompt-cache token metrics from session JSON and renders a color-coded hit-rate bar with an estimated token-savings readout. Open dossier | Claude Code statusline that estimates context pressure from local session token counts and a configurable context limit, then prints a compact risk tier. 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 |
| SubmitterDiffers | — | — | — | MkDev11 |
| 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 | MkDev11 |
| Added | 2025-10-25 | 2025-10-16 | 2025-10-25 | 2026-06-04 |
| 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 a bash script on every status-line refresh (about every 2 seconds) that pipes session JSON through jq and bc; it is read-only and makes no network calls or file writes, but status-line commands execute with your shell's permissions, so review the script before adding it to settings.json. | ✓Context percentage is only as accurate as the configured limit and the usage fields available in the statusline input. Use the warning as a cue to summarize or checkpoint work before context pressure affects reasoning quality. Do not treat a low percentage as proof that all relevant files, instructions, or tool results are still in scope. |
| 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, token usage, and cost) and renders it in the local terminal; it does not send data off-machine. | ✓Reads Claude Code session cost and token metrics from the status-line JSON on stdin and prints them to your terminal; no data leaves the machine, but the displayed figures may be visible to anyone viewing your screen or a terminal recording. | ✓The script reads local session counters and does not inspect prompt text, files, or transcript contents. Token counts and configured limits can still reveal workload size in screenshots or shared terminal logs. Teams should avoid placing customer names or project identifiers in shell variables that appear in debugging output. |
| 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.