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.

I hope this piques your interest!


"Because of the Google update, I, like many other blogs, lost a lot of traffic."

Join the Newsletter

Please, subscribe to get our latest content by email.

Mohamed SAKHRI
Mohamed SAKHRI

I'm the creator and editor-in-chief of Tech To Geek. Through this little blog, I share with you my passion for technology. I specialize in various operating systems such as Windows, Linux, macOS, and Android, focusing on providing practical and valuable guides.

Articles: 1417

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Leave a Reply

Your email address will not be published. Required fields are marked *