claude-statusline
Claude Code Statusline
A Claude Code statusline in pure Crystal - no jq, no subshells, no dependencies. Reads the status hook payload on stdin and prints:
Opus 5 | effort: high | ctx: ▰▰▰▰▱▱▱▱▱▱ 45% | 5h: ▰▰▰▰▰▰▰▱▱▱ 72% | 7d: ▰▰▰▰▰▰▰▰▰▱ 95%
The model and reasoning effort - context, 5h- and 7d usage as colored progress bars. The filled segments are green below 70%, yellow from 70%, red from 90%; the remaining track is dim.
MacOS Installation
brew install bitmand/tap/claude-statusline
Point Claude Code at it in ~/.claude/settings.json:
{
"statusLine": {
"type": "command",
"command": "/opt/homebrew/bin/claude-statusline"
}
}
Linux Installation
With Homebrew on Linux:
brew install bitmand/tap/claude-statusline
Or download a binary from releases - x86_64 and arm64 available and no runtime dependencies:
# pick the tarball for your arch, and grab the checksums alongside it
curl -fsSLO https://github.com/bitmand/claude-statusline/releases/download/v1.2.3/claude-statusline-v1.2.3-linux-x86_64.tar.gz
curl -fsSLO https://github.com/bitmand/claude-statusline/releases/download/v1.2.3/SHA256SUMS.txt
sha256sum --ignore-missing -c SHA256SUMS.txt
tar -xzf claude-statusline-v1.2.3-linux-x86_64.tar.gz
sudo install -m 755 claude-statusline-v1.2.3-linux-x86_64/claude-statusline /usr/local/bin/
Point Claude Code at it in ~/.claude/settings.json - Homebrew installs it to /home/linuxbrew/.linuxbrew/bin/claude-statusline:
{
"statusLine": {
"type": "command",
"command": "/usr/local/bin/claude-statusline"
}
}
Build
With Crystal installed, build the binary:
shards build --release
Then point Claude Code at it in ~/.claude/settings.json:
{
"statusLine": {
"type": "command",
"command": "/absolute/path/to/claude-statusline/bin/claude-statusline"
}
}
Usage
The binary reads the JSON payload on stdin and writes one line to stdout:
echo '{"model":{"display_name":"Opus 5"},"context_window":{"used_percentage":45}}' \
| ./bin/claude-statusline
Every field is optional — missing or null values simply omit their section, and an unparseable payload degrades to unknown rather than failing the hook.
--version (or -v) prints the version and exits without reading stdin:
claude-statusline --version
Development
crystal spec # run the tests
crystal tool format # format
Contributing
- Fork it (https://github.com/bitmand/claude-statusline/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- Lasse Brandt Thomsen - creator and maintainer
claude-statusline
- 1
- 0
- 0
- 0
- 0
- 43 minutes ago
- November 29, 2026
MIT License
Sun, 29 Nov 2026 12:39:06 GMT