Setup Guide
Get your Claude OAuth token in under a minute.
Make sure Claude Code is installed
You need to have Claude Code CLI installed and signed in. If you haven't done this yet:
npm install -g @anthropic-ai/claude-code && claude
Follow the prompts to sign in with your Anthropic account.
Copy your token extraction command
Open Terminal and paste this command:
security find-generic-password -s "Claude Code-credentials" -w 2>/dev/null | python3 -c "import sys,json; d=json.loads(sys.stdin.read()); print(d.get('claudeAiOauth',{}).get('accessToken',''))"
This command reads your Claude Code credentials from the macOS Keychain and extracts the OAuth token.
Copy the output
The command will output a long string starting with sk-ant-. This is your OAuth token.
Example output: sk-ant-oauthXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...
Select and copy the entire token.
Paste into Claude Code Battery
Go back to the Claude Code Battery setup window and paste your token. Click "Connect" to validate and save.
That's it! Your usage should appear in the menu bar within seconds.
Security note: Your token is stored securely in your Mac's Keychain. It never leaves your device except to fetch your usage from Anthropic's API.
Troubleshooting
Make sure you've run claude in Terminal and signed in at least once. The credentials are only created after you authenticate.
Your token may have expired. Run claude in Terminal to refresh your authentication, then extract a new token.
When prompted by macOS, click "Always Allow" to let Terminal access your Claude Code credentials in the Keychain.
Python 3 comes pre-installed on macOS Ventura and later. If you're on an older system, you can install it via Homebrew: brew install python3
Need More Help?
If you're still having trouble, please:
- Check the GitHub Issues for known problems
- Open a new issue with details about your setup
- Email us at [email protected]