# Copilot CLI

Use GitHub Copilot CLI for multi-model cloud analysis powered by GitHub's AI infrastructure. Copilot CLI supports Claude, GPT, and Gemini model families through a single tool.

## Requirements

* `copilot` CLI installed.
* GitHub authentication completed (`copilot auth login` or active GitHub session).

## Setup

1. Install CLI:

```bash
brew install copilot-cli
```

2. Authenticate:

```bash
copilot auth login
```

3. Verify locally:

```bash
copilot -p "hello"
```

4. Configure in **AI Backend** settings tab.

## Configuration

| Setting                 | Value                  |
| ----------------------- | ---------------------- |
| **Preferred Backend**   | `Copilot CLI`          |
| **Copilot CLI Command** | `copilot` or full path |

Model examples:

```bash
copilot --model claude-sonnet-4.6
copilot --model gpt-5.2
copilot --model gemini-3-pro-preview
```

Available models include: `claude-sonnet-4.6`, `claude-sonnet-4.5`, `claude-haiku-4.5`, `claude-opus-4.6`, `gpt-5.2`, `gpt-5.1-codex`, `gpt-5-mini`, `gemini-3-pro-preview`, and others.

## Notes

### Large Prompt Fallback

For prompts above `32_000` characters, the extension writes the combined prompt to a `burp_uv_prompt_*.txt` temp file (POSIX `0600` where supported) and passes its path to Copilot with an instruction to read the file. The temp file is deleted in a `finally` block once the response is consumed. This avoids OS-level argv/stdin length limits on long contexts.

### Non-Interactive Mode

The extension invokes Copilot CLI with `-p` (non-interactive) flag, which executes the prompt and exits after completion.

### Windows

npm-installed CLI shims are resolved automatically on Windows. The extension detects `.cmd` siblings and uses them instead of shell script shims that Java cannot execute directly.

## Troubleshooting

{% hint style="info" %}

* `command not found`: use full binary path (e.g., `/opt/homebrew/bin/copilot`).
* Windows: npm shim paths are resolved automatically. If auto-resolution fails, use the full `.cmd` path.
* Auth issues: re-run `copilot auth login` or verify GitHub session.
* Empty output: check Burp extension output/errors tabs and model flag validity.
* Model errors: verify model name matches available choices with `copilot --help`.
  {% endhint %}

## Related Pages

* [Backends Overview](/backends/overview.md)
* [Troubleshooting](/reference/troubleshooting.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://burp-ai-agent.six2dez.com/backends/copilot-cli.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
