{"_id":"@a3fckx/opencode-multi-auth","_rev":"5-06b1310eed0bdf82fed577ab4a7e69d4","name":"@a3fckx/opencode-multi-auth","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.0":{"name":"@a3fckx/opencode-multi-auth","version":"1.0.0","keywords":["opencode","openai","codex","oauth","multi-account"],"author":{"name":"a3fckx"},"license":"MIT","_id":"@a3fckx/opencode-multi-auth@1.0.0","maintainers":[{"name":"a3fckx","email":"a3fckx@proton.me"}],"homepage":"https://github.com/a3fckx/opencode-multi-auth#readme","bugs":{"url":"https://github.com/a3fckx/opencode-multi-auth/issues"},"bin":{"opencode-multi-auth":"dist/cli.js"},"dist":{"shasum":"799bc3bff61ef4f6169144438b63f502460eff15","tarball":"https://registry.npmjs.org/@a3fckx/opencode-multi-auth/-/opencode-multi-auth-1.0.0.tgz","fileCount":30,"integrity":"sha512-zVFKGllJVGNdih7j8ihzRPLqKZTgUgK7iSNUj4Yppzg2T9k23hRQ6GFMkFK1wx4RgUkkzPP6w2uJSAfkCQ7Jlg==","signatures":[{"sig":"MEUCIQC8aE3lKj37Tg4c1LRc7lgHbrOzq5HLJr4QW9yIvONMogIgQhllKyh5tx5cBEVJWi/7rqd1R7UU81015/6F2+kM0+I=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":84684},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","gitHead":"1a2086c59b3f7786f415e035330f12453fe3e178","scripts":{"dev":"bun run build","build":"bun build --target node ./src/index.ts ./src/cli.ts --outdir ./dist --external @openauthjs/openauth","clean":"rm -rf dist"},"_npmUser":{"name":"a3fckx","email":"a3fckx@proton.me"},"repository":{"url":"git+https://github.com/a3fckx/opencode-multi-auth.git","type":"git"},"_npmVersion":"11.6.2","description":"Multi-account OAuth rotation for OpenAI Codex with auto model discovery","directories":{},"_nodeVersion":"25.2.1","dependencies":{"@openauthjs/openauth":"^0.4.3"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.10.2"},"_npmOperationalInternal":{"tmp":"tmp/opencode-multi-auth_1.0.0_1766524704538_0.3512002462473418","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@a3fckx/opencode-multi-auth","version":"1.0.1","keywords":["opencode","openai","codex","oauth","multi-account"],"author":{"name":"a3fckx"},"license":"MIT","_id":"@a3fckx/opencode-multi-auth@1.0.1","maintainers":[{"name":"a3fckx","email":"a3fckx@proton.me"}],"homepage":"https://github.com/a3fckx/opencode-multi-auth#readme","bugs":{"url":"https://github.com/a3fckx/opencode-multi-auth/issues"},"bin":{"opencode-multi-auth":"dist/cli.js"},"dist":{"shasum":"1813569313eb4ad050a948e676d18c4c25dfad43","tarball":"https://registry.npmjs.org/@a3fckx/opencode-multi-auth/-/opencode-multi-auth-1.0.1.tgz","fileCount":30,"integrity":"sha512-+s8FWUZPazeBQVnrGJZP+Qn2nV1jgGmYWj4lBd1hTgoo6MRW7eUie4U+vPRkeUfxSk/RuoY3AXvhxYYLX1ZdgA==","signatures":[{"sig":"MEUCIQDPbBfE1cBwMl0URqr7zkEVDFM6VdUKQf7sqEro65mptgIgdLbP9VA4C3jEkkyKy/qmC2M9O+ITWUgvixRXQ/jvyc0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":82622},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","gitHead":"f8dfcf848c567be783c4dd263645da55750d6240","scripts":{"dev":"bun run build","build":"bun build --target node ./src/index.ts ./src/cli.ts --outdir ./dist --external @openauthjs/openauth --external @opencode-ai/plugin --external @opencode-ai/sdk","clean":"rm -rf dist"},"_npmUser":{"name":"a3fckx","email":"a3fckx@proton.me"},"repository":{"url":"git+https://github.com/a3fckx/opencode-multi-auth.git","type":"git"},"_npmVersion":"11.6.2","description":"Multi-account OAuth rotation for OpenAI Codex with auto model discovery","directories":{},"_nodeVersion":"25.2.1","dependencies":{"@opencode-ai/plugin":"^1.0.162","@openauthjs/openauth":"^0.4.3"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.10.2"},"_npmOperationalInternal":{"tmp":"tmp/opencode-multi-auth_1.0.1_1766527870245_0.04732102509687164","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@a3fckx/opencode-multi-auth","version":"1.0.2","keywords":["opencode","openai","codex","oauth","multi-account"],"author":{"name":"a3fckx"},"license":"MIT","_id":"@a3fckx/opencode-multi-auth@1.0.2","maintainers":[{"name":"a3fckx","email":"a3fckx@proton.me"}],"homepage":"https://github.com/a3fckx/opencode-multi-auth#readme","bugs":{"url":"https://github.com/a3fckx/opencode-multi-auth/issues"},"bin":{"opencode-multi-auth":"dist/cli.js"},"dist":{"shasum":"12a7d0c18257c58e5751165c4e7ea2f8763d8c91","tarball":"https://registry.npmjs.org/@a3fckx/opencode-multi-auth/-/opencode-multi-auth-1.0.2.tgz","fileCount":30,"integrity":"sha512-dZWfgvb2ZAmfgBu9rt+lGmu6M2j73TaErnjc0jGvl2fKzRLduTGyWEiQlqnDDll000FUS9s1oEu1Q6CHeGMHlA==","signatures":[{"sig":"MEUCIQC3OIguG3aRiQq52LgZb+V/rbI0lqPVtBYvWNoGD16xHwIgZzH3lQ71x05TpeQDnNWoJGJ1N0O61nwtqzUuQxo+Pt4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":82729},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"7652966d620a6b074a2775ead7fcb9bd74606a7b","scripts":{"dev":"bun run build","build":"bun build --target node ./src/index.ts ./src/cli.ts --outdir ./dist --external @openauthjs/openauth --external @opencode-ai/plugin --external @opencode-ai/sdk","clean":"rm -rf dist"},"_npmUser":{"name":"a3fckx","email":"a3fckx@proton.me"},"repository":{"url":"git+https://github.com/a3fckx/opencode-multi-auth.git","type":"git"},"_npmVersion":"11.6.2","description":"Multi-account OAuth rotation for OpenAI Codex with auto model discovery","directories":{},"_nodeVersion":"25.2.1","dependencies":{"@opencode-ai/plugin":"^1.0.162","@openauthjs/openauth":"^0.4.3"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.10.2"},"_npmOperationalInternal":{"tmp":"tmp/opencode-multi-auth_1.0.2_1766555463885_0.531692033375972","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@a3fckx/opencode-multi-auth","version":"1.0.3","keywords":["opencode","openai","codex","oauth","multi-account"],"author":{"name":"a3fckx"},"license":"MIT","_id":"@a3fckx/opencode-multi-auth@1.0.3","maintainers":[{"name":"a3fckx","email":"a3fckx@proton.me"}],"homepage":"https://github.com/a3fckx/opencode-multi-auth#readme","bugs":{"url":"https://github.com/a3fckx/opencode-multi-auth/issues"},"bin":{"opencode-multi-auth":"dist/cli.js"},"dist":{"shasum":"5fa483af4cf9e3db86e7215caac91b37cf72bead","tarball":"https://registry.npmjs.org/@a3fckx/opencode-multi-auth/-/opencode-multi-auth-1.0.3.tgz","fileCount":30,"integrity":"sha512-UuH01x4DL0mINnfVNfhLZ4tHfmoyoJmxdKB05Crc2imgLobQdiLWFSOS0ApwlEr0gQGZ1XwfXzxr/PMGf/ZEjQ==","signatures":[{"sig":"MEUCIQD9zF/KaFMS+4RqIfRfJ2RwtxWvOvYubWfTACaFPGStHQIgK9gzSMA7R+/liSbNJQJ/PL31iLMzUF8v4eQhdnfE8bk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":82757},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"36091349325cc99e88fde6a9b073d6ca13614041","scripts":{"dev":"bun run build","build":"bun build --target bun --format esm ./src/index.ts ./src/cli.ts --outdir ./dist --external @openauthjs/openauth --external @opencode-ai/plugin --external @opencode-ai/sdk","clean":"rm -rf dist"},"_npmUser":{"name":"a3fckx","email":"a3fckx@proton.me"},"repository":{"url":"git+https://github.com/a3fckx/opencode-multi-auth.git","type":"git"},"_npmVersion":"11.6.2","description":"Multi-account OAuth rotation for OpenAI Codex with auto model discovery","directories":{},"_nodeVersion":"25.2.1","dependencies":{"@opencode-ai/plugin":"^1.0.162","@openauthjs/openauth":"^0.4.3"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.10.2"},"_npmOperationalInternal":{"tmp":"tmp/opencode-multi-auth_1.0.3_1766555705923_0.9224324213455402","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@a3fckx/opencode-multi-auth","version":"1.0.4","description":"Multi-account OAuth rotation for OpenAI Codex with auto model discovery","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","bin":{"opencode-multi-auth":"dist/cli.js"},"scripts":{"build":"tsc","clean":"rm -rf dist"},"dependencies":{"@openauthjs/openauth":"^0.4.3"},"peerDependencies":{"@opencode-ai/plugin":"^1.0.150"},"devDependencies":{"@opencode-ai/plugin":"^1.0.193","@opencode-ai/sdk":"^1.0.193","@types/node":"^22.10.2","typescript":"^5.7.2"},"repository":{"type":"git","url":"git+https://github.com/a3fckx/opencode-multi-auth.git"},"keywords":["opencode","openai","codex","oauth","multi-account"],"author":{"name":"a3fckx"},"license":"MIT","gitHead":"ee58d9d0375b7bbd1029ed7a3521dd8fa7e9a2c8","_id":"@a3fckx/opencode-multi-auth@1.0.4","bugs":{"url":"https://github.com/a3fckx/opencode-multi-auth/issues"},"homepage":"https://github.com/a3fckx/opencode-multi-auth#readme","_nodeVersion":"25.2.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-ZVFQRxx80R4kcwBygSEmX2pgBcYlQn/DEVt65w4L++7WJkjj1SQDtnOI2ffk07LGw2SUUwfVKMenLHlfhUV5SQ==","shasum":"bfab713a0b66fb2e53e52d68297dbd228c618ab1","tarball":"https://registry.npmjs.org/@a3fckx/opencode-multi-auth/-/opencode-multi-auth-1.0.4.tgz","fileCount":30,"unpackedSize":62352,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGBsCht06Jc5A/8YNhbYIAvmpOPcEK79TgcdWr+xzjhSAiEA5Bqj+3JZYTYXwVcJ+pbY1+v3/r0QWXnmR7wf/z2kE98="}]},"_npmUser":{"name":"a3fckx","email":"a3fckx@proton.me"},"directories":{},"maintainers":[{"name":"a3fckx","email":"a3fckx@proton.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/opencode-multi-auth_1.0.4_1766555981865_0.32051960873970775"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-23T21:18:24.464Z","modified":"2025-12-24T05:59:42.172Z","1.0.0":"2025-12-23T21:18:24.681Z","1.0.1":"2025-12-23T22:11:10.374Z","1.0.2":"2025-12-24T05:51:04.030Z","1.0.3":"2025-12-24T05:55:06.061Z","1.0.4":"2025-12-24T05:59:41.998Z"},"bugs":{"url":"https://github.com/a3fckx/opencode-multi-auth/issues"},"author":{"name":"a3fckx"},"license":"MIT","homepage":"https://github.com/a3fckx/opencode-multi-auth#readme","keywords":["opencode","openai","codex","oauth","multi-account"],"repository":{"type":"git","url":"git+https://github.com/a3fckx/opencode-multi-auth.git"},"description":"Multi-account OAuth rotation for OpenAI Codex with auto model discovery","maintainers":[{"name":"a3fckx","email":"a3fckx@proton.me"}],"readme":"# opencode-multi-auth\n\nMulti-account OAuth rotation for OpenAI Codex. Auto-rotates between your ChatGPT Plus/Pro accounts.\n\n[![npm version](https://img.shields.io/npm/v/@a3fckx/opencode-multi-auth.svg)](https://www.npmjs.com/package/@a3fckx/opencode-multi-auth)\n\n> **Based on [opencode-openai-codex-auth](https://github.com/numman-ali/opencode-openai-codex-auth) by [@nummanali](https://x.com/nummanali)**. Forked and modified to add multi-account rotation support.\n\n## Installation\n\n### Via npm (Recommended)\n\nAdd to your `~/.config/opencode/opencode.json`:\n\n```json\n{\n  \"plugin\": [\"@a3fckx/opencode-multi-auth\"]\n}\n```\n\nOpenCode will auto-install on first run.\n\n### Manual Install\n\nIf auto-install fails, install manually:\n\n```bash\nbun add @a3fckx/opencode-multi-auth --cwd ~/.config/opencode\n```\n\n### From Source\n\n```bash\ngit clone https://github.com/a3fckx/opencode-multi-auth.git\ncd opencode-multi-auth\nbun install\nbun run build\nbun link\n```\n\n## Add Your Accounts\n\n```bash\n# Add each account (opens browser for OAuth)\nopencode-multi-auth add personal\nopencode-multi-auth add work  \nopencode-multi-auth add backup\n\n# Each command opens your browser - log in with a different ChatGPT account each time\n```\n\n## Verify Setup\n\n```bash\nopencode-multi-auth status\n```\n\nOutput:\n```\n[multi-auth] Account Status\n\nStrategy: round-robin\nAccounts: 3\nActive: personal\n\n  personal (active)\n    Email: you@personal.com\n    Uses: 12\n    Token expires: 12/25/2025, 3:00:00 PM\n\n  work\n    Email: you@work.com\n    Uses: 10\n    Token expires: 12/25/2025, 3:00:00 PM\n\n  backup\n    Email: you@backup.com\n    Uses: 8\n    Token expires: 12/25/2025, 3:00:00 PM\n```\n\n## Configure OpenCode\n\nAdd to your `~/.config/opencode/opencode.json`:\n\n```json\n{\n  \"plugin\": [\"@a3fckx/opencode-multi-auth\"]\n}\n```\n\nOr with other plugins:\n\n```json\n{\n  \"plugin\": [\n    \"oh-my-opencode\",\n    \"@a3fckx/opencode-multi-auth\"\n  ]\n}\n```\n\n## How It Works\n\n| Feature | Behavior |\n|---------|----------|\n| **Rotation** | Round-robin across all accounts per API call |\n| **Rate Limits** | Auto-skips rate-limited account for 5 min, uses next |\n| **Token Refresh** | Auto-refreshes tokens before expiry |\n| **Models** | Auto-discovers GPT-5.x models from OpenAI API |\n| **Storage** | `~/.config/opencode-multi-auth/accounts.json` |\n\n## CLI Commands\n\n| Command | Description |\n|---------|-------------|\n| `add <alias>` | Add new account via OAuth (opens browser) |\n| `remove <alias>` | Remove an account |\n| `list` | List all configured accounts |\n| `status` | Detailed status with usage counts |\n| `path` | Show config file location |\n| `help` | Show help message |\n\n## Requirements\n\n- ChatGPT Plus/Pro subscription(s)\n- OpenCode CLI\n\n## Credits\n\n- Original OAuth implementation: [numman-ali/opencode-openai-codex-auth](https://github.com/numman-ali/opencode-openai-codex-auth)\n- Multi-account rotation: [@a3fckx](https://github.com/a3fckx)\n\n## License\n\nMIT\n","readmeFilename":"README.md"}