Display Claude.ai plan usage as ASCII meters in the terminal
Project description
claude-meter
Display your Claude.ai plan usage as ASCII meters in the terminal.
Installation
pip install claude-meter
Authentication
claude-meter needs an OAuth token to query your Claude.ai usage. It looks for
credentials in the following order:
CLAUDE_CODE_OAUTH_TOKENenvironment variable — if set, this value is used directly as the Bearer token.~/.claude/.credentials.json— the file created automatically when you log in with Claude Code. The tool reads theclaudeAiOauth.accessTokenfield from this file.
Using Claude Code credentials (recommended)
If you already use Claude Code, no extra setup is needed — just make sure you are logged in:
claude # log in if prompted
The credentials file is created at ~/.claude/.credentials.json and
claude-meter will pick it up automatically.
Using an environment variable
If you prefer to supply the token yourself, export it before running the command:
export CLAUDE_CODE_OAUTH_TOKEN="your-token-here"
claude-meter
This is useful in CI, scripts, or environments where Claude Code is not installed.
Usage
Show usage and refresh every 30 seconds (default):
claude-meter
Show usage once and exit:
claude-meter --update-period 0
Refresh every 5 seconds:
claude-meter --update-period 5
Example Output
Claude Meter
--------------------------------------------------
5-Hour Session
[========> ] 27.0% (resets in 3h 42m)
7-Day Weekly
[===========> ] 35.0% (resets in 4d 2h)
7-Day Opus
[ ] 0.0% (no reset scheduled)
Options
| Option | Default | Description |
|---|---|---|
--update-period |
30 |
Refresh interval in seconds. Use 0 to display once and exit. |
--no-color |
Disable colors and emojis. | |
--filter TEXT |
Show only limits whose name contains TEXT (case-insensitive). | |
--sort |
Sort limits by utilization descending. | |
--json |
Output limits as JSON. | |
--version |
Show version and exit. | |
--help |
Show help and exit. |
Source
GitHub: https://github.com/breed/claude-meter
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file claude_meter-0.2.0.tar.gz.
File metadata
- Download URL: claude_meter-0.2.0.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d85fd576bb5c1e0be50777873413c8bac291e2932929498b2542083165cdd7fe
|
|
| MD5 |
e93ada8fd9a4f08ed2fb679876eab447
|
|
| BLAKE2b-256 |
6adb472d61be341f08cd773ac00da9175d706d457a9a3254bb9296bc97660ed6
|
File details
Details for the file claude_meter-0.2.0-py3-none-any.whl.
File metadata
- Download URL: claude_meter-0.2.0-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a17c19c5e0655fbd51a1d36855ac587f086c9018b0e9a428cba122c2c47c9d3
|
|
| MD5 |
2549bc08de1c4acac69339884b4217c7
|
|
| BLAKE2b-256 |
40c96e87123616e531e978e12ab72fc310e103cc82fae53d39dccf3fbac7d6b4
|