> ## Documentation Index
> Fetch the complete documentation index at: https://docs.opper.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# GitHub Copilot CLI

> Run GitHub's terminal coding agent on any Opper model — no Copilot plan or GitHub login required

[GitHub Copilot CLI](https://github.com/github/copilot-cli) is GitHub's coding agent for the terminal. It supports custom model providers through environment variables, so it runs on any model in the Opper catalog — and with a custom provider configured, it needs no Copilot plan and no GitHub sign-in.

## Setup

```bash theme={null}
export COPILOT_PROVIDER_BASE_URL=https://api.opper.ai/v3/compat
export COPILOT_PROVIDER_TYPE=openai
export COPILOT_PROVIDER_API_KEY=your-opper-api-key
export COPILOT_MODEL=anthropic/claude-opus-4-8
copilot
```

`COPILOT_PROVIDER_TYPE` also accepts `anthropic` for the Anthropic Messages format — both work against Opper's gateway, which serves each surface from the same base URL. Run `copilot help providers` for the full reference.

<Note>
  GitHub documents `COPILOT_PROVIDER_BASE_URL` and `COPILOT_MODEL` as the required pair; the type and key variables are what point it at Opper specifically. GitHub's own BYOK docs don't spell out whether a Copilot plan stays mandatory, so if you're prompted to sign in on a managed or enterprise-provisioned install, that's your org's policy rather than the gateway.
</Note>

## Choosing a model

Set `COPILOT_MODEL` to any model ID from the [catalog](/capabilities/models). Copilot CLI needs tool calling and streaming — pick a model the catalog marks with the `tools` capability.

## Troubleshooting

<AccordionGroup>
  <Accordion title="It still asks me to sign in to GitHub">
    The provider variables have to be set before `copilot` starts, in the same shell. Check `COPILOT_PROVIDER_BASE_URL` and `COPILOT_MODEL` first — GitHub treats those two as required — then confirm `COPILOT_PROVIDER_TYPE` and `COPILOT_PROVIDER_API_KEY` are exported too.
  </Accordion>

  <Accordion title="404 Model Not Found">
    Copy the model ID exactly from the [catalog](/capabilities/models), including the provider prefix.
  </Accordion>

  <Accordion title="Tool calls fail or hang">
    The model needs tool-calling support. Check the model is marked with the `tools` capability in the catalog and switch if not.
  </Accordion>
</AccordionGroup>

## Related

<CardGroup cols={2}>
  <Card title="GitHub Copilot in VS Code" icon="https://mintcdn.com/opper/H-iiE_tAhHpUz1kK/images/tools/github-copilot.svg?fit=max&auto=format&n=H-iiE_tAhHpUz1kK&q=85&s=2adc18689aa5c4cee9df752dcce3aeb0" href="/integrations/editors/github-copilot" width="24" height="24" data-path="images/tools/github-copilot.svg">
    Copilot Chat and agent mode, via the Opper VS Code extension.
  </Card>

  <Card title="All integrations" icon="plug" href="/integrations/overview">
    Every app that runs on Opper.
  </Card>
</CardGroup>
