Created
September 20, 2026 17:38
-
-
Save calebpower/d3c8c4ef6785a097137aca3610ce4ddb to your computer and use it in GitHub Desktop.
Claude Usage Oracle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/local/bin/bash | |
| TOKEN=$(jq -r '.claudeAiOauth.accessToken' ~/.claude/.credentials.json) | |
| curl -s https://api.anthropic.com/api/oauth/usage \ | |
| -H "Authorization: Bearer $TOKEN" -H "anthropic-beta: oauth-2025-04-20" \ | |
| | jq -rc '.limits[] | select(.kind != "session") | {model: .scope.model.display_name // "all", percent: .percent, resets_at: .resets_at}' |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Good for giving long-running agents a window into their own usage.