Web Analytics

opencode-anthropic-oauth

⭐ 112 stars English by shahidshabbir-se

opencode-anthropic-oauth

OpenCode plugin for Anthropic Claude Pro/Max OAuth login — no Claude Code needed.

What it does

Lets you authenticate with your Claude Pro/Max subscription directly in OpenCode via browser OAuth. No need to install Claude Code or manage credentials files.

Installation

npm install -g opencode-anthropic-oauth
Then add to your opencode.json:

{
  "plugin": ["opencode-anthropic-oauth"]
}

Usage

How it works

Changelog

0.4.1

0.4.0

0.3.0

Environment variable overrides

All OAuth parameters can be overridden via environment variables. If Anthropic changes something before we publish an update, set an env var and keep working:

| Variable | Description | |---|---| | ANTHROPIC_CLIENT_ID | OAuth client ID | | ANTHROPIC_CLI_VERSION | Claude CLI version for User-Agent | | ANTHROPIC_USER_AGENT | Full User-Agent string (overrides version) | | ANTHROPIC_AUTHORIZE_URL | OAuth authorization endpoint | | ANTHROPIC_TOKEN_URL | OAuth token endpoint | | ANTHROPIC_REDIRECT_URI | OAuth redirect URI | | ANTHROPIC_SCOPES | OAuth scopes | | ANTHROPIC_BETA_FLAGS | Anthropic beta feature flags |

Example:

export ANTHROPIC_CLI_VERSION=2.2.0

Disclaimer

This plugin uses Anthropic's public OAuth client ID to authenticate. Anthropic's Terms of Service (February 2026) state that Claude Pro/Max subscription tokens should only be used with official Anthropic clients. This plugin exists as a community workaround and may stop working if Anthropic changes their OAuth infrastructure. Use at your own discretion.

License

MIT

--- Tranlated By Open Ai Tx | Last indexed: 2026-06-20 ---