The first Claude Code statusline with real-time GPU & system monitoring
Pure Bash ยท Zero Dependencies ยท Windows-Native ยท CJK-Aware
RigLine is a pure Bash status line for Claude Code that monitors your machine's vital signs alongside your coding session. Built for AI/ML developers who want to keep an eye on their GPU, VRAM, CPU, and RAM while working with Claude.
No npm. No pip. No Go. No Rust. No Deno. Just Bash and jq.
โฆ MODEL Claude Opus 4.8 ยท โ DIR ~/projects ยท โ GIT main
โ CPU 12% ยท โฌข GPU 8% ยท โฌก VRAM 3.8G/11.9G ยท โ TEMP 48C ยท โ RAM 20.1G/31.5G
โ CTX 62% ยท โ CACHE 40% ยท โ
TDK 45k^ 8.2kv ยท โท TIME 5m ยท โ TIP Keep shipping!
ctx โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 62% used
- ๐ฎ GPU Monitoring โ utilization, VRAM usage, and temperature via
nvidia-smi - ๐ป CPU & RAM โ real-time usage with precise formatting
- ๐ Context Window โ visual progress bar with color thresholds (green โ yellow โ red)
- ๐ฐ Token Tracking โ input/output tokens with smart formatting (k/m)
- โฑ๏ธ Session Timer โ know how long you've been working
- ๐ฟ Git Integration โ branch name with dirty-state indicator (
*) - ๐ง CJK-Aware โ proper display width handling for Chinese/Japanese/Korean characters
- ๐จ N-width Icons โ every icon is guaranteed single-width, perfectly aligned on East Asian terminals
- ๐ Zero Dependencies โ only needs
bash,nvidia-smi(optional), andjq - ๐ช Windows-Native โ PowerShell-based system metrics, works out of the box on Windows 11
curl -fsSL https://raw.githubusercontent.com/ZhouYinLong-lab/Dog-RigLine/main/install.sh | bash# Clone the repo
git clone https://github.com/ZhouYinLong-lab/Dog-RigLine.git ~/.claude/rigline
# Add to Claude Code config (~/.claude/settings.json)
jq '.statusLine = {"type": "command", "command": "bash ~/.claude/rigline/rigline.sh"}' \
~/.claude/settings.json > /tmp/cfg.json && mv /tmp/cfg.json ~/.claude/settings.jsonThen restart Claude Code to see your new status line.
| Component | Required? | Purpose |
|---|---|---|
bash 4+ |
โ Required | Script runtime |
jq |
โ Required | JSON parsing (Claude Code sends status as JSON) |
nvidia-smi |
GPU metrics (shows N/A if not available) |
|
powershell |
๐ช Windows only | CPU/RAM metrics via Get-CimInstance |
git |
Branch name display (shows no-git if not in a repo) |
Once installed, RigLine runs automatically as your Claude Code status line. There's nothing to launch โ it appears at the bottom of every Claude Code session.
Customize RigLine's behavior by setting these environment variables before launching Claude Code:
| Variable | Default | Description |
|---|---|---|
RIGLINE_TIP |
ไฟๆๆญฃๅฟต๏ผ |
The motivational tip shown on line 3 (supports CJK) |
RIGLINE_BAR_WIDTH |
30 |
Width of the context window progress bar in characters |
NO_COLOR |
(unset) | Set to any value to disable all ANSI color output |
Examples:
# Change the tip message (macOS/Linux)
export RIGLINE_TIP="Ship it! ๐"
# Change the tip message (Windows PowerShell)
$env:RIGLINE_TIP = "Stay focused!"
# Wider progress bar
export RIGLINE_BAR_WIDTH=40
# Disable colors (useful for light terminals)
export NO_COLOR=1RigLine renders 4 lines, refreshed every time Claude Code updates:
| Line | Content |
|---|---|
| Line 1 | Model name ยท Working directory ยท Git branch |
| Line 2 | CPU usage ยท GPU utilization ยท VRAM usage ยท GPU temp ยท RAM usage |
| Line 3 | Context % ยท Cache hit rate ยท Tokens in/out ยท Session time ยท Tip |
| Line 4 | Context window progress bar with percentage |
The context window progress bar changes color automatically:
- ๐ข Green โ 0โ59% (healthy, plenty of room)
- ๐ก Yellow โ 60โ79% (getting full, consider
/compact) - ๐ด Red โ 80โ100% (almost full, run
/compactsoon)
Edit the C_* variables at the top of rigline.sh to change any color. Colors use 256-color ANSI codes (values 0โ255):
C_MINT=$'\033[38;5;121m' # CPU, Context โ change 121 to any 256-color index
C_PURPLE=$'\033[38;5;183m' # GPU
C_YELLOW=$'\033[38;5;221m' # VRAM, Cache
C_PEACH=$'\033[38;5;216m' # Temp, Model, TIP
C_BLUE=$'\033[38;5;117m' # RAM, Time
C_GREEN=$'\033[38;5;114m' # Bar (low) โ edit bar() thresholds too
C_RED=$'\033[38;5;203m' # Bar (high)
C_MUTED=$'\033[38;5;245m' # Separator dots
C_TEXT=$'\033[38;5;230m' # Metric values๐ก Want different icons? Check out
icons.mdโ 130+ N-width Unicode icons across 13 slots with 5 ready-to-use theme presets.
# Remove the script
rm -rf ~/.claude/rigline
# Remove from Claude Code config
jq 'del(.statusLine)' ~/.claude/settings.json > /tmp/cfg.json && mv /tmp/cfg.json ~/.claude/settings.jsonMake sure git is in your PATH and you're in a git worktree. RigLine reads the working directory from Claude Code's JSON input โ it uses the project directory, not your shell's $PWD.
- Make sure
nvidia-smiis installed and working: runnvidia-smiin a terminal - If you don't have an NVIDIA GPU, the N/A display is expected
- AMD GPUs and Apple Silicon are not yet supported (contributions welcome!)
PowerShell must be available. If you're using Git Bash, make sure powershell.exe is in your PATH.
RigLine uses manual width calculation for CJK text. If your terminal uses a font where CJK characters are not exactly 2ร width, you may see slight misalignment. Try a patched Cascadia Code or Hack font.
Set NO_COLOR=1 before launching Claude Code to disable colors entirely.
A rig is what AI/ML developers call their GPU workstations. RigLine monitors your rig while you build.
| Project | Language | GPU Monitor | CJK Support | Zero Deps |
|---|---|---|---|---|
| RigLine | Bash | โ | โ | โ |
| ccstatusline | Node.js | โ | โ | โ |
| claude-statusline | Go | โ | โ | โ |
| cc-statusline | Rust | โ | โ | โ |
| c-c-statusline | Deno | โ | โ | โ |
RigLine includes a snapshot test suite:
# Run all tests
bash test/run.sh
# Update snapshots after intentional changes
bash test/run.sh --updateTests cover: normal input, empty JSON, boundary values (150% ctx, 999k tokens), malformed JSON, zero values, CJK paths, and small values. CI runs on Ubuntu, macOS, and Windows via GitHub Actions.
PRs welcome! Especially for:
- Linux/macOS native system metrics (
/proc/stat,sysctl,vm_stat) - AMD GPU support (
rocm-smi) - Apple Silicon GPU support
- Additional widgets (network I/O, disk usage, battery)
- Theme presets (dracula, solarized, tokyo-night)
dog-rigline/
โโโ rigline.sh # The status line script (~420 lines of pure Bash)
โโโ install.sh # One-line installer
โโโ icons.md # 130+ alternative icons with 5 theme presets
โโโ screenshot.png # Screenshot for the README
โโโ test/ # Snapshot test suite (7 fixtures + snapshots)
โ โโโ run.sh # Test runner (--update to regenerate)
โ โโโ fixtures/ # Known JSON inputs
โ โโโ snapshots/ # Expected ANSI output
โโโ .github/workflows/ci.yml # CI: lint + test on ubuntu/macOS/windows
โโโ .gitignore
โโโ .gitattributes
โโโ LICENSE # MIT License
โโโ README.md # You are here
MIT ยฉ 2025 ZhouYinLong-lab
Built with โค๏ธ for the AI/ML community
