Localpilot – A Free, 100% Offline GitHub Copilot Clone for Your Mac

We know how GitHub Copilot has revolutionized the developer’s toolkit. This paid AI service, offered by GitHub/Microsoft, excels at generating code, enabling faster and more efficient work. As someone who isn’t a developer, I find this tool incredibly helpful in achieving my goals without much hassle.

However, there’s a caveat: GitHub Copilot is an online service. This means that a shaky internet connection can quickly lead to frustration, and that’s where Localpilot steps in.

Localpilot is a tool that allows you to have the equivalent of GitHub Copilot locally on your MacBook M1/M2 with just one click, using models like CodeLlama or Mistral. This becomes particularly handy when you’re stuck on a train without Wi-Fi or dealing with an internet connection as slow as a snail. Of course, at any time, you can switch back to the real Copilot online.

To install Localpilot, open VS Code Settings and add the following to your settings.json file:

"github.copilot.advanced": { "debug.testOverrideProxyUrl": "http://localhost:5001", "debug.overrideProxyUrl": "http://localhost:5001" }

Next, create a virtualenv to launch this Python process, install the prerequisites, and download the templates:

virtualenv venv source venv/bin/activate pip install -r requirements.txt # First run of the installation. Multiple models will be downloaded to your ~/models folder. python app.py --setup

Then, all you have to do is launch the creature like this:

python app.py

Once everything is set up, you can use GitHub Copilot locally without worrying about connection issues, latency, or pricing since it’s cheaper than free ^^.

Localpilot’s performance can vary based on the complexity of the functions you’re trying to generate and the model you’re using. But, in general, the tool does a commendable job and proves extremely useful for developers who prefer working offline or encounter connection issues.

See also  Google Bard vs. ChatGPT vs. Bing Chat vs Claude 2: Which is Better?

I hope this piques your interest!


5/5 - (4 votes)

Mohamed SAKHRI

I am Mohamed SAKHRI, the creator and editor-in-chief of Tech To Geek, where I've demonstrated my passion for technology through extensive blogging. My expertise spans various operating systems, including Windows, Linux, macOS, and Android, with a focus on providing practical and valuable guides. Additionally, I delve into WordPress-related subjects. You can find more about me on my Linkedin!, Twitter!, Reddit

Leave a Comment