Suppose you’re a software developer that hasn’t heard of Microsoft’s GitHub Copilot. In that case, I am curious about the amenities in the distant cave you must have been vacationing in for over a year. You have probably used or at least heard of Microsoft’s GitHub Copilot as a software developer. The crowdsourced code completion plugin has made waves throughout the global dev community since its launch in July 2021.
Then, the free beta period ended, and developers had to pay a subscription fee. Unsurprisingly, many of these users turned to Copilot alternatives.
Our list of the best alternatives to GitHub Copilot includes free and language-specific tools and paid services that charge a subscription fee. Before we compare and contrast them with GitHub Copilot, it’s worth going over the main features of the product Microsoft dubs “a first-of-its-kind AI pair programmer.”
What is GitHub Copilot?
According to GitHub and user reviews, Copilot can generate whole code lines, functions, tests, and documentation. All it needs is context and the behind-the-scenes work of developers who committed their code to GitHub, regardless of their software license.
When the Copilot beta ended, GitHub released the pricing for individual users. The subscription included a 60-day free trial, which would turn to $10/month or $100/year per user.
Why search for a GitHub Copilot alternative?
No free subscription
Free licenses are still available, but these are now limited to OSS maintainers and students only.
No midline code completion
As noted previously, Copilot requires a great deal of context to produce any code. The more context you provide, the more accurate the results will be. However, Copilot will only offer you the following line, function, or whole block of code based on context and cursor location. You still have to type entire lines and correct the code generated instead of saving the keystrokes by letting the tool autocomplete as you type.
AI models can’t run locally
Do you like to code offline or need to keep your code local for compliance reasons? Then Copilot is not for you. The AI models cannot run locally.
Top 9 GitHub Copilot Alternatives in 2022
One of the first code completion tools on the market is Tabnine (once known as Codota). Tabnine code completion plugin supports all the most popular languages, libraries, and frameworks in your favorite IDEs. Tabnine AI models are only trained on permissive open source licensed code, so your code will always remain yours.
A unique feature of the Tabnine Pro subscription is training your own private AI model based on your code and getting personalized code completions that match your style and patterns. This way, you don’t need to rely on code written by anyone else but yourself in your repositories.
For teams and organizations, the ability to host and train your own AI models enables collaborative autocompletion across IDEs. It also adds to code security as you get to keep the codebase and AI model on your secure corporate servers.
In addition, it’s worth noting that Tabnine requires a lot less context than Copilot to generate code for you. In fact, with Tabnine you get midline suggestions as you type rather than suggestions for the next line of code upon completing the previous one.
Pricing: Free account enabling short code completion, and Pro account starting at $12/month per user (free trial available). Enterprise account pricing is available on quote.
Developers and Stackoverflow are like human resources managers and LinkedIn. We need our platforms and tools. Captain Stack is an open-source VSCode plugin that is a bit of both. Inspired by Copilot, Captain Stack is a code suggestion tool that uses Google instead of AI. It sends your search query to Google, retrieves StackOverflow and Github Gist answers, and auto-completes them.
Another open source alternative to Copilot is GTP-Code-Clippy. According to the description, GPT-Code-Clippy (GPT-CC) is an open source version of GitHub Copilot, a language model (based on GPT-3, called GPT-Codex) that is fine-tuned on publicly available code from GitHub.
Similar to Captain Stack, GPT-CC is only available as a plugin for VSCode.
Second Mate is another open-source imitation of GitHub Copilot. It uses EleutherAI GPT-Neo-2.7B (via Huggingface Model Hub) for Emacs. It is a much smaller model, so it will likely not be as effective as Copilot or other alternatives. On the other hand, you can run it on Emacs, and it’s free.
IntelliCode is an experimental AI coding assistant trained on a subset of GitHub projects, a Microsoft product available for Visual Studio only. One of the more attractive features of IntelliCode is team completion. Team completion may prove beneficial for organizations with a Microsoft-based architecture and developers accustomed to Visual Studio in an age of remote working. However, if you’re looking for a cross-IDE solution that enables team autocompletion training, Tabnine supports this feature for all popular IDEs out there.
With Microsoft tempting developers through GitHub and Copilot, it was clear other tech giants would step in. In June 2022, Amazon launched its own AI pair programming tool named CodeWhisperer. CodeWhisperer was trained, according to Amazon, “on billions of lines of code drawn from open source repositories, internal Amazon repositories, API documentation, and forums.”
At the time of writing, CodeWhisperer is available in its preview version only upon signup and can be installed on any IDE that supports AWS IDE tools.
Pricing: Free (in preview)
Google ML-enhanced code completion
Google Transformer-based hybrid semantic ML code completion – you can’t expect Google to stay silent with Amazon and Microsoft on the scene. So, as expected, Google released its code completion engine in July 2022. However, at the time of writing, it is available only to developers working at Google itself.
If you’re a Vim user, you might want to look at YCM, a free autocompletion library for your favorite code editor. YouCompleteMe has several completion engines built in and supports any protocol-compliant Language Server to work with practically any language.
Though free and flexible, expect setup to be lengthy and complicated if you plan to code in more than one language.
Kite (not maintained)
The last solution in our list is worthy of mention because it is one of the more flexible and user-friendly solutions offered for free. Unfortunately, at the time of writing, Kite is unavailable for download and is not maintained.
Machines aren’t coming for your job. They’re coming for the boring parts that make your wrists ache. AI code prediction and completion tools and services are here to stay. It’s only a matter of choosing the most suitable platform for your needs, that will enable you to code faster and better.