@lioneltay/claude-pilot
v0.1.15
Published
CLI to run Claude Code through GitHub Copilot's API
Maintainers
Readme
Claude Pilot
Run Claude Code through GitHub Copilot's API.
Prerequisites
1. GitHub Copilot Subscription
You need an active GitHub Copilot subscription (Individual, Business, or Enterprise).
2. Copilot CLI
npm install -g @github/copilot3. Claude Code
npm install -g @anthropic-ai/claude-codeInstallation
npm install -g @lioneltay/claude-pilotQuick Start
# 1. Authenticate with GitHub Copilot
claude-pilot login
# 2. Run Claude Code (proxy starts automatically)
claude-pilotFeatures
- Web Search - Works via Copilot CLI
- Auto Token Refresh - Copilot tokens refresh automatically before expiry
- Dashboard - Web-based log viewer at
http://localhost:51080/ - Zero Config - Proxy auto-starts and finds an available port
Commands
claude-pilot
Run Claude Code with the proxy. If no arguments are provided, launches Claude Code interactively. Any arguments are passed through to Claude.
# Interactive mode
claude-pilot
# Pass arguments to claude
claude-pilot --help
claude-pilot "explain this codebase"The proxy starts automatically if not already running.
claude-pilot login
Authenticate with GitHub Copilot using the device flow.
claude-pilot loginThis will:
- Display a code and URL
- Open GitHub in your browser
- Enter the code to authorize
- Save credentials to
~/.config/claude-pilot/auth.json
claude-pilot logout
Clear credentials and stop the proxy.
claude-pilot logoutclaude-pilot start
Start the proxy server in the background.
claude-pilot start
claude-pilot start -p 8080 # Custom portclaude-pilot stop
Stop the running proxy server.
claude-pilot stopclaude-pilot status
Show proxy status and authentication state.
claude-pilot statusclaude-pilot dashboard
Open the log viewer dashboard in your browser.
claude-pilot dashboardConfiguration
All configuration is stored in ~/.config/claude-pilot/:
| File | Description |
| ---------------- | ------------------------------- |
| auth.json | GitHub and Copilot tokens |
| daemon.json | Running proxy state (PID, port) |
| server.log | Proxy server logs |
| requests.jsonl | Request/response logs |
How It Works
Claude Pilot runs a local proxy that:
- Receives requests from Claude Code in Anthropic's Messages API format
- Transforms them to OpenAI's Chat Completions format
- Forwards to GitHub Copilot's API
- Transforms responses back to Anthropic format
This allows Claude Code to work with your existing GitHub Copilot subscription.
Troubleshooting
"Copilot CLI not found"
Make sure the Copilot CLI is installed and in your PATH:
copilot --versionIf not installed, see Prerequisites.
"Claude CLI not found"
Make sure Claude Code is installed:
claude --versionIf not installed, see Prerequisites.
"Token expired"
Re-authenticate:
claude-pilot loginCheck logs
# Server logs
cat ~/.config/claude-pilot/server.log
# Request logs
cat ~/.config/claude-pilot/requests.jsonl | jq .License
MIT
