GitHub Copilot isn’t exactly a new product. It was announced in June 2021 and was initially only available in technical preview for select accounts. A year later, it was released to the public at $10/month. It was powered by OpenAI’s Codex model, a variant of the original GPT-3 model, optimized for code generation. GitHub kept improving the model behind it, increasing context retention and providing better suggestions.
According to a report by GitHub in Feb 2023, 46% of all new code was being generated by Copilot.
GitHub’s CEO, Thomas Dohmke stated recently that he believes that sooner rather than later, we’ll see about 80% of all code being generated by Copilot. While this can be taken as a hyperbole by an enthusiastic CEO trying to hype their product, the stats do show the Copilot is a huge productivity gain already.
Time for a shake-up: The launch of ChatGPT
OpenAI launched ChatGPT in November 2022, initially based on the GPT 3.5 model. It introduced the general world to the powers of an LLM which programmers had harnessed for some time. It also proved to be capable of generating large amounts of code better than the Codex model used by GitHub. Programmers quickly developed plugins to let them use the product in their IDEs and editors. While it often hallucinated and generated wrong outputs in many cases, the promise far outweighed the potential issues.
Then, GPT-4 came out, and it exceeded anything that had come before in terms of reasoning and analytical abilities as well as code generation. Its excellent context window allowed it to digest large amounts of code and generate in-context outputs. A team at GitHub appropriately called Next was closely working with OpenAI through all of this, and in March 2023, launched the product's next iteration, called Copilot X.
GitHub Copilot X
Copilot X is GitHub’s vision for the future of Software Development. Instead of being a standalone tool like Copilot, it’s more of a suite of tools and products. GitHub wants Copilot X to go beyond the editor and be an assistant to developers throughout the development cycle, and so, it goes from IDE to the terminal to GitHub itself and includes some wonderful new additions that are promised to increase developer productivity manifolds.
All of the Copilot X tools are currently in technical preview and require signing up individually. If you'd like to receive access, you can sign up for the technical previews here.
GitHub Copilot Chat
GitHub Copilot Chat is the direct successor of the original Copilot. Think of ChatGPT but in your editor. You can use it to explain, debug, edit, and test your code. It works across languages, and across projects and is currently available to use in Visual Studio and Visual Studio Code.
Once you have access, there are two ways to interact with Copilot inside VS Code. You can
- Use the dedicated chat window in the left pane to ask it questions, or generate code for you. By default, it’ll answer questions with the currently open file being used as the context. If you select a specific block of code, it’ll be used as context instead.
- Start chatting about the code in the editor window itself by selecting code and hitting Ctrl + I (or select Copilot > Start Chat) from the context menu.
Copilot for Docs
If you’re a developer in the habit of prepending Android or mdn to your searches, your life may become easier with the launch of Copilot for Docs. Copilot for Docs is a tool constantly trained on major documentation like that of GitHub, React, MDN, Azure, TypeScript, and Webpack. GitHub plans to expand it far more in the future.
It can answer your questions without you having to sift through a mountain of doc pages to locate that one specific code sample that can solve your problem at hand. It sources content directly from the GitHub repos, so the answers are constantly fresh and in sync with newly published changes to the library/tool you’re using. It provides sources for the information where possible so you can dive deeper into the doc yourself if you’d like, and can also combine answers across stacks like how do I use React with TypeScript?
Copilot for Pull Requests
As the name probably describes, Copilot for PRs can generate pull request bodies, mention relevant sections, tag the right people, and take the work out of getting your PR merged by following the correct template. It can also point out any tests that you forgot to write for a new feature or an update. It’s also supposed to help developers review code, resulting in even faster merge times.
This feature is being used internally at GitHub and is available to very few select developers outside of the organization, and it’s still being worked on, so don’t be disheartened if you don’t receive access. We didn’t either.
Copilot for CLI
I will be a perfectly happy person if I don’t have to remember every flag of awk and sed anymore. The need to remember the litany of terminal commands and their corresponding flags may finally be over with the introduction of a copilot to your own terminal. Forgot what was the command to go 5 commits back and create a new branch from there in Git. Worry not, Copilot’s got you. Just describe your problem, and it generates commands and even entire scripts to achieve the solution.
From Christian Heilmann
It has three modes:
- <span class="text-color-code">??</span> generates general commands, like that for using grep.
- <span class="text-color-code">git?</span> is optimized for generating git commands, so you can ask it to delete a branch on both local and remote, and it’ll do so.
- <span class="text-color-code">gh?</span> is optimized for GitHub’s CLI tool, so you can use it to view PRs, check issues and others.
Once a command is generated, you can either run it, revise your query or exit the flow.
Copilot Voice
Copilot Voice is the feature I’m perhaps most excited for. It lets developers write code using natural language. What that means is that you can literally describe the code to your computer using your voice and it’ll generate the right code in the editor for you without you having to ever touch the keyboard.
You can just go “Create a Fragment”, “Add a button with a text that says Connect with blue background and orange borders” and all of it is just written for you! You can even control your entire IDE with it, for example, saying go to “ProfileFragment” will open that file for you.
It was earlier known as Hey GitHub, and is now seemingly powered by Whisper or an equivalent model from OpenAI, which GitHub’s parent company Microsoft has a $10 Billion partnership deal with. It can usher in a new era of accessibility for developers, allowing people with the likes of Carpal Tunnel Syndrome to code effortlessly, while also allowing developers to remain somewhat mobile resulting in better health.
Future
As we glance towards what's next, GitHub Copilot X emerges as a cutting-edge mix of AI and software development, providing tools that could reshape the way we code. However, it's important to remember that it's still in the experimental phase. The potential is massive to make coding more efficient, but how well it will work depends on its use and improvement over time. The coming years might see this tool changing the coding landscape significantly, but it requires a sensible mix of excitement and caution from us. If we approach this thoughtfully, we might be on the brink of an exciting and productive new chapter in software development.
Send us a quick query