✓ Verified 💻 Development ✓ Enhanced Data

Claude Usage Checker

Check Claude Code / Claude Max usage limits.

Rating
4.4 (216 reviews)
Downloads
782 downloads
Version
1.0.0

Overview

Check Claude Code / Claude Max usage limits.

Complete Documentation

View Source →

Claude Usage Checker

Launches the Claude CLI interactively (PTY) and reads the /usage output to report your Claude Code / Claude Max quota.

Prerequisites

  • Claude CLI must be installed (npm i -g @anthropic-ai/claude-code) and logged in
  • If running claude shows "Missing API key", the user must log in manually first: open a terminal, run claude, and complete the browser login flow
  • Requires an interactive PTY — the agent will launch a local process and read its output (quota info only)

Steps

  • Launch claude with PTY
  • Wait for the welcome screen (poll until it appears)
  • Send /usage + Enter
  • Read the output (poll until usage data appears)
  • Close with Escape then /exit
  • Report the results

Commands

bash
# Launch claude with PTY
exec pty=true command="claude"

# Wait and check log
process action=poll sessionId=XXX timeout=5000

# Send /usage
process action=send-keys sessionId=XXX literal="/usage"
process action=send-keys sessionId=XXX keys=["Enter"]

# Read output
process action=poll sessionId=XXX timeout=5000

# Exit
process action=send-keys sessionId=XXX keys=["Escape"]
process action=send-keys sessionId=XXX literal="/exit"
process action=send-keys sessionId=XXX keys=["Enter"]

Notes

  • If you see "Missing API key" → tell the user to log in; browser-based login won't work headlessly
  • Allow a few seconds between polls — Claude CLI starts slowly
  • "Current week" = weekly reset, not daily

Output Format

Report in a table:

UsageResets
Current sessionX% usedtoday at HH:MM (timezone)
Weekly (all models)X% usedHH:MM (timezone)
Weekly (Sonnet only)X% usedHH:MM (timezone)
Extra usageX% used / $X of $Y spentdate (timezone)
Always show reset times. The CLI displays them as "Resets Xpm" — convert to HH:MM format.

Installation

Terminal bash

openclaw install claude-usage-checker
    
Copied!

💻Code Examples

example.sh
# Launch claude with PTY
exec pty=true command="claude"

# Wait and check log
process action=poll sessionId=XXX timeout=5000

# Send /usage
process action=send-keys sessionId=XXX literal="/usage"
process action=send-keys sessionId=XXX keys=["Enter"]

# Read output
process action=poll sessionId=XXX timeout=5000

# Exit
process action=send-keys sessionId=XXX keys=["Escape"]
process action=send-keys sessionId=XXX literal="/exit"
process action=send-keys sessionId=XXX keys=["Enter"]

Tags

#ai_and-llms #code

Quick Info

Category Development
Model Claude 3.5
Complexity One-Click
Author aligurelli
Last Updated 3/10/2026
🚀
Optimized for
Claude 3.5
🧠

Ready to Install?

Get started with this skill in seconds

openclaw install claude-usage-checker