Skip to main content

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

Metadata

Release files for cwatch-monitor 0.5.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cwatch-monitor 0.5.2
File Size Uploaded
cwatch_monitor-0.5.2.tar.gz 13.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cwatch-monitor 0.5.2
File Interpreter ABI Platform
cwatch_monitor-0.5.2-py3-none-any.whl Python 3 none any Details

Total release size: 29.1 kB

Release files / cwatch_monitor-0.5.2.tar.gz

Download URL cwatch_monitor-0.5.2.tar.gz
Size 13.6 kB
Tags Source
SHA-256 checksum
How to use checksums
580ab9ea355ea5591a4388403e6b4f88986de90873ae8ef7facd5d85cbf3ef34
BLAKE2b-256 checksum
How to use checksums
4811905f1ffa4bdbcbf9fc6e1d0a31d6ae64279e9c4a8057973a9e930e985c2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / cwatch_monitor-0.5.2-py3-none-any.whl

Download URL cwatch_monitor-0.5.2-py3-none-any.whl
Size 15.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
707db74b378ccc61158901a93f2ba6d6b5f62cf72a441a2bb5341e11755a6018
BLAKE2b-256 checksum
How to use checksums
02afcf3b25a4b394e8b4708e36fdb83cdee506befcc1582c7d5b46f923a8b51b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.5.2 This release

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page