Maki dynamic provider that reuses your existing Claude Code OAuth session — no separate Anthropic API key or browser login.
Inspired by pi-claude-auth.
- Claude Code installed and authenticated (
claudeat least once) - Maki installed
- Python 3
On macOS, credentials come from the Keychain entry Claude Code-credentials (and any Claude Code-credentials-* account variants). On Linux, ~/.claude/.credentials.json is used.
No clone required:
curl -fsSL https://raw.githubusercontent.com/arxdeus/maki-claude-oauth/main/install.sh | bashOr from a local checkout: ./install.sh.
Both install to ~/.config/maki/providers/claude-code. Override the download base with MAKI_CLAUDE_OAUTH_RAW if needed.
- Start a new Maki session (
/newor restart). - Open
/modeland select a model underclaude-code/...(catalog inherited from Anthropic). - If you have multiple Claude Code accounts:
maki auth login claude-codelogout only clears Maki’s account selection; it does not remove Claude Code credentials.
- Reads Claude Code OAuth tokens from Keychain or
~/.claude/.credentials.json - Refreshes via Anthropic’s OAuth endpoint when near expiry (Claude CLI fallback)
- Writes rotated tokens back so Claude Code and Maki stay in sync
- Sends Claude Code
system_prefixandanthropic-betaheaders on resolve
This provider does not inject Claude Code’s request-body billing header. Subscription vs API-credit billing may differ from the official Claude Code CLI.
| Problem | Fix |
|---|---|
| No Claude Code credentials found | Run claude and complete login |
| Keychain locked / access denied | Unlock Keychain or grant access when prompted |
| Token expired and refresh failed | Re-authenticate with claude |
| Provider not listed | Confirm ~/.config/maki/providers/claude-code is executable and that ~/.config/maki/providers/claude-code info prints JSON; start a new session |
unknown provider 'claude-code' on Termux |
Termux has no /usr/bin/env, so the shebang cannot resolve. Run pkg install python, then re-run install.sh — it pins the shebang to the real interpreter |
This uses Claude Code OAuth credentials with a third-party client. Anthropic’s Terms of Service may restrict subscription tokens to official clients. This is a community workaround and may break if Anthropic changes OAuth. Use at your own discretion.
MIT