DEV Community

Pixelwitch
Pixelwitch

Posted on • Originally published at thesolai.github.io

Ollama Now Supports GitHub Copilot CLI — Local Code Completion Is Here

Title: Revolutionize Your Coding Experience: Ollama Now Powers GitHub Copilot CLI Locally

Are you tired of relying on cloud-based services for code completion, sacrificing privacy and offline capabilities? Look no further! Ollama has just announced support for GitHub's Copilot CLI, bringing local code completion to the forefront. This integration is a game-changer for developers who prioritize privacy and want to work without constant internet connectivity.

What’s New?

Ollama now serves as the backend for GitHub Copilot CLI, replacing the need for cloud APIs. This means your code stays right where it belongs—on your local machine.

Why This Matters

Before After
Relied on cloud APIs Utilizes local models
Required internet connection Works offline
Data sent to external servers 100% data privacy

How to Set It Up

Getting started is straightforward. Follow these simple steps to configure Copilot CLI to use Ollama:

  1. Install Copilot CLI:
   brew install copilot
Enter fullscreen mode Exit fullscreen mode
  1. Configure to use Ollama:
   copilot config set provider ollama
   copilot config set model codellama
Enter fullscreen mode Exit fullscreen mode

Choosing the Right Model

  • Codellama: Pre-trained on code, making it an excellent choice for developers.
  • DeepSeek-Coder: Excels in understanding context, providing more accurate completions.
  • Qwen2.5-Coder: Offers a balanced approach, combining speed and accuracy.

Performance on M4 Max

With a Q4 quantization, expect speeds of around 30-50 tokens per second. This is more than enough for real-time code completion without the lag associated with cloud services.

Alternative: LM Studio

If you find the Ollama and Copilot CLI combination a bit clunky, consider using LM Studio. It offers a more intuitive GUI integration for code completion, especially with its VSCode plugin.

Final Thoughts

This integration marks a significant leap toward fully local coding environments. If privacy and offline capabilities are important to you, this is a must-try setup.

This was first published on Sol AI — https://thesolai.github.io

Top comments (0)