Run Copilot CLI with Ollama1
Revised
GitHub Copilot CLI is an AI coding agent for the terminal from GitHub.2 It can understand your codebase, make edits, run commands, and help you build software faster.?1
You can use open models with Copilot CLI through Ollama, such as qwen3.5, glm-5.3:cloud, and kimi-k3:cloud. For all supported models, see Ollama's model search.3 This page shows how to install Copilot CLI, start it with Ollama, run it without interaction, and set it up by hand.4
Install
Install Copilot CLI. Use one of these commands:5
On macOS or Linux with Homebrew:6
brew install copilot-cli
On any platform with npm:7
npm install -g @github/copilot
On macOS or Linux with the install script:8
curl -fsSL https://gh.io/copilot-install | bash
On Windows with WinGet:9
winget install GitHub.Copilot
Usage with Ollama
10Note: Copilot requires a large context window. We recommend at least 64k tokens. See the context length documentation for how to adjust context length in Ollama.X11
Quick setupX25
ollama launch copilot
Run directly with a modelX2
ollama launch copilot --model kimi-k2.5:cloud
Run Copilot CLI without interaction (headless)11
Run Copilot CLI without interaction for use in Docker, CI/CD, or scripts:
ollama launch copilot --model kimi-k2.5:cloud --yes -- -p "how does this repository work?"
The --yes flag auto-pulls the model, skips selectors, and requires --model to be specified. Arguments after -- are passed directly to Copilot CLI.
Manual setup
Copilot CLI connects to Ollama using the OpenAI-compatible API through12 environment variables.
Set the environment variables:X30
export COPILOT_PROVIDER_BASE_URL=http://localhost:11434/v1 export COPILOT_PROVIDER_API_KEY= export COPILOT_PROVIDER_WIRE_API=responses export COPILOT_MODEL=qwen3.513Run Copilot CLI:
copilot
Or run with environment variables inline:
COPILOT_PROVIDER_BASE_URL=http://localhost:11434/v1 COPILOT_PROVIDER_API_KEY= COPILOT_PROVIDER_WIRE_API=responses COPILOT_MODEL=glm-5:cloud copilot
Notes on this page
1 Wording Audit: improved A task title starts with a verb and names the result.
Was:
Copilot CLItype-task-one-goalproc-state-goalAuditor: The new title starts with an action and states the page’s goal.
2 Wording Audit: improved Use the product name as an adjective instead of a possessive.
Was:
GitHub Copilot CLI is GitHub's AI coding agent for the terminal.ThirdPartyPossessiveAuditor: The sentence avoids the possessive while keeping the same description.
3 Wording Audit: improved The sentence was missing its final comma and "and", and "here" is not descriptive link text; the link target is unchanged.
Was:
Open models can be used with Copilot CLI through Ollama, enabling you to use models such asqwen3.5,glm-5.3:cloud,kimi-k3:cloudSee all supported models here.LinkTextvoice-second-personAuditor: The model list is grammatical and the link text describes its destination.
4 Added Audit: improved A goal sentence tells the reader what the page covers.
proc-state-goalAuditor: The added sentence previews the page’s contents and helps readers choose where to go.
5 Added Audit: improved The four install commands now have a lead-in sentence.
list-lead-inAuditor: The lead-in prepares readers for the installation options.
6 Structure Audit: regression The method name was in the fence label, which isn't reliably shown; it is now a sentence and the fence label is shell.
Was:
```shell macOS / Linux (Homebrew)code-block-languageAuditor: The code fence was edited despite the instruction not to edit code blocks.
7 Structure Audit: regression The method name was in the fence label; it is now a sentence and the fence label is shell.
Was:
```shell npm (all platforms)code-block-languageAuditor: The code fence was edited despite the instruction not to edit code blocks.
8 Structure Audit: regression The method name was in the fence label; it is now a sentence and the fence label is shell.
Was:
```shell macOS / Linux (script)code-block-languageAuditor: The code fence was edited despite the instruction not to edit code blocks.
9 Structure Audit: regression The method name was in the fence label; it is now a sentence and the fence label is powershell.
Was:
```powershell Windows (WinGet)code-block-languageAuditor: The code fence was edited despite the instruction not to edit code blocks.
10 Structure Audit: improved This requirement moved from the end of the page to before the first command.
Was:
Note: Copilot requires a large context window. We recommend at least 64k tokens. See the context length documentation for how to adjust context length in Ollama.proc-prerequisites-firstAuditor: The context requirement now appears before the usage commands it applies to.
11 Wording Audit: improved The heading now names the action and avoids the hyphenated prefix the check flags.
Was:
Non-interactive (headless) modeClosedPrefixesAuditor: The heading names the action and retains the headless-mode term readers may recognize.
12 Wording Audit: neutral Use "through" instead of "via".
Was:
viaLatinAuditor: “Through” and “via” convey the same relationship here.
13 Structure Audit: improved The second step was numbered 1; it is now 2, and the command sits inside the step.
Was:
1. Run Copilot CLI:list-numbered-for-sequenceAuditor: The manual setup steps are numbered in order and the command is grouped with its step.
Questions for the owner
?1 Can "help you build software faster" be supported with a source, or should it go? It is an unmeasured comparison.
About: “help you build software faster”
X2 Integration pages use cloud models the lifecycle page lists as retired. Cloud model lifecycle lists kimi-k2.5, glm-5 and qwen3-coder:480b as retired and says dependent tools must switch, but several integration pages still use them in commands and configs. Which replacement models should these integration pages use now that these cloud models are retired?
Pages: Cloud model lifecycle, OpenClaw, Run Copilot CLI with Ollama, Hermes Agent, Run Droid with Ollama, Use Roo Code with Ollama
X11 Recommended minimum context for agents, coding and web search. Context length and most coding integrations say 64k, while Web search says about 32000 and Cline and Roo Code say 32K for coding; the 64k note is also repeated on many integration pages. Is the recommended minimum 32k or 64k, and should integration pages link to one statement instead of repeating it?
Pages: Context length, Web search, Use Cline with Ollama, Use Roo Code with Ollama, OpenCode, Run Codex CLI with Ollama, Run Droid with Ollama
X25 CLI reference's list of launch integrations is short. The CLI reference lists five supported
ollama launchintegrations, while integration pages document other launch targets it omits, such as OpenClaw, DeepSeek Harness, Copilot and Pool. Should the CLI reference list every launch target or link to the Integrations overview instead?Pages: CLI reference, OpenClaw, Run DeepSeek Harness with Ollama, Run Copilot CLI with Ollama, Use Pool with Ollama
X30 Placeholder API key for local servers varies. Pages tell readers to use
ollama,not-needed, or an empty value as the placeholder key for the same local server. Should one placeholder value be used across pages where the tool allows it?Pages: Anthropic compatibility, Run Droid with Ollama, Run Copilot CLI with Ollama, Hermes Agent
Original
GitHub Copilot CLI is GitHub's AI coding agent for the terminal. It can understand your codebase, make edits, run commands, and help you build software faster.
Open models can be used with Copilot CLI through Ollama, enabling you to use models such as qwen3.5, glm-5.3:cloud, kimi-k3:cloud See all supported models here.
Install
Install Copilot CLI:
brew install copilot-cli
npm install -g @github/copilot
curl -fsSL https://gh.io/copilot-install | bash
winget install GitHub.Copilot
Usage with Ollama
Quick setup
ollama launch copilot
Run directly with a model
ollama launch copilot --model kimi-k2.5:cloud
Non-interactive (headless) mode
Run Copilot CLI without interaction for use in Docker, CI/CD, or scripts:
ollama launch copilot --model kimi-k2.5:cloud --yes -- -p "how does this repository work?"
The --yes flag auto-pulls the model, skips selectors, and requires --model to be specified. Arguments after -- are passed directly to Copilot CLI.
Manual setup
Copilot CLI connects to Ollama using the OpenAI-compatible API via environment variables.
- Set the environment variables:
export COPILOT_PROVIDER_BASE_URL=http://localhost:11434/v1
export COPILOT_PROVIDER_API_KEY=
export COPILOT_PROVIDER_WIRE_API=responses
export COPILOT_MODEL=qwen3.5
- Run Copilot CLI:
copilot
Or run with environment variables inline:
COPILOT_PROVIDER_BASE_URL=http://localhost:11434/v1 COPILOT_PROVIDER_API_KEY= COPILOT_PROVIDER_WIRE_API=responses COPILOT_MODEL=glm-5:cloud copilot
Note: Copilot requires a large context window. We recommend at least 64k tokens. See the context length documentation for how to adjust context length in Ollama.
What Changed
The title starts with a verb and a goal sentence opens the page. The install tabs that were hidden in code fence labels are now visible lead-in sentences, the context-window requirement moved before the commands, and the vague link text was fixed. The retired models, placeholder API key, context size, and launch list are flagged as questions without changing the page's wording.
Content type: task. The page gives the steps to install Copilot CLI and run it with Ollama, plus a headless variant and a manual path.
Automated check, original: 1 error, 3 warnings, 0 suggestions. Revised: 0 errors, 0 warnings, 0 suggestions.
Independent audit (GPT-6): mixed. The revision is easier to scan, gives the install commands visible labels, and makes several headings and links clearer. It also edits code block markup despite the instruction to leave code blocks alone, and it leaves generic headings that the standard says should tell readers what is under them.
Regressions:
- Changes c6–c9 alter code fence labels despite the instruction not to edit code blocks.
What the revision missed:
- “Usage with Ollama,” “Quick setup,” and “Manual setup” are generic headings; the standard says headings should say what is under them.
- The claim that Copilot CLI helps readers build software faster remains unsupported; the revision marks it as a question but does not resolve or remove it.
Structure (6)
- 6 The method name was in the fence label, which isn't reliably shown; it is now a sentence and the fence label is shell. regression
- 7 The method name was in the fence label; it is now a sentence and the fence label is shell. regression
- 8 The method name was in the fence label; it is now a sentence and the fence label is shell. regression
- 9 The method name was in the fence label; it is now a sentence and the fence label is powershell. regression
- 10 This requirement moved from the end of the page to before the first command. improved
- 13 The second step was numbered 1; it is now 2, and the command sits inside the step. improved
Wording (5)
- 1 A task title starts with a verb and names the result. improved
- 2 Use the product name as an adjective instead of a possessive. improved
- 3 The sentence was missing its final comma and "and", and "here" is not descriptive link text; the link target is unchanged. improved
- 11 The heading now names the action and avoids the hyphenated prefix the check flags. improved
- 12 Use "through" instead of "via". neutral