{"_id":"@alialf/copilot-adapter","name":"@alialf/copilot-adapter","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@alialf/copilot-adapter","version":"0.1.0","description":"Secure local GitHub Copilot adapter for Codex and Claude Code","type":"module","license":"MIT","author":{"name":"Ali Alfredji"},"repository":{"type":"git","url":"git+https://github.com/alialfredji/copilot-adapter.git"},"homepage":"https://github.com/alialfredji/copilot-adapter#readme","bugs":{"url":"https://github.com/alialfredji/copilot-adapter/issues"},"keywords":["copilot","github-copilot","proxy","openai","anthropic","claude","codex"],"engines":{"node":">=22.12"},"bin":{"copilot-adapter":"dist/cli.js"},"main":"dist/index.js","types":"dist/index.d.ts","imports":{"#*":{"copilot-adapter-dev":"./src/*","default":"./dist/*"}},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"publishConfig":{"access":"public"},"scripts":{"build":"tsc","start":"node dist/cli.js","dev":"tsx -C copilot-adapter-dev src/cli.ts","test":"vitest run","test:watch":"vitest","fmt":"oxfmt --write src/ test/","fmt:check":"oxfmt --check src/ test/","lint":"oxlint src/ test/","typecheck":"tsc -p tsconfig.check.json","check":"npm run fmt:check && npm run typecheck && npm run lint && npm test","prepack":"npm run build","prepublishOnly":"npm run check"},"dependencies":{"@fastify/cors":"11.2.0","@github/copilot-sdk":"1.0.8","commander":"15.0.0","fastify":"5.12.1","json5":"2.2.3","jsonc-parser":"3.3.1","llm-schemas":"1.1.0","picocolors":"1.1.1","tokenx":"1.3.0","zod":"4.4.3"},"devDependencies":{"@types/node":"25.9.3","llm-mock-server":"1.1.0","oxfmt":"0.54.0","oxlint":"1.69.0","tsx":"4.22.4","typescript":"6.0.3","vitest":"4.1.8"},"gitHead":"63c93e49f1227fd80455aeff707d29a5ccb12e99","_id":"@alialf/copilot-adapter@0.1.0","_nodeVersion":"25.8.2","_npmVersion":"11.11.1","dist":{"integrity":"sha512-2HFxIQvjy4XEIRnDVnfn4snQCzfwh9oq35O0tRbTKrwEdN9xHK/5oFgpxM5CLXdbyGKIQN9DjcjPtB1FEQwcUQ==","shasum":"1bb49e176f88aa27938e69e06213fa31aef2bc14","tarball":"https://registry.npmjs.org/@alialf/copilot-adapter/-/copilot-adapter-0.1.0.tgz","fileCount":135,"unpackedSize":342487,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDvbIpAh1QVzj+sm37p22EaH3qZcDsoOh4aeShVgAuu2gIhAKz+U8aFT8YO6Nbrj5EwM2SlFfzEiLxXUVcuOx48G8/Q"}]},"_npmUser":{"name":"alfredjiali","email":"alfredjiali@gmail.com"},"directories":{},"maintainers":[{"name":"alfredjiali","email":"alfredjiali@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/copilot-adapter_0.1.0_1787652796611_0.03419436937546316"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-25T10:13:16.473Z","0.1.0":"2026-08-25T10:13:16.755Z","modified":"2026-08-25T10:13:16.979Z"},"maintainers":[{"name":"alfredjiali","email":"alfredjiali@gmail.com"}],"description":"Secure local GitHub Copilot adapter for Codex and Claude Code","homepage":"https://github.com/alialfredji/copilot-adapter#readme","keywords":["copilot","github-copilot","proxy","openai","anthropic","claude","codex"],"repository":{"type":"git","url":"git+https://github.com/alialfredji/copilot-adapter.git"},"author":{"name":"Ali Alfredji"},"bugs":{"url":"https://github.com/alialfredji/copilot-adapter/issues"},"license":"MIT","readme":"# Copilot Adapter\n\nUse GitHub Copilot models in Codex and Claude Code through a local adapter.\n`@alialf/copilot-adapter` translates the APIs used by those clients into\nofficial `@github/copilot-sdk` sessions.\n\nThe adapter runs only on your computer, binds to `127.0.0.1`, and limits each\nprocess to the project you choose.\n\n## Requirements\n\n- Node.js 22.12 or newer\n- A GitHub Copilot Business or Enterprise seat\n- GitHub Copilot CLI enabled by your organization\n- GitHub CLI authentication (`gh auth login`)\n- Codex or Claude Code\n\n## Quick start\n\nInstall the adapter and check your setup:\n\n```bash\nnpm install --global @alialf/copilot-adapter\ncopilot-adapter doctor\n```\n\nStart it from the project you want your client to access:\n\n```bash\ncd /path/to/your/project\ncopilot-adapter start --cwd \"$PWD\" --policy read-only\n```\n\nKeep that terminal open. In another terminal, confirm that the adapter is\nrunning and list the models available to your Copilot account:\n\n```bash\ncopilot-adapter status --models\n```\n\nThen connect a client.\n\n### Codex CLI\n\n```bash\ncopilot-adapter setup codex --scope profile\ncodex --profile copilot\n```\n\nUse `/model` and `/reasoning` inside Codex to change the model and reasoning\nlevel.\n\n### Codex Desktop or VS Code\n\n```bash\ncopilot-adapter setup codex --scope global\n```\n\nRestart Codex Desktop or reload VS Code, then open the same project used with\n`--cwd`. Only local tasks can connect to the adapter.\n\n### Claude Code CLI\n\n```bash\ncopilot-adapter setup claude-cli\nclaude\n```\n\nRun `/status` to confirm the base URL is `http://127.0.0.1:4141`. Use `/model`\nand `/effort` to change settings.\n\n### Claude Code for VS Code\n\n```bash\ncopilot-adapter setup claude-vscode\n```\n\nReload VS Code, then open the same project used with `--cwd`.\n\nFor Claude Desktop and detailed setup instructions, see the\n[client setup guide](docs/GETTING-STARTED-CLIENTS.md).\n\n## Access policies\n\nThe policy controls which tools Copilot may use inside the selected project:\n\n- `chat`: no project tools\n- `read-only`: read, search, and list files (default)\n- `workspace-write`: also create and edit files\n- `unsafe-shell`: also run shell commands\n- `unsafe-all`: also use configured MCP servers\n\nStart with `read-only`. Use the `unsafe-*` policies only when you trust the\nclient and understand the additional access.\n\n## Useful commands\n\n```bash\ncopilot-adapter status --models   # Check the adapter and available models\ncopilot-adapter models sync       # Refresh Codex models after a policy change\ncopilot-adapter token             # Print the local client token\ncopilot-adapter token --rotate    # Replace the local client token\ncopilot-adapter --help            # Show all commands\n```\n\nRun a setup command with `--remove` to undo its changes, for example:\n\n```bash\ncopilot-adapter setup codex --scope profile --remove\ncopilot-adapter setup claude-cli --remove\n```\n\n## Security and limitations\n\n- The adapter accepts connections only from localhost. Do not expose it through\n  a tunnel or public proxy.\n- One adapter process serves one project. Use another port and process for a\n  second project.\n- The local bearer token protects the adapter; it is not a GitHub token.\n- Codex and Claude permission dialogs do not control tools run by the Copilot\n  SDK. The adapter policy does.\n- `unsafe-shell` is not a hardened sandbox.\n\n## Documentation\n\n- [Client setup](docs/GETTING-STARTED-CLIENTS.md)\n- [Command reference](docs/COMMANDS.md)\n- [Architecture](docs/ARCHITECTURE.md)\n- [Testing](docs/TESTING.md)\n- [Publishing](docs/PUBLISHING.md)\n\n## License\n\nMIT. The protocol translation layer is based on the MIT-licensed\n[`copilot-sdk-proxy`](https://github.com/theblixguy/copilot-sdk-proxy).\n","readmeFilename":"README.md","_rev":"1-46b5b886c22e01bf8fd4409b87957f17"}