{"id":47577446,"url":"https://github.com/ianjwhite99/opencode-with-claude","last_synced_at":"2026-04-08T06:02:38.008Z","repository":{"id":345895783,"uuid":"1187595770","full_name":"ianjwhite99/opencode-with-claude","owner":"ianjwhite99","description":"OpenCode plugin to use your Claude Max/Pro subscription with OpenCode via opencode-claude-max-proxy","archived":false,"fork":false,"pushed_at":"2026-04-04T23:14:44.000Z","size":172,"stargazers_count":59,"open_issues_count":1,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-04-05T01:25:37.216Z","etag":null,"topics":["ai-coding","anthropic","bun","claude","claude-agent-sdk","claude-code","claude-max","opencode","opencode-plugin"],"latest_commit_sha":null,"homepage":"http://www.npmjs.com/package/opencode-with-claude","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ianjwhite99.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-20T23:00:56.000Z","updated_at":"2026-04-04T23:14:36.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ianjwhite99/opencode-with-claude","commit_stats":null,"previous_names":["ianjwhite99/opencode-with-claude"],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/ianjwhite99/opencode-with-claude","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ianjwhite99%2Fopencode-with-claude","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ianjwhite99%2Fopencode-with-claude/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ianjwhite99%2Fopencode-with-claude/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ianjwhite99%2Fopencode-with-claude/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ianjwhite99","download_url":"https://codeload.github.com/ianjwhite99/opencode-with-claude/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ianjwhite99%2Fopencode-with-claude/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31542384,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"online","status_checked_at":"2026-04-08T02:00:06.127Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-coding","anthropic","bun","claude","claude-agent-sdk","claude-code","claude-max","opencode","opencode-plugin"],"created_at":"2026-03-31T06:00:27.727Z","updated_at":"2026-04-08T06:02:38.002Z","avatar_url":"https://github.com/ianjwhite99.png","language":"TypeScript","readme":"# opencode-with-claude\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n\nUse [OpenCode](https://opencode.ai) with your [Claude Max](https://claude.ai) subscription.\n\n## What this is\n\nAn [OpenCode](https://opencode.ai) plugin that runs [Meridian](https://github.com/rynfar/meridian) *(formerly opencode-claude-max-proxy)* for you: **start OpenCode once** and the proxy comes up with it; **quit OpenCode** and the proxy stops. No separate proxy CLI or Docker container to manage.\n\n**Compared to running the proxy yourself:**\n\n- **One process to think about** — OpenCode owns the proxy lifecycle (start/stop) instead of you juggling two things.\n- **Several OpenCode windows at once** — each instance gets its own proxy on an OS-assigned port, so ports do not collide and you avoid session issues from sharing one proxy across instances.\n- **Explicit session headers** — the plugin adds session tracking on outgoing API calls, so the proxy does not have to infer sessions from fingerprints alone.\n\n## How It Works\n\n```\n┌─────────────┐              ┌────────────────────┐       ┌─────────────────┐\n│  OpenCode   │─────────────▶│  Claude Max Proxy  │──────▶│    Anthropic    │\n│  (TUI/Web)  │ :3456 / auto │   (local server)   │  SDK  │    Claude Max   │\n│             │◀─────────────│                    │◀──────│                 │\n└─────────────┘              └────────────────────┘       └─────────────────┘\n```\n\n## Quick Start\n\nThe plugin hooks into OpenCode's plugin system. When OpenCode launches, it starts the proxy, configures the Anthropic provider, and cleans everything up on exit.\n\n**1. Install the plugin**\n\n```bash\nnpm install -g opencode-with-claude\n```\n\n**2. Authenticate with Claude (one-time)**\n\n```bash\nnpm install -g @anthropic-ai/claude-code\nclaude login\n```\n\n**3. Add to your `opencode.json`**\n\nGlobal (`~/.config/opencode/opencode.json`) or project-level:\n\n```json\n{\n  \"$schema\": \"https://opencode.ai/config.json\",\n  \"plugin\": [\"opencode-with-claude\"],\n  \"provider\": {\n    \"anthropic\": {\n      \"options\": {\n        \"baseURL\": \"http://127.0.0.1:3456\",\n        \"apiKey\": \"dummy\"\n      }\n    }\n  }\n}\n```\n\n\u003e **Note:** The `apiKey` is a placeholder — authentication goes through your Claude Max session via `claude login`, not an API key. The `baseURL` is the default proxy port. If port 3456 is already in use (e.g., another OpenCode instance), the plugin automatically starts the proxy on a different port and overrides the `baseURL` at runtime.\n\n**3. Run OpenCode**\n\n```bash\nopencode\n```\n\n## Troubleshooting\n\n### \"Claude Code CLI not found\"\n\n```bash\nnpm install -g @anthropic-ai/claude-code\n```\n\n### \"Claude not authenticated\"\n\n```bash\nclaude login\n```\n\nThis opens a browser for OAuth. Your Claude Max subscription credentials are needed.\n\n### \"Proxy failed to start\"\n\n1. Check Claude auth: `claude auth status`\n2. Ensure your internet connection is working\n3. If using a manual port override, check if it's in use: `lsof -i :$CLAUDE_PROXY_PORT`\n\n## Development\n\n### Project Structure\n\n```\nopencode-with-claude/\n├── src/\n│   ├── index.ts           # Plugin entry point\n│   ├── proxy.ts           # Proxy lifecycle management\n│   └── logger.ts          # Plugin logger\n├── test/\n│   ├── run.sh             # Test runner\n│   └── opencode.json      # Test config\n├── package.json\n└── tsconfig.json\n```\n\n### Build\n\n```bash\nnpm install\nnpm run build\n```\n\n### Test locally\n\n```bash\n./test/run.sh              # Build and launch OpenCode with the plugin\n./test/run.sh --clean      # Remove build artifacts\n```\n\n## FAQ\n\n**Do I need an Anthropic API key?**\n\nNo. Claude Max is not authenticated with API keys here. Run `claude login` once; the proxy uses that session (Agent SDK via OAuth). OpenCode still expects an `apiKey` field, so the plugin supplies a placeholder — it is not used for real auth.\n\n**What if my Claude Max subscription lapses?**\n\nThe proxy will fail to authenticate. Run `claude auth status`. You need an active Claude Max plan; see [claude.ai](https://claude.ai) for current options and pricing.\n\n**Can I run several OpenCode instances at once?**\n\nYes. The first instance uses port **3456** by default; others get a free OS-assigned port, so nothing extra to configure.\n\n**Is this the same as using the Anthropic API directly?**\n\nNot exactly. OpenCode speaks Anthropic-style HTTP to the local proxy; the proxy maps requests to the Claude Agent SDK and your Claude Max session. Usage limits follow your Max subscription, not Anthropic API billing tiers.\n\n## Disclaimer\n\nThis project is an **unofficial wrapper** around Anthropic's publicly available Claude Agent SDK and OpenCode. It is not affiliated with, endorsed by, or supported by Anthropic or OpenCode.\n\n**Use at your own risk.** The authors make no claims regarding compliance with Anthropic's Terms of Service. It is your responsibility to review and comply with Anthropic's [Terms of Service](https://www.anthropic.com/terms) and [Authorized Usage Policy](https://www.anthropic.com/aup). Terms may change at any time.\n\nThis project calls publicly available npm packages using your own authenticated account. No API keys are intercepted, no authentication is bypassed, and no proprietary systems are reverse-engineered.\n\n## Credits\n\nBuilt on top of [Meridian](https://github.com/rynfar/meridian) by [@rynfar](https://github.com/rynfar), which provides the core proxy that bridges the Anthropic Agent SDK to the standard API.\n\nPowered by the [Claude Agent SDK](https://www.npmjs.com/package/@anthropic-ai/claude-agent-sdk) by Anthropic and [OpenCode](https://opencode.ai).\n\n## License\n\nMIT\n","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fianjwhite99%2Fopencode-with-claude","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fianjwhite99%2Fopencode-with-claude","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fianjwhite99%2Fopencode-with-claude/lists"}