gitwtfhub

wtf is opencode-claude-auth-v2?

heymaaz/opencode-claude-auth-v2 — explained in plain English

Analysis updated 2026-05-18

0TypeScriptAudience · developerComplexity · 3/5LicenseSetup · moderate

TL;DR

An unofficial OpenCode 2 plugin that lets you reuse your existing Claude Code Pro or Max subscription login instead of setting up separate API billing.

Mindmap

mindmap
  root((opencode-claude-auth-v2))
    What it does
      Reuses Claude Code login
      Separate subscription provider
      Token auto refresh
      OpenCode 2 only
    Tech stack
      TypeScript
      Node.js
      OpenCode plugin API
    Use cases
      Skip separate API billing
      Run v1 and v2 side by side
      Import saved credentials
    Audience
      OpenCode users
      Claude subscribers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Use an existing Claude Code Pro or Max subscription inside the OpenCode 2 coding assistant without a separate API key.

REASON 2

Run OpenCode 1 and OpenCode 2 side by side with isolated configurations.

REASON 3

Automatically refresh and reuse Claude Code's saved login credentials across sessions.

What's in the stack?

TypeScriptNode.jsOpenCode

How it stacks up

heymaaz/opencode-claude-auth-v20xradioac7iv/tempfs52191314/web-agent-proxy-sdk
Stars000
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderatemoderatemoderate
Complexity3/53/54/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Requires Node.js 22+, an active Claude Code login, and a Claude Pro or Max subscription, unofficial and may break with Anthropic changes.

MIT license, use, modify, and distribute freely including commercially, with attribution.

Wtf does this do

This project is a plugin for OpenCode 2, a coding assistant tool, that lets you sign in using an existing Claude Code Pro or Max subscription instead of setting up a separate login. It is a fork of an earlier plugin built for OpenCode 1, updated to work with the newer OpenCode 2 beta. Normally, connecting an AI coding tool to Claude requires its own API key and billing setup. This plugin instead looks for credentials that Claude Code already saved on your computer, either in the macOS Keychain or in a local credentials file, and reuses them. It sets up a separate provider inside OpenCode called Claude Subscription, so your regular Anthropic API key settings are left untouched and the two methods do not interfere with each other. Once connected, the plugin routes your requests through to Anthropic using the format that subscription-based authentication requires, refreshes your login token automatically before it expires, and keeps OpenCode's own tool permissions and workflow intact. The author explains this approach was necessary because a different community-made connector runs its own separate agent system that does not let OpenCode's own tools work properly, so this plugin was built to work directly with OpenCode's existing tool loop instead. To use it, you need Node.js 22 or newer, the Claude Code tool installed and signed in on your machine, and an active Claude Pro or Max subscription. Setup involves adding the plugin's name to your OpenCode 2 configuration file, restarting OpenCode, then running a connect command and choosing to import your Claude Code subscription. The project includes instructions for running OpenCode 1 and OpenCode 2 side by side without conflicts. The author notes this is an unofficial, community-built project. Anthropic's own documentation states that using a Claude Pro or Max subscription through third-party plugins like this is not officially permitted, so it may stop working if Anthropic changes how its login system works, and anyone using it should do so at their own discretion.

Yoink these prompts

Prompt 1
Walk me through installing opencode-claude-auth-v2 in my OpenCode 2 config and connecting my Claude Code subscription.
Prompt 2
Explain why this plugin creates a separate Claude Subscription provider instead of using OpenCode's normal Anthropic setup.
Prompt 3
Help me set up OpenCode 1 and OpenCode 2 to run side by side using this plugin's isolated config instructions.
Prompt 4
What are the risks of using this plugin given Anthropic's stance on third-party subscription auth?

Frequently asked questions

wtf is opencode-claude-auth-v2?

An unofficial OpenCode 2 plugin that lets you reuse your existing Claude Code Pro or Max subscription login instead of setting up separate API billing.

What language is opencode-claude-auth-v2 written in?

Mainly TypeScript. The stack also includes TypeScript, Node.js, OpenCode.

What license does opencode-claude-auth-v2 use?

MIT license, use, modify, and distribute freely including commercially, with attribution.

How hard is opencode-claude-auth-v2 to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is opencode-claude-auth-v2 for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.