Home / Agents / GitHub Copilot CLI

GitHub Copilot CLI

GitHub's terminal coding agent, with bring-your-own-endpoint support

GitHub (Microsoft) OpenAI-compatible macOSLinuxWindows

GitHub Copilot CLI brings the Copilot coding agent to your terminal: it reads code, edits files, runs commands and looks up issues/PRs. It is a closed-source tool (npm package @github/copilot, proprietary licence, no source). In its default mode it goes through GitHub's own model routing, which needs a signed-in GitHub account plus an active Copilot subscription (billed in premium requests). But it ships an official BYOK (bring-your-own-key) mode: set COPILOT_PROVIDER_BASE_URL and requests go straight to the OpenAI-compatible endpoint you name - the official docs state GitHub authentication is not required in that mode. Point that variable at our gateway and it works; this page only shows how to connect, we do not manage your GitHub account or subscription.

Base URL (root)https://quantoport.comPut this in each tool's base_url or *_BASE_URL setting.
OpenAI-compatible pathhttps://quantoport.com/v1Append /v1 for anything speaking the OpenAI wire (/v1/chat/completions).
Recommended modelsgpt-5.5claude-sonnet-5deepseek-v4-proNames published in our own catalogue — confirm the live list for your key with GET /v1/models.

Skip it — one-line setup

The script installs GitHub Copilot CLI from its official source, writes the gateway settings into the tool's own config file (backing up any existing one) and runs a live check. It asks for your gateway key, or take it from --key / --key-file. --uninstall restores exactly what it wrote.

shell
curl -fsSL https://quantoport.com/agents/copilot-cli/setup | bash

1 · Install

Install GitHub Copilot CLI from its own official source.

install
npm install -g @github/copilot   # needs Node.js 20+; or use the official installer: curl -fsSL https://gh.io/copilot-install | bash; Windows: winget install GitHub.Copilot

2 · Configure — point it at QuantoPort

Gateway base URL https://quantoport.com; get your key from the console.

config
BYOK is official and is driven purely by environment variables (there is no config-file setting for it):
1) Set four variables (base URL points at the gateway's OpenAI-compatible path, including /v1):
   export COPILOT_PROVIDER_BASE_URL="https://quantoport.com/v1"
   export COPILOT_PROVIDER_TYPE="openai"
   export COPILOT_PROVIDER_API_KEY="YOUR_API_KEY"
   export COPILOT_MODEL="YOUR_MODEL"
On the China endpoint use base_url https://api.shinlinkai.com/v1 (OpenAI-compatible /v1/chat/completions only).
2) Recommended: put those four lines in a file under ~/.copilot/ (chmod 600) and source it from ~/.bashrc.
3) Non-interactive/scripted runs must add --allow-all-tools (or export COPILOT_ALLOW_ALL=true), otherwise it waits for approval.
4) Back up ~/.bashrc and any existing env file before editing; our one-line script does that for you.

3 · Verify

One request proves you are on our channel.

verify
copilot -p "reply with OK" --allow-all-tools -s
# Expected output: OK (this already runs through the gateway; add -v or check ~/.copilot/logs/ to see requests going to COPILOT_PROVIDER_BASE_URL)

4 · Common pitfalls

  • GitHub Copilot CLI is closed source: the npm package is @github/copilot, LICENSE.md is proprietary, and no source is provided.
  • Keep the two modes apart: default mode = GitHub account + active Copilot subscription, models routed by GitHub, billed in premium requests; BYOK mode = the official docs state GitHub authentication is not required and requests go straight to COPILOT_PROVIDER_BASE_URL. Connecting to our gateway uses BYOK.
  • We only provide the connection method; we do not manage or resell your GitHub account or subscription.
  • BYOK is environment-variable only; after writing an env file, source it in a new shell (or re-open the terminal) - you can also export once in the current session.
  • The model name must be one the gateway actually serves; COPILOT_PROVIDER_WIRE_MODEL overrides the model name sent to the gateway, while COPILOT_PROVIDER_MODEL_ID selects the agent-side model config (token limits, tool support).
  • Non-interactive runs (copilot -p) must add --allow-all-tools or COPILOT_ALLOW_ALL=true, or it blocks waiting for tool approval.
  • BYOK works without a GitHub subscription; if a GitHub login is also present, the BYOK variables take precedence.
  • Wire formats: both sites serve the OpenAI-compatible /v1/chat/completions, which is what BYOK uses by default; https://quantoport.com additionally serves /v1/responses, so you may add export COPILOT_PROVIDER_WIRE_API="responses" (with COPILOT_PROVIDER_TYPE=openai) there, while https://api.shinlinkai.com has no /v1/responses and that variable must not be set.

Sources for the tool-side steps: docs.github.com/en/copilot/how-tos/set-up/install-copilot-cl docs.github.com/en/copilot/concepts/agents/about-copilot-cli github.com/github/copilot-cli www.npmjs.com/package/@github/copilot