Open Source

Real-time statusline, live monitor, session analytics, hooks, and slash commands for Claude Code.

$ brew tap slima4/claude-tui && brew install claude-tui
claude — statusline (full mode)
0110100 Opus 4.6 ████████░░░░░░░░░░░░ 42% 415.7k/1.0M ~24 turns left $2.34 12m 0x compact #a1b2c3d4
1001011 ai-toolbox main +42 -17 18 turns 5 files 0 err 82% cache 4x think ~$0.13/turn
0110010 read statusline.py edit statusline.py bash python3 edit README.md statusline.py×3 README.md×1

Everything you need to see inside Claude Code

████░░ 42%

Statusline

Real-time status bar showing context usage, cost, cache ratio, turn count, git diff, tool trace, and matrix rain animation. Two modes: full (3-line) and compact (1-line).

>_ monitor

Live Monitor

Dashboard in a separate terminal with live stats, scrollable log viewer with filters, session browser, settings panel, and export. Auto-detects and follows active sessions.

$0.00 → $∞

Session Stats

Post-session analytics with cost breakdown, token usage sparkline, tool usage chart, file activity heatmap, and multi-session summaries.

ls sessions/*

Session Manager

Browse, search, compare, resume, and export Claude Code sessions. Diff two sessions side-by-side to compare cost, duration, and activity.

on:edit → run

Hooks

Automatic context injected into sessions — file activity heatmap on start, reverse dependency warnings after edits, high churn alerts before edits.

⇄ proxy

API Sniffer

Transparent proxy that intercepts all API calls. See tokens, cost, latency, cache ratio, content block types, sub-agent tracking, and compaction detection in real-time.

/tui:*

Slash Commands

In-session analytics on demand: /tui:session /tui:cost /tui:perf /tui:context for deep reports without leaving Claude Code.

Statusline

Real-time status bar with everything you need at a glance

Full mode (3-line):
Opus 4.6 ████████████████░░░░ 78% 755.2k/1.0M ~8 turns left $12.47 2h 10m 1x compact
my-app feature/auth +120 -45 56 turns 12 files 78% cache
read auth.ts edit auth.ts bash npm test auth.ts×2
Compact mode (1-line):
Opus 4.6 ████████████████░░░░ 78% 755.2k/1.0M $12.47 2h 10m 56 turns 1xcompact

Live Monitor

Full-screen dashboard in a separate terminal — run claudetui monitor

claudetui monitor
10101111010111101011110101111010111101011110101111010111101011110101111010111101
────────────────────────────────────────────────────────────────────────────────
claude-opus-4-6 #a1b2c3d4 2h 15m 30s ACTIVE
CONTEXT
████████████████░░░░░░░░░░░░░░░░░░░░░░░░ 40.2% 402.0k/1.0M
▃▃▄▅▅▆▇▇▇↓↓▄▄▄▅▅▅▆▇▇▃▃▃▄▄▄▄▅▆▆▇▇▄▄▅▆▆▇▇▇▃▃▄▄▄▅▅▅▅▆▆▆▇▇▇
Compactions: 6 Turns left: ~5 Since compact: 4
COST
$248.46 total ~$1.10/turn $0.15/min $2013.62 saved
Input: $0.03 Cache: $223.74 Output: $24.69
██████████████████████████████████████████████████
input 0% cache 100% output 0%
CURRENT
3 tools Bash:2 Write:1
bash ls bash mkdir write index.html index.html×1
index.html(0r/1e)
0 errors 1 thinking
SESSION
226 turns 833 tools Edit:278 Read:218 Bash:197
monitor.py(120r/102e) statusline.py(87r/79e) README.md(45r/84e)
15 errors 59 thinking (4%) 99% cache 3 agents
LOG
14:22:10 grep CLAUDE.md
14:22:45 $ git diff --cached --stat
14:23:01 $ git add README.md install.sh && git commit
14:23:15 $ git push
14:30:22 compaction #6
14:31:50 $ ls docs/ && mkdir -p docs
14:33:12 write index.html
────────────────────────────────────────────────────────────────────────────────
stats details log export sessions config ?help quit

Session Stats

Post-session analytics and multi-session summaries

$ claudetui stats
$ claudetui stats --days 7 -s
Session Summary (6 sessions)
──────────────────────────────────────────────────────────────────
ID Date Duration Cost Turns Compact Model
──────────────────────────────────────────────────────────────────
a1b2c3d4 2026-03-08 45m $ 2.31 34 0 opus 4 6
e5f6a7b8 2026-03-07 2h 10m $ 12.47 156 1 sonnet 4 6
c9d0e1f2 2026-03-04 18m $ 0.52 12 0 opus 4 6
──────────────────────────────────────────────────────────────────
Total 13h 20m $ 97.79

API Sniffer

Intercept every API call between Claude Code and Anthropic — run claudetui sniffer

$ claudetui sniffer # Terminal 1: start proxy
$ claudetui sniff # Terminal 2: launch Claude through it
#1 POST /v1/messages opus-4-6 132.6k->459 $0.237 25632ms 484.5KB/12.2KB 100%c [Tt]
#2 POST /v1/messages opus-4-6 133.1k->422 $0.239 13451ms 486.7KB/22.2KB 100%c [U] Agent
#3 POST /v1/messages haiku-4-5 15.4k->258 $0.016 2018ms 55.4KB/9.3KB 0%c [tUUUU] Read,Read,Read,Read +agent.1
#4 POST /v1/messages opus-4-6 134.5k->211 $0.242 16162ms 491.5KB/11.3KB 99%c [tU] Read
#5 POST /v1/messages opus-4-6 49.8k->1.1k $0.653 26245ms 177.6KB/16.6KB 42%c [TtU] Read compaction

Hooks

Automatic context injected into your sessions

Session start — file activity heatmap:
📊 File hotspots (last 14 days, 8 sessions):
███ src/config.ts (43e/12r)
▆▆▆ src/pages/dashboard/index.vue (39e/8r)
▅▅▅ src/locales/en.json (21e/15r)
After editing — reverse dependency check:
⚠️ 4 file(s) depend on validation.ts:
app/composables/useAuth.ts
app/composables/useNotifications.ts
Before editing — high churn warning:
🔥 High churn: config.ts edited 43 times across 5 sessions

Quick Start

Step 1

Install

# Homebrew (macOS)
brew tap slima4/claude-tui && brew install claude-tui
claudetui setup

# macOS / Linux / WSL
curl -sSL https://raw.githubusercontent.com/slima4/claude-tui/main/install.sh | bash
Step 2

Use Claude Code

# Statusline and hooks work automatically
claude

# Open a second terminal for live monitor
claudetui monitor
Step 3

Explore

# Inside Claude Code
/tui:session
/tui:cost

# After a session
claudetui stats
claudetui sessions list

Uninstall

Clean removal of all settings, hooks, and commands

# Homebrew
claudetui uninstall
brew uninstall claude-tui
# Already ran brew uninstall first?
curl -sSL https://raw.githubusercontent.com/slima4/claude-tui/main/uninstall.sh | bash