Setup Guide

Get your Claude OAuth token in under a minute.

1

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.

2

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.

3

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.

4

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

The command returns nothing or an error

Make sure you've run claude in Terminal and signed in at least once. The credentials are only created after you authenticate.

Token validation failed

Your token may have expired. Run claude in Terminal to refresh your authentication, then extract a new token.

"Keychain access denied" error

When prompted by macOS, click "Always Allow" to let Terminal access your Claude Code credentials in the Keychain.

I don't have python3

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: