Zero-dependency real-time Claude Code usage monitor
Project description
cwatch
Real-time Claude Code usage monitor. Zero dependencies.
pip install cwatch
cwatch
──────────────────────────────────────────────────────────
CLAUDE CODE · USAGE MONITOR
──────────────────────────────────────────────────────────
5-hour session
[████████████░░░░░░░░░░░░░] 48% reset in 2h 31m (18:00:00)
7-day window
[████░░░░░░░░░░░░░░░░░░░░░] 18% reset in 4d 12h (Sat 00:00)
──────────────────────────────────────────────────────────
Updated 15:28:43 · Ctrl+C to exit
Why cwatch?
| cwatch | claude-monitor | |
|---|---|---|
| Dependencies | zero (stdlib only) | Rich, Pydantic, pytz… |
| Data source | live OAuth API | local JSONL files |
| Install | pip install cwatch |
requires ccusage (npm) + pip |
| Python | 3.9+ | 3.9+ |
cwatch reads the same internal API endpoint that Claude Code itself uses — numbers are exact and real-time, no token-counting heuristics.
Install
pip install cwatch
# or isolated (recommended)
pipx install cwatch
uv tool install cwatch
Requires: Python 3.9+ and having run claude login at least once.
Usage
cwatch # live dashboard, refresh every 60s
cwatch --interval 30 # faster refresh
cwatch --once # one compact line, then exit
cwatch --json # raw API JSON dump
cwatch --token sk-ant-oat01-… # explicit token
CLAUDE_TOKEN=sk-… cwatch # token via env var
tmux statusline
set -g status-right "#(cwatch --once) %H:%M"
set -g status-interval 60
How it works
Calls GET https://api.anthropic.com/api/oauth/usage with your Claude Code
OAuth token (read from macOS Keychain, ~/.claude/.credentials.json, or
CLAUDE_TOKEN env var).
Python API
from cwatch.credentials import get_token
from cwatch.api import fetch
data = fetch(get_token())
print(f"5h session: {data.five_hour.pct}% resets in {data.five_hour.time_until_reset}")
Contributing
PRs welcome. Please keep the zero-dependencies constraint.
git clone https://github.com/YOUR_USER/cwatch && cd cwatch
pip install -e . && pytest
License
MIT © 2026
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 cwatch_monitor-0.3.4.tar.gz.
File metadata
- Download URL: cwatch_monitor-0.3.4.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4fbaf4a2ae8091909efc807267f54e3528d1eccd5b6a0ac92262b949ba8890f6
|
|
| MD5 |
a3168e14c6ca3d9caf6076e6ae37273c
|
|
| BLAKE2b-256 |
a01dc445c0738730a2f614f81470f73123e328986c9258cc988badbc346e11da
|
File details
Details for the file cwatch_monitor-0.3.4-py3-none-any.whl.
File metadata
- Download URL: cwatch_monitor-0.3.4-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41f5a5f596c9c6785dea2b041e811cd74e213c8bc982ad557e042110b878455e
|
|
| MD5 |
f5a50867bae5bb6af3202805e76433df
|
|
| BLAKE2b-256 |
c88d729edaa948fc59af525be89a682421df45ea27a2a8edb44d0920178e8936
|