Skip to content

Commit 4d35806

Browse files
committed
feat: Add Claude Code integration and documentation
1 parent 6840eb8 commit 4d35806

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
## Project Overview
99

10-
A reverse-engineered proxy for the GitHub Copilot API that exposes it as an OpenAI and Anthropic compatible service. This allows you to use GitHub Copilot with any tool that supports the OpenAI Chat Completions API or the Anthropic Messages API.
10+
A reverse-engineered proxy for the GitHub Copilot API that exposes it as an OpenAI and Anthropic compatible service. This allows you to use GitHub Copilot with any tool that supports the OpenAI Chat Completions API or the Anthropic Messages API, including to power [Claude Code](https://docs.anthropic.com/en/docs/claude-code/overview).
1111

1212
## Demo
1313

@@ -82,6 +82,7 @@ The following command line options are available for the `start` command:
8282
| --rate-limit | Rate limit in seconds between requests | none | -r |
8383
| --wait | Wait instead of error when rate limit is hit | false | -w |
8484
| --github-token | Provide GitHub token directly (must be generated using the `auth` subcommand) | none | -g |
85+
| --claude-code | Generate a command to launch Claude Code with Copilot API config | false | -c |
8586

8687
### Auth Command Options
8788

@@ -148,6 +149,22 @@ npx copilot-api@latest auth
148149
npx copilot-api@latest auth --verbose
149150
```
150151

152+
## Using with Claude Code
153+
154+
This proxy can be used to power [Claude Code](https://docs.anthropic.com/en/claude-code), an experimental conversational AI assistant for developers from Anthropic.
155+
156+
To get started, run the `start` command with the `--claude-code` flag:
157+
158+
```sh
159+
npx copilot-api@latest start --claude-code
160+
```
161+
162+
You will be prompted to select a primary model and a "small, fast" model for background tasks. After selecting the models, a command will be copied to your clipboard. This command sets the necessary environment variables for Claude Code to use the proxy.
163+
164+
Paste and run this command in a new terminal to launch Claude Code.
165+
166+
You can find more options here: [Claude Code settings](https://docs.anthropic.com/en/docs/claude-code/settings#environment-variables)
167+
151168
## Running from Source
152169

153170
The project can be run from source in several ways:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "copilot-api",
33
"version": "0.4.0",
4-
"description": "A wrapper around GitHub Copilot API to make it OpenAI compatible, making it usable for other tools.",
4+
"description": "A wrapper around GitHub Copilot API to make it OpenAI and Anthropic compatible, making it usable for other tools like Claude Code.",
55
"keywords": [
66
"proxy",
77
"github-copilot",

0 commit comments

Comments
 (0)