[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-2785":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":15,"stars30d":16,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":17,"rankGlobal":9,"rankLanguage":9,"license":9,"archived":18,"fork":18,"defaultBranch":19,"hasWiki":20,"hasPages":18,"topics":21,"createdAt":9,"pushedAt":9,"updatedAt":22,"readmeContent":23,"aiSummary":24,"trendingCount":14,"starSnapshotCount":14,"syncStatus":16,"lastSyncTime":25,"discoverSource":26},2785,"claude-proxy","John-Rood\u002Fclaude-proxy","John-Rood","Lightweight proxy that routes Anthropic API billing through Claude Code subscriptions. Zero dependencies, ~150 lines.",null,"JavaScript",110,4,108,0,1,2,39.8,false,"main",true,[],"2026-06-12 04:00:15","# Claude Code Proxy\n\nA lightweight Node.js proxy (~150 lines, zero dependencies) that wraps Anthropic API requests with the Claude Code envelope, routing billing through your Claude Code subscription instead of direct API credits.\n\n## What It Does\n\n```\nYour App → localhost:8082 → Proxy → api.anthropic.com\n                              ↓\n                        1. Pass through your API key unchanged\n                        2. Add anthropic-beta: claude-code-20250219 header\n                        3. Prepend Claude Code system prompt\n                        4. Stream response back untouched\n```\n\n## Setup\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FJohn-Rood\u002Fclaude-proxy.git\ncd claude-proxy\nnode index.js\n```\n\nThat's it. No dependencies to install.\n\n## Configuration\n\n`config.json`:\n```json\n{\n  \"port\": 8082\n}\n```\n\n## Usage\n\nPoint your Anthropic client at `http:\u002F\u002F127.0.0.1:8082` instead of `https:\u002F\u002Fapi.anthropic.com`. The proxy passes through your API key and adds the Claude Code billing envelope.\n\n```bash\ncurl http:\u002F\u002F127.0.0.1:8082\u002Fv1\u002Fmessages \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -H \"x-api-key: YOUR_ANTHROPIC_KEY\" \\\n  -H \"anthropic-version: 2023-06-01\" \\\n  -d '{\n    \"model\": \"claude-sonnet-4-20250514\",\n    \"max_tokens\": 100,\n    \"messages\": [{\"role\": \"user\", \"content\": \"Hello\"}]\n  }'\n```\n\n## Endpoints\n\n| Endpoint | Method | Description |\n|----------|--------|-------------|\n| `\u002Fv1\u002Fmessages` | POST | Proxied to Anthropic with Claude Code envelope |\n| `\u002Fhealth` | GET | Health check |\n| `\u002Fstatus` | GET | Proxy status and request count |\n\n## Requirements\n\n- Node.js 18+\n- A valid Anthropic API key (from an account with Claude Code \u002F Max subscription)\n\n## Run as a Service (macOS)\n\nTo keep the proxy running persistently, create a launchd plist at `~\u002FLibrary\u002FLaunchAgents\u002Fcom.claude-proxy.plist`:\n\n```xml\n\u003C?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\u003C!DOCTYPE plist PUBLIC \"-\u002F\u002FApple\u002F\u002FDTD PLIST 1.0\u002F\u002FEN\" \"http:\u002F\u002Fwww.apple.com\u002FDTDs\u002FPropertyList-1.0.dtd\">\n\u003Cplist version=\"1.0\">\n\u003Cdict>\n    \u003Ckey>Label\u003C\u002Fkey>\n    \u003Cstring>com.claude-proxy\u003C\u002Fstring>\n    \u003Ckey>ProgramArguments\u003C\u002Fkey>\n    \u003Carray>\n        \u003Cstring>\u002Fpath\u002Fto\u002Fnode\u003C\u002Fstring>\n        \u003Cstring>\u002Fpath\u002Fto\u002Fclaude-proxy\u002Findex.js\u003C\u002Fstring>\n    \u003C\u002Farray>\n    \u003Ckey>WorkingDirectory\u003C\u002Fkey>\n    \u003Cstring>\u002Fpath\u002Fto\u002Fclaude-proxy\u003C\u002Fstring>\n    \u003Ckey>RunAtLoad\u003C\u002Fkey>\n    \u003Ctrue\u002F>\n    \u003Ckey>KeepAlive\u003C\u002Fkey>\n    \u003Cdict>\n        \u003Ckey>SuccessfulExit\u003C\u002Fkey>\n        \u003Cfalse\u002F>\n    \u003C\u002Fdict>\n    \u003Ckey>StandardOutPath\u003C\u002Fkey>\n    \u003Cstring>\u002Ftmp\u002Fclaude-proxy-stdout.log\u003C\u002Fstring>\n    \u003Ckey>StandardErrorPath\u003C\u002Fkey>\n    \u003Cstring>\u002Ftmp\u002Fclaude-proxy-stderr.log\u003C\u002Fstring>\n    \u003Ckey>ThrottleInterval\u003C\u002Fkey>\n    \u003Cinteger>10\u003C\u002Finteger>\n    \u003Ckey>EnvironmentVariables\u003C\u002Fkey>\n    \u003Cdict>\n        \u003Ckey>PATH\u003C\u002Fkey>\n        \u003Cstring>\u002Fopt\u002Fhomebrew\u002Fbin:\u002Fusr\u002Flocal\u002Fbin:\u002Fusr\u002Fbin:\u002Fbin\u003C\u002Fstring>\n    \u003C\u002Fdict>\n\u003C\u002Fdict>\n\u003C\u002Fplist>\n```\n\nReplace `\u002Fpath\u002Fto\u002Fnode` with your node binary path (`which node`) and `\u002Fpath\u002Fto\u002Fclaude-proxy` with where you cloned this repo.\n\n```bash\nlaunchctl load ~\u002FLibrary\u002FLaunchAgents\u002Fcom.claude-proxy.plist\n```\n\nThe proxy will auto-restart on crash and start on boot.\n\n## OpenClaw Skill (Troubleshooting)\n\nThis repo includes an [OpenClaw](https:\u002F\u002Fgithub.com\u002Fopenclaw\u002Fopenclaw) skill for automated troubleshooting. If you're using OpenClaw and the proxy stops working, the skill walks your agent through diagnosing and fixing common issues (baseUrl overwrites, auth token cycling, Keychain sync, etc).\n\n### Install the skill\n\nCopy the skill folder into your OpenClaw workspace:\n\n```bash\ncp -r skills\u002Fanthropic-sub-proxy ~\u002F.openclaw\u002Fworkspace\u002Fskills\u002F\n```\n\nOr if your workspace is in a different location:\n\n```bash\ncp -r skills\u002Fanthropic-sub-proxy \u002Fpath\u002Fto\u002Fyour\u002Fopenclaw\u002Fworkspace\u002Fskills\u002F\n```\n\nThat's it — OpenClaw will automatically detect the skill and use it when proxy-related issues come up.\n\n## License\n\nMIT\n","Claude Code Proxy 是一个轻量级的Node.js代理，用于将Anthropic API的计费通过Claude Code订阅进行路由。核心功能包括无依赖、仅约150行代码，能够透明传递API密钥、添加特定请求头、预置系统提示并直接返回响应流。适用于需要利用Claude Code订阅来优化成本的应用场景，尤其是那些已经使用或计划使用Anthropic服务但希望减少直接API调用费用的开发者。此外，该代理还支持健康检查和状态查询等基本运维需求，易于配置与部署。","2026-06-11 02:51:12","CREATED_QUERY"]