Get new issues of The GitHub Insider in your inbox. Sign up now →
The GitHub Insider
Just keeps getting better and better  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏
GitHub

Welcome to The GitHub Insider newsletter! This edition, we’re focused on our favorite pair programmer, GitHub Copilot, along with how you can get the most out of the newly-released GitHub Copilot Chat inside Visual Studio Code.

We’ll also offer some tips for getting started with GitHub Copilot in the CLI and some things you didn’t know you could do with GitHub Copilot.

One of the best parts of using AI for coding assistance is that it can save time and let us focus less on the Sturm und Drang of reading API documentation, looking up command-line definitions, or even knowing how to get started on a specific project—and more time doing the fun stuff, you know, coding! Keep in mind, we call it “Copilot” for a reason; you’re still in control and you’re still doing the work, but the AI is helping you get more done more efficiently.

GitHub Copilot Chat is available for everyone

Out now GIF

At the end of December, GitHub Copilot Chat became available to all GitHub Copilot users.

So, what is Copilot Chat? Well, think about it as adding a chat assistant, powered by GitHub Copilot, directly into your IDE. Using the extension for Visual Studio Code or Visual Studio (and in beta for JetBrains IDEs), you can ask questions about your codebase, get suggestions, and even convert code from one language to another.

It’s powered by GPT-4, so the results are really good and lots of us find it easier to ask questions in a chat window while coding than to have to switch windows and do an internet search.

Behind the scenes of Copilot Chat

One of the stand-out parts of Copilot Chat inside VS Code is the agents feature, which lets you ask an agent (right now, @workspace, @terminal, and @vscode) for specific information in a certain context—in this case your workspace, your terminal, and VS Code itself.

You can @ the specific agents (and VS Code is proposing an API where developers can build their own agents into their VS Code extensions) to accomplish certain tasks.

So, I could ask @workspace to help me create a new scaffold for a Django project and GitHub Copilot will give me a layout of what a Django project scaffold in VS Code might look like. Even better, I can then create that workspace right from GitHub Copilot.

For an in-depth review of how the GitHub Copilot Chat extension works, along with other big updates in VS Code like VS Code Speech and Smart Actions, check out this video from the VS Code team!

GitHub Copilot just got a whole lot smarter

Getting started with GitHub Copilot in the CLI

GitHub Copilot isn’t just in your favorite code editor, it’s also available inside the GitHub CLI. That means you can get the power of GitHub Copilot, but inside the terminal. You can ask questions about the command line and get explanations of commands.

So, if you’re the type of person who still confuses when to use git merge vs Git rebase (ahem me), you can ask right inside the CLI.

To get started, you first need to install the GitHub CLI. Once you’ve got it installed, you just need to install the GitHub Copilot extension.

Do that by running the following command:

gh extension install github/gh-copilot

Now, you can just call up GitHub Copilot by using gh copilot command along with either config, explain, or suggest.

Using gh copilot explain will explain how a certain command works or how to accomplish a certain task. gh copilot suggest will walk you through an interactive shell to suggest commands for tasks you want to accomplish, like say, installing Git.

But a hidden gem is that you can ask GitHub Copilot in the CLI for help in configuring scripts or flags in the command line.

Let’s use a real example. Let’s say you frequently need to convert animated GIFs into MP4s and need to ensure that the MP4 will playback on an array of devices, including QuickTime on the Mac (which requires a specific settings) using the open source library FFmpeg.

You could scour the FFmpeg manual and memorize a bunch of commands, or you could ask GitHub Copilot in the CLI to help you write a script that you can add to your dotfiles.

Screenshot of code

You can learn more about GitHub Copilot in the CLI on our docs page.

Things you didn’t know you could do with GitHub Copilot

One of our favorite Hubbers, Kedasha Kerr, recently published a post on the GitHub Blog titled, 10 unexpected ways to use GitHub Copilot that is definitely worth a read.

My favorite example was how Kedasha used GitHub Copilot to write a GitHub Action to bulk close more than 1,000 GitHub Issues.

GIF of GitHub issues closing rapidly

This took a little bit of trouble-shooting and some trial and error, but Kedasha was able to create a GitHub Action significantly faster than if she hadn’t used GitHub Copilot, let alone if she had tried to close all 1,000 issues manually.

Be sure to check out the other examples on the GitHub Blog.

Get started with GitHub Copilot


✨ This newsletter was written by Christina Warren and produced by Gwen Davis


Master GitHub Copilot with our 101 course

6 lessons to become a pro 🌈

Unlock the power of collaborative coding. From setup to advanced programming techniques, this course covers it all.

Get started now

Subscribe to our LinkedIn newsletter 🚀

Do your best work on GitHub. Subscribe to our LinkedIn newsletter, Branching Out_.

Sign up now



Join our GitHub Copilot conversations 🤖

Visit our community forum to see what people are saying + offer your own two cents.

Visit now




GitHub

The world’s leading AI-powered developer platform.