GitHub Copilot CLI is GitHub's AI-coderingagent voor de terminal. Het kan uw codebasis begrijpen, wijzigingen aanbrengen, opdrachten uitvoeren en u helpen sneller software te bouwen.
Open modellen kunnen worden gebruikt met Copilot CLI via Ollama, waardoor u modellen zoals qwen3.5, glm-5.1:cloud en kimi-k2.5:cloud kunt gebruiken.
Installatie
Installeer Copilot CLI:
shell
brew install copilot-clishell
npm install -g @github/copilotshell
curl -fsSL https://gh.io/copilot-install | bashpowershell
winget install GitHub.CopilotGebruik met Ollama
Snelle installatie
shell
ollama launch copilotDirect uitvoeren met een model
shell
ollama launch copilot --model kimi-k2.5:cloudAanbevolen modellen
kimi-k2.5:cloudglm-5:cloudminimax-m2.7:cloudqwen3.5:cloudglm-4.7-flashqwen3.5
Cloudmodellen zijn ook beschikbaar op ollama.com/search?c=cloud.
Niet-interactieve (headless) modus
Voer Copilot CLI uit zonder interactie voor gebruik in Docker, CI/CD of scripts:
shell
ollama launch copilot --model kimi-k2.5:cloud --yes -- -p "how does this repository work?"De --yes vlag haalt het model automatisch op, slaat selectoren over en vereist dat --model is opgegeven. Argumenten na -- worden direct doorgegeven aan Copilot CLI.
Handmatige installatie
Copilot CLI maakt verbinding met Ollama via de OpenAI-compatibele API met behulp van omgevingsvariabelen.
- Stel de omgevingsvariabelen in:
shell
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- Voer Copilot CLI uit:
shell
copilotOf voer het uit met omgevingsvariabelen inline:
shell
COPILOT_PROVIDER_BASE_URL=http://localhost:11434/v1 COPILOT_PROVIDER_API_KEY= COPILOT_PROVIDER_WIRE_API=responses COPILOT_MODEL=glm-5:cloud copilotOpmerking: Copilot vereist een groot contextvenster. We raden ten minste 64k tokens aan. Zie de contextlengte-documentatie voor het aanpassen van de contextlengte in Ollama.