Platform Requirements
To ensure your custom statusline functions correctly—especially the real-time usage tracking and rate limit blocks—your system must meet certain base requirements and platform-specific dependencies.
Core Dependencies
The generated statusline is a Bash script. To run it, your environment must have the following utilities installed and available in your $PATH:
- Bash 4.0+: The primary shell environment for the script.
- jq: Used to parse the JSON data provided by Claude Code and the Anthropic API.
- python3: Used for high-precision time calculations (reset countdowns) and OAuth token extraction.
- curl: Required to fetch usage data from the Anthropic API.
Usage Tracking Requirements
If you enable the Rate 5h or Rate Week blocks, the script must access your Claude Code OAuth tokens to authenticate with the Anthropic API. These tokens are stored in your system's native credential manager.
Depending on your operating system, you may need to install an additional helper:
macOS
No additional installation is required. The script uses the native /usr/bin/security utility to access the macOS Keychain.
Linux / WSL
The script relies on libsecret to communicate with the GNOME Keyring or KWallet. You must install the secret-tool utility.
Ubuntu/Debian/WSL:
sudo apt update
sudo apt install libsecret-tools
Fedora:
sudo dnf install libsecret
Arch Linux:
sudo pacman -S libsecret
Windows (Git Bash / MSYS2)
When running Claude Code inside Git Bash or MSYS2, the script attempts to access the Windows Credential Manager via PowerShell. For this to work reliably, you should ensure the CredentialManager module is available in PowerShell.
Open PowerShell as Administrator and run:
Install-Module -Name CredentialManager -Force -Scope CurrentUser
Connectivity & Caching
- API Access: The script connects to
https://api.anthropic.com. If you are behind a corporate proxy, ensurecurlis configured to bypass it or use your proxy settings. - Local Cache: To prevent terminal lag, the script caches usage data at
~/.claude/.usage-cache.json. This file is updated at most once every 2 minutes. The script requires write permissions to the~/.claude/directory.
Permission Setup
After downloading or copying your generated script, you must grant it execution permissions:
chmod +x ~/.claude/statusline.sh