๐ V3 Statusline
/docs/core-features/v3-statusline
Real-time development status display integrated directly into Claude Code's status bar. Shows DDD progress, swarm activity, security status, AgentDB metrics, and live session data (model, context usage, cost).
How It Works:
Claude Code pipes JSON session data via stdin to the statusline script after each assistant message (debounced ~300ms). The script reads this data and combines it with local project metrics to produce a single-line status output.
Output Format:
โ Ruflo V3 โ ruvnet โ โ main โ Opus 4.6 | โ42% ctx | $0.15 ๐๏ธ DDD [โโโโโ] 4/5 โก HNSW 150x ๐ค โ [12/8] ๐ฅ 3 ๐ข CVE 3/3 ๐พ 512MB ๐ง 15% ๐ฆ AgentDB โ1.2K vectors
| Indicator | Description | Source |
|---|---|---|
โ Ruflo V3 | Project header | Always shown |
โ ruvnet | GitHub user | gh api user CLI |
โ main | Current git branch | git branch --show-current |
Opus 4.6 | Claude model name | Stdin JSON model.display_name |
โ42% ctx | Context window usage | Stdin JSON context_window.used_percentage |
$0.15 | Session cost | Stdin JSON cost.total_cost_usd |
[โโโโโ] | DDD domain progress bar | .claude-flow/metrics/v3-progress.json |
โก HNSW 150x | HNSW search speedup | AgentDB file stats |
โ/โ | Swarm coordination status | Process detection |
[12/8] | Active agents / max agents | ps aux process count |
๐ฅ 3 | Sub-agents spawned | Task tool agent count |
๐ข CVE 3/3 | Security CVE remediation | .claude-flow/security/audit-status.json |
๐พ 512MB | Memory usage | Node.js process RSS |
๐ง 15% | Intelligence score | Pattern count from AgentDB |
๐ฆ AgentDB โ1.2K | AgentDB vector count | File size estimate (size / 2KB) |
Customizing the cost segment:
cost.total_cost_usd is a client-side estimate from Claude Code that may differ from your actual bill and, on subscription plans, does not reflect out-of-pocket spend. Two environment variables let you relabel or remove the segment (the default is unchanged):
| Variable | Effect | Example |
|---|---|---|
RUFLO_STATUSLINE_COST_SYMBOL | Overrides the leading $. Set to an empty string to show the number alone. | RUFLO_STATUSLINE_COST_SYMBOL=โก โ โก1.30 |
RUFLO_STATUSLINE_HIDE_COST | 1/true/yes/on removes the segment entirely. | RUFLO_STATUSLINE_HIDE_COST=1 |
Set them in the env block of .claude/settings.json โ Claude Code applies it to every session and to the statusline subprocess, and unlike hand-editing the helper it survives npx ruflo@latest init --update:
json{ "statusLine": { "type": "command", "command": "node .claude/helpers/statusline.cjs" }, "env": { "RUFLO_STATUSLINE_COST_SYMBOL": "โก" } }
Or export them in your shell profile before launching Claude Code:
bashexport RUFLO_STATUSLINE_COST_SYMBOL=โก # or: export RUFLO_STATUSLINE_HIDE_COST=1
Setup (Automatic):
Run npx ruflo@latest init โ this generates .claude/settings.json with the correct statusline config and creates the helper script at .claude/helpers/statusline.cjs.
The generated config uses a fast local script (no npx cold-start):
json{ "statusLine": { "type": "command", "command": "node .claude/helpers/statusline.cjs" } }
Note: Only
type,command, andpaddingare valid statusLine fields. Do not addrefreshMs,enabled, or other fields โ Claude Code will ignore them.
For Existing Users:
If your statusline is not updating, run the upgrade command to regenerate helpers and fix the config:
bashnpx ruflo@latest init --update --settings
This removes invalid config fields and regenerates the statusline helper with stdin support.
Stdin JSON Protocol:
Claude Code provides session data via stdin in this format:
json{ "model": { "display_name": "Opus 4.6" }, "context_window": { "used_percentage": 42, "remaining_percentage": 58 }, "cost": { "total_cost_usd": 0.15, "total_duration_ms": 45000 }, "workspace": { "current_dir": "/path/to/project" }, "session_id": "abc-123" }
The statusline script reads stdin synchronously, falls back to local detection when run manually (TTY mode).
Data Sources:
- Stdin JSON โ Model name, context %, cost, duration (from Claude Code)
.claude-flow/metrics/v3-progress.jsonโ DDD domain progress.claude-flow/metrics/swarm-activity.jsonโ Active agent counts.claude-flow/security/audit-status.jsonโ CVE remediation status- AgentDB files โ Vector count (estimated from file size), HNSW index status
- Process detection via
ps auxโ Real-time memory and agent counts - Git branch via
git branch --show-current - GitHub user via
gh api user