pi-anthropic-oauth
v0.1.13
Published
Claude Pro/Max OAuth extension for Pi
Downloads
370
Readme
pi-anthropic-oauth
Use Claude Pro/Max in Pi with browser OAuth.
Features
- Claude Pro/Max login from
/login anthropic - Automatic token refresh
- Claude Code-compatible OAuth headers and prompt shaping
- No API key or extra usage needed.
- Uses Pi's Anthropic model registry
- Adds Claude Opus 4.8 by default
- Auto-creates
~/.Claude Code→~/.pisymlink when missing
Quick start
pi install npm:pi-anthropic-oauthStart Pi, then run:
/login anthropicChoose:
Claude Pro/Max[!WARNING] Use at your own risk. This may go against Anthropic's terms.
[!NOTE] Anthropic auth changes are closely monitored for quick compatibility updates.
Extra models
To add another Anthropic model, create ~/.pi/agent/models.json:
{
"providers": {
"anthropic": {
"baseUrl": "https://api.anthropic.com",
"apiKey": "REQUIRED_BY_PI_FOR_CUSTOM_MODELS",
"api": "anthropic-messages",
"models": [
{
"id": "your-model-id",
"name": "Your Model Name"
}
]
}
}
}[!NOTE] Pi requires
baseUrl,apiKey, andapiwhen defining custom models inmodels.json. With this extension, requests normally authenticate through Claude Pro/Max OAuth after/login anthropic, soapiKeyis present to satisfy Pi's config requirements and does not need to be a valid Anthropic API key.
Troubleshooting
- Re-run
/login anthropicif auth looks stale - If local callback login does not complete, paste the final callback URL or
code#statewhen prompted - If something breaks, please open an issue with your Pi version, extension version, and error output
License
MIT
