Skip to content
Back to skills

1785 Github Bc027382

ASecurity

Aider can connect to GitHub Copilot’s LLMs because Copilot exposes a standard **OpenAI-style** endpoint at: ``` https://api.githubcopilot.com ``` First, install aider: {% include install.md %} ---

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added June 1, 2026
ai-agentsgoshellbashgitapi

Works with

  • vscode
  • api

Security analysis

A96/100
  • mediumUses curl or wget to download content

Pro scans all 2 files and shows the line behind each finding

Scanned June 1, 2026

npx -y skills add tools-only/X-Skills --skill 1785-github_bc027382 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 1785 Github Bc027382?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 1785 Github Bc027382
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-1785-github-bc027382/badge)](https://www.skillsdirectory.com/skills/tools-only-1785-github-bc027382)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
parent: Connecting to LLMs
nav_order: 510
---

# GitHub Copilot

Aider can connect to GitHub Copilot’s LLMs because Copilot exposes a standard **OpenAI-style**
endpoint at:

```
https://api.githubcopilot.com
```

First, install aider:

{% include install.md %}

---

## Configure your environment

```bash
# macOS/Linux
export OPENAI_API_BASE=https://api.githubcopilot.com
export OPENAI_API_KEY=<oauth_token>

# Windows (PowerShell)
setx OPENAI_API_BASE https://api.githubcopilot.com
setx OPENAI_API_KEY  <oauth_token>
# …restart the shell after setx commands
```

---

### Where do I get the token?
The easiest path is to sign in to Copilot from any JetBrains IDE (PyCharm, GoLand, etc).
After you authenticate a file appears:

```
~/.config/github-copilot/apps.json
```

On Windows the config can be found in:

```
~\AppData\Local\github-copilot\apps.json
```

Copy the `oauth_token` value – that string is your `OPENAI_API_KEY`.

*Note:* tokens created by the Neovim **copilot.lua** plugin (old `hosts.json`) sometimes lack the
needed scopes. If you see “access to this endpoint is forbidden”, regenerate the token with a
JetBrains IDE.

---

## Discover available models

Copilot hosts many models (OpenAI, Anthropic, Google, etc).  
List the models your subscription allows with:

```bash
curl -s https://api.githubcopilot.com/models \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Copilot-Integration-Id: vscode-chat" | jq -r '.data[].id'
```

Each returned ID can be used with aider by **prefixing it with `openai/`**:

```bash
aider --model openai/gpt-4o
# or
aider --model openai/claude-3.7-sonnet-thought
```

---

## Quick start

```bash
# change into your project
cd /to/your/project

# talk to Copilot
aider --model openai/gpt-4o
```

---

## Optional config file (`~/.aider.conf.yml`)

```yaml
openai-api-base: https://api.githubcopilot.com
openai-api-key:  "<oauth_token>"
model:           openai/gpt-4o
weak-model:      openai/gpt-4o-mini
show-model-warnings: false
```

---

## FAQ

* Calls made through aider are billed through your Copilot subscription  
  (aider will still print *estimated* costs).
* The Copilot docs explicitly allow third-party “agents” that hit this API – aider is playing by
  the rules.
* Aider talks directly to the REST endpoint—no web-UI scraping or browser automation.

Files in this skill

  • README.md813 B
  • skill.md2.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.