GitHub Copilot, which uses artificial intelligence (AI) to draw context from comments and suggests lines of codes in real-time, is now “generally available to all developers” for a monthly subscription fee of $10 or $100 annually, the Microsoft-owned company announced in a blog post. Students and maintainers of popular open-source projects can access copilot for free.
Until now it was available for testing to a select group of developers.
In addition to suggesting a line of code, GitHub Copilot can also suggest complete methods, boilerplate code, whole unit tests, and complex algorithms.
According to GitHub, AI-assisted coding will fundamentally change the nature of software development and will make writing codes faster and easier for developers. Developers will have to spend less time creating boilerplate and repetitive code patterns. Boilerplates are sections of code that are repeated in multiple places without any change.
This can also come in handy for developers working on a new language or framework.
Copilot uses a natural language processing (NLP) model, called Codex, which has been trained on billions of lines of open-source code. It understands both programming and human languages and can provide coding suggestions in dozens of programming languages. It also learns over time, which means the more it is used, the smarter and more accurate it becomes.
Copilot looks for prompts from developers, like a comment in English describing the logic they want, to make its suggestions.
It can be integrated with other leading code editors, including Neovim, JetBrains IDEs, Visual Studio, and Visual Studio Code.
Launched last June as part of a technical preview, Copilot has been a success with developers. GitHub said that where it is being used right now, 40% of code is written using Copilot in coding languages such as Python. On average more than 27% of developers’ code files across languages were generated by it. With wider availability, GitHub is expecting its use to grow.
GitHub acknowledges that Copilot is a work in progress. “It is designed to generate the best code possible given the context it has access to, but it doesn’t test the code it suggests so the code may not always work, or even make sense.”
Developers can choose to ignore the suggestions or edit them manually if they want, GitHub said.