Use Claude Pro/Max subscriptions in OpenCode 1 and 2 with @cortexkit/opencode-anthropic-auth, or in Pi with @cortexkit/pi-anthropic-auth. Both integrations use the shared @cortexkit/anthropic-auth-core package.
- Multiple Claude accounts with ordered fallbacks, quota-aware routing and per-session account affinity.
- Prompt-cache controls and optional cache keepalive for active sessions.
- Optional Claustrum integration: Claustrum is a local credential-vault service that supplies Claude accounts instead of each application's local account pool.
- An optional user-owned Cloudflare relay to reduce repeated request uploads.
This project is not affiliated with or endorsed by Anthropic. Using Claude subscriptions outside Anthropic's official clients may violate Anthropic's terms and can lead to account restrictions or suspension. Use it at your own risk.
bunx @cortexkit/opencode-anthropic-auth setupAfter setup:
OpenCode 1: open /claude → Accounts to sign in.
OpenCode 2: In OpenCode, sign in to Anthropic with "Claude Pro / Max (native account pool)".
Pi: open /claude and use Start OAuth sign-in, then Finish OAuth sign-in.
- Installation, configuration and manual registration
- Features and host support
- Models, thinking and fast mode
- Accounts, routing and quota
- Settings and routing reference
- Vault custody
- Credential custody contract
- Commands and menus
- Cache, keepalive and quota priming
- Cache diagnostics
- OpenCode 2
- OpenCode sidebar and TUI preferences
- Environment variables
- Request rewriting and safety fallback
- Transports and request diagnostics
- Troubleshooting
- Development
- Build modes
- Upgrades, recovery and releases