{"id":24318145,"url":"https://github.com/ericc-ch/copilot-api","last_synced_at":"2025-04-06T22:06:00.094Z","repository":{"id":272166990,"uuid":"915108897","full_name":"ericc-ch/copilot-api","owner":"ericc-ch","description":"GitHub Copilot API wrapper to make it OpenAI compatible","archived":false,"fork":false,"pushed_at":"2025-03-30T16:43:48.000Z","size":426,"stargazers_count":72,"open_issues_count":6,"forks_count":22,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-30T21:14:38.622Z","etag":null,"topics":["github-copilot","openai-api","openai-compatible-api","reverse-engineering"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ericc-ch.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"docs/roadmap.md","authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-11T01:54:45.000Z","updated_at":"2025-03-30T16:43:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"fb249b8f-3f82-4fe1-ab32-da47d401659d","html_url":"https://github.com/ericc-ch/copilot-api","commit_stats":null,"previous_names":["ericc-ch/copilot-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericc-ch%2Fcopilot-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericc-ch%2Fcopilot-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericc-ch%2Fcopilot-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericc-ch%2Fcopilot-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ericc-ch","download_url":"https://codeload.github.com/ericc-ch/copilot-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247557767,"owners_count":20958047,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["github-copilot","openai-api","openai-compatible-api","reverse-engineering"],"created_at":"2025-01-17T14:37:16.294Z","updated_at":"2025-04-06T22:06:00.062Z","avatar_url":"https://github.com/ericc-ch.png","language":"TypeScript","readme":"# Copilot API\n\n⚠️ **EDUCATIONAL PURPOSE ONLY** ⚠️\nThis project is a reverse-engineered implementation of the GitHub Copilot API created for educational purposes only. It is not officially supported by GitHub and should not be used in production environments.\n\n[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/E1E519XS7W)\n\n## Project Overview\n\nA wrapper around GitHub Copilot API to make it OpenAI compatible, making it usable for other tools like AI assistants, local interfaces, and development utilities.\n\n## Demo\n\nhttps://github.com/user-attachments/assets/7654b383-669d-4eb9-b23c-06d7aefee8c5\n\n## Prerequisites\n\n- Bun (\u003e= 1.2.x)\n- GitHub account with Copilot subscription (Individual or Business)\n\n## Installation\n\nTo install dependencies, run:\n\n```sh\nbun install\n```\n\n## Using with docker\n\nBuild image\n\n```sh\ndocker build -t copilot-api .\n```\n\nRun the container\n\n```sh\ndocker run -p 4141:4141 copilot-api\n```\n\n## Using with npx\n\nYou can run the project directly using npx:\n\n```sh\nnpx copilot-api@latest\n```\n\nWith options:\n\n```sh\nnpx copilot-api --port 8080\n```\n\n## Command Line Options\n\nThe following command line options are available:\n\n| Option       | Description                                  | Default | Alias |\n| ------------ | -------------------------------------------- | ------- | ----- |\n| --port       | Port to listen on                            | 4141    | -p    |\n| --verbose    | Enable verbose logging                       | false   | -v    |\n| --business   | Use a business plan GitHub account           | false   | none  |\n| --manual     | Enable manual request approval               | false   | none  |\n| --rate-limit | Rate limit in seconds between requests       | none    | -r    |\n| --wait       | Wait instead of error when rate limit is hit | false   | -w    |\n\nExample usage:\n\n```sh\n# Run on custom port with verbose logging\nnpx copilot-api@latest --port 8080 --verbose\n\n# Use with a Business GitHub account\nnpx copilot-api@latest --business\n\n# Enable manual approval for each request\nnpx copilot-api@latest --manual\n\n# Set rate limit to 30 seconds between requests\nnpx copilot-api@latest --rate-limit 30\n\n# Wait instead of error when rate limit is hit\nnpx copilot-api@latest --rate-limit 30 --wait\n```\n\n## Running from Source\n\nThe project can be run from source in several ways:\n\n### Development Mode\n\n```sh\nbun run dev\n```\n\n### Production Mode\n\n```sh\nbun run start\n```\n\n## Usage Tips\n\n- Consider using free models (e.g., Gemini, Mistral, Openrouter) as the `weak-model`\n- Use architect mode sparingly\n- Disable `yes-always` in your aider configuration\n- Be mindful that Claude 3.7 thinking mode consumes more tokens\n- Enable the `--manual` flag to review and approve each request before processing\n- If you have a GitHub Business account with Copilot, use the `--business` flag\n\n### Manual Request Approval\n\nWhen using the `--manual` flag, the server will prompt you to approve each incoming request:\n\n```\n? Accept incoming request? › (y/N)\n```\n\nThis helps you control usage and monitor requests in real-time.\n\n## Roadmap\n\n- [ ] Manual authentication flow\n- [x] Manual request approval system\n- [x] Rate limiting implementation\n- [x] Token counting\n- [x] Enhanced error handling and recovery\n","funding_links":["https://ko-fi.com/E1E519XS7W"],"categories":["TypeScript","Openai","Proxies \u0026 Model Integrations"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericc-ch%2Fcopilot-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericc-ch%2Fcopilot-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericc-ch%2Fcopilot-api/lists"}