Guide based on CLIProxyAPIPlus
v6.9.1-0-plus· Commands may vary in future versions.
Connect two powerful AI providers — GitHub Copilot and Kiro AI — to your self-hosted CLIProxyAPIPlus instance in minutes using OAuth device flow authentication.
Prerequisites
Before you begin, make sure you have the following in place:
| Requirement | Details |
|---|---|
| CLIProxyAPIPlus | Running via eceasy/cli-proxy-api-plus:latest |
| GitHub Copilot subscription | Individual, Business, or Enterprise |
| AWS Builder ID or Kiro IDE | For Kiro AI login |
| Docker | Installed and accessible in your shell |
Verify your container is running before proceeding:
docker ps | grep cli-proxy-api-plus
You should see cli-proxy-api-plus with status Up. If not, run docker compose up -d first.
Part 1 — GitHub Copilot
Step 1 · Run the Login Command
docker exec -it cli-proxy-api-plus ./CLIProxyAPIPlus -github-copilot-login
Step 2 · Complete Device Flow Authentication
The terminal will display a verification URL and a short code:
Visit: https://github.com/login/device
Enter code: ABCD-1234
Follow these steps in your browser:
- Open https://github.com/login/device
- Enter the device code shown in the terminal
- Click Authorize and confirm with your GitHub account
- Wait for the terminal to confirm success
Step 3 · Verify the Token Was Saved
ls ~/CLIProxyAPI/auths/
You should see a new auth file for Copilot (e.g., copilot.json).
Step 4 · Check Available Copilot Models
curl http://localhost:8317/v1/models \
-H "Authorization: Bearer your-api-key-1"
You should now see Copilot models including:
gpt-4ogpt-4o-miniclaude-sonnet-4-5o3o4-mini
Part 2 — Kiro AI
Important: Kiro uses AWS Cognito under the hood. This means Google OAuth is blocked for third-party apps. You must use one of the two supported methods below.
Method A · AWS Builder ID (Recommended)
This is the easiest method and does not require installing Kiro IDE.
Step 1 · Run the Login Command
docker exec -it cli-proxy-api-plus ./CLIProxyAPIPlus -kiro-aws-login
Step 2 · Complete Device Flow
The terminal will show a verification URL and code. Open the URL in your browser, enter the code, and sign in with your AWS Builder ID.
💡 Don’t have an AWS Builder ID?
Create one for free at https://profile.aws.amazon.com — no credit card required.
Step 3 · Verify Authentication
curl http://localhost:8317/v1/models \
-H "Authorization: Bearer your-api-key-1"
Kiro models should now appear in the list.
Method B · Import from Kiro IDE
Use this method if you already have Kiro IDE installed and logged in with Google.
Step 1 · Locate the Token File
ls ~/.kiro/kiro-auth-token.json
Step 2 · Copy the Token into the Container
docker cp ~/.kiro/kiro-auth-token.json \
cli-proxy-api-plus:/root/.kiro/kiro-auth-token.json
Step 3 · Import the Token
docker exec -it cli-proxy-api-plus ./CLIProxyAPIPlus -kiro-import
Part 3 — Verify Everything is Working
Run a quick test to confirm both providers are active:
curl http://localhost:8317/v1/models \
-H "Authorization: Bearer your-api-key-1" | jq '.data[].id'
You should see models from both GitHub Copilot and Kiro in the output.
Test a Completion Request
curl http://localhost:8317/v1/chat/completions \
-H "Authorization: Bearer your-api-key-1" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o",
"messages": [{"role": "user", "content": "Hello!"}]
}'
A successful JSON response confirms your setup is complete.
Troubleshooting
| Issue | Solution |
|---|---|
No such container |
Run docker compose up -d first |
address already in use |
Container is already running — auth still completes normally |
| Google login blocked (Kiro) | Use -kiro-aws-login instead |
| Token expired | Re-run the login command — tokens auto-refresh every 15 min |
| Models not showing up | Restart: docker compose restart |
Token Auto-Refresh
CLIProxyAPIPlus automatically refreshes OAuth tokens in the background every 15 minutes. You do not need to manually re-authenticate unless your session is fully revoked.
core auth auto-refresh started (interval=15m0s)
Summary
| Provider | Login Command | Auth Method |
|---|---|---|
| GitHub Copilot | -github-copilot-login |
Device flow |
| Kiro (AWS Builder ID) | -kiro-aws-login |
AWS Builder ID device flow |
| Kiro (IDE import) | -kiro-import |
Token file import |