{"id":28804704,"url":"https://github.com/dragon-fish/github-copilot-ai","last_synced_at":"2026-04-29T09:07:29.292Z","repository":{"id":299093440,"uuid":"1002042620","full_name":"dragon-fish/github-copilot-ai","owner":"dragon-fish","description":"Using GitHub Copilot API like OpenAI API.","archived":false,"fork":false,"pushed_at":"2025-06-15T16:37:52.000Z","size":43,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-21T17:33:23.269Z","etag":null,"topics":["copilot-api","github-copilot","openai","openai-api"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":false,"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/dragon-fish.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":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-14T15:37:26.000Z","updated_at":"2025-08-13T12:34:00.000Z","dependencies_parsed_at":"2025-06-14T16:52:35.104Z","dependency_job_id":"48e13fb6-1e25-4080-8ac3-11b284c2c4af","html_url":"https://github.com/dragon-fish/github-copilot-ai","commit_stats":null,"previous_names":["dragon-fish/github-copilot-ai"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dragon-fish/github-copilot-ai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragon-fish%2Fgithub-copilot-ai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragon-fish%2Fgithub-copilot-ai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragon-fish%2Fgithub-copilot-ai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragon-fish%2Fgithub-copilot-ai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dragon-fish","download_url":"https://codeload.github.com/dragon-fish/github-copilot-ai/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragon-fish%2Fgithub-copilot-ai/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32418253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T06:29:02.080Z","status":"ssl_error","status_checked_at":"2026-04-29T06:29:00.631Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["copilot-api","github-copilot","openai","openai-api"],"created_at":"2025-06-18T09:08:08.051Z","updated_at":"2026-04-29T09:07:29.277Z","avatar_url":"https://github.com/dragon-fish.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GithubCopilotAI\n\nUsing GitHub Copilot API like OpenAI API.\n\n**For learning and research purposes only. There is no guarantee of availability. Don't file issues.**\n\n## Installation\n\n```bash\npnpm add github-copilot-ai\n```\n\n## Usage\n\nJust like OpenAI API.\n\nRead more at [OpenAI documentation](https://npmjs.com/package/openai).\n\n```ts\nimport { GithubCopilotAI } from 'github-copilot-ai'\n\nconst client = new GithubCopilotAI({\n  apiKey: 'YOUR_COPILOT_OAUTH_TOKEN',\n})\n\nconst response = await client.chat.completions.create({\n  model: 'claude-sonnet-4',\n  messages: [\n    {\n      role: 'user',\n      content: 'Who are you?',\n    },\n  ],\n})\n```\n\n## How to get Copilot OAuth Token\n\nWe create a simple script to get GitHub Auth Token.\n\n```sh\npnpm run oauth\n```\n\nFollow the instructions in the script to get your GitHub Auth Token.\n\nRefer to [the source code](./demo/modules/oauth.ts) for more details, if you want to implement it elsewhere or in another language.\n\n## Python version?\n\nhttps://gist.github.com/dragon-fish/86432fc4baa69875ce1013e0c8dd472c\n\nI'm not good at Python. This entire script is converted from the TypeScript version by copilot itself. ~~WOW, NTR~~\n\n---\n\n\u003e MIT License\n\u003e\n\u003e Copyright © 2025 @dragon-fish\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdragon-fish%2Fgithub-copilot-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdragon-fish%2Fgithub-copilot-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdragon-fish%2Fgithub-copilot-ai/lists"}