Guest Christopher Nguyen Posted October 29 Posted October 29 GitHub Copilot users can now use the power of GitHub Copilot to get command suggestions and explanations without leaving the terminal with Terminal Chat in Windows Terminal Canary This is available for all GitHub Copilot Individual, Business, and Enterprise customers. To get started, sign up for a GitHub Copilot free trial and check out the GitHub Copilot quickstart guide. [HEADING=1]What is GitHub Copilot?[/HEADING] GitHub Copilot is an AI coding assistant that helps you write code faster and with less effort, allowing you to focus more energy on problem solving and collaboration. GitHub Copilot has been proven to increase developer productivity and accelerate the pace of software development. For more information, see “Research: quantifying GitHub Copilot’s impact on developer productivity and happiness” in the GitHub blog. [HEADING=1]What is Terminal Chat?[/HEADING] Terminal Chat is a feature in Windows Terminal Canary that allows the user to chat with an AI service (like GitHub Copilot ) to get intelligent suggestions in the context of their terminal. This feature does not ship with its own large-language model and can also be managed by Group Policy. See “Group Policies for Windows Terminal” for more information. [HEADING=1]Use GitHub Copilot in Terminal Chat[/HEADING] Connecting GitHub Copilot in Terminal Chat allows you to get command suggestions and explanations without leaving the terminal. This is available for all GitHub Copilot Individual, Business, and Enterprise customers. [HEADING=1]Prerequisites[/HEADING] Subscription to GitHub Copilot. If you don’t already have access to GitHub Copilot, you can set up a free trial or subscription Windows Terminal Canary. You can download the latest build of Windows Terminal Canary from the Windows Terminal GitHub repository If you have access to GitHub Copilot via your organization, you won’t be able to use GitHub Copilot if your organization owner has disabled GitHub Copilot in the CLI. See “Managing policies for Copilot in your organization.” [HEADING=1]Setup[/HEADING] Open the dropdown menu and select Settings Go to the Terminal Chat (Experimental) setting Under Service Providers, select GitHub Copilot and Authenticate via GitHub to sign in to your GitHub account After successfully authenticating, ensure that Set as active provider is checked and click Save After this, you will be able to use GitHub Copilot in Terminal Chat! In the GIF above, you will see an end-to-end demo of the authorization flow and how to use Terminal Chat. You’ll also notice that Terminal Chat transformed into a GitHub Copilot branded experience after signing into GitHub! Clicking on Terminal Chat’s suggestion will copy it to the input line of your terminal. Terminal Chat will not run the suggestion automatically for you– This way, you will have time to reason over the command before executing it Terminal Chat only communicates to GitHub Copilot when the user sends a message. The chat history and name of the user’s active shell is also appended to the message sent to GitHub Copilot. For more information on how to use GitHub Copilot responsibly with Windows Terminal, see Responsible use of GitHub Copilot in Windows Terminal. [HEADING=1]Tips & Tricks[/HEADING] Here are several ways that you can use GitHub Copilot in Terminal Chat! Command suggestions: Ask for a command that you would like to use. Terminal Chat also adds name of the active shell to the prompt that you send to GitHub Copilot. This helps us get answers tailored to the shell that is in use– This means we don’t have to specify if we want answers for CMD or PowerShell (Yay! Less typing!) Translate commands: Terminal Chat can also be used to “translate” commands. For example, you can ask “What’s touch in PowerShell?” or “How do I touch in PowerShell?” to get the suggestion of [iCODE]New-Item[/iCODE], a PowerShell command that is equivalent to the Linux / Unix-based [iCODE]touch[/iCODE] command for creating a new file Explain an error: If you’ve received an unfamiliar error response in your command line, you can ask Terminal Chat for an explanation and how to fix it. For example, “What is Error: getaddrinfo ENOTFOUND and how do I fix it?” Send code suggestions to command-line text editors: If you’re using a command-line text editor in WSL (like [iCODE]nano[/iCODE] or [iCODE]vi[/iCODE]), you can ask Terminal Chat to generate code and send the code suggestion to the editor by clicking the “Copy” button. See the GIF below for a demo! [HEADING=1]Let’s Build Together[/HEADING] For now, Terminal Chat is only available in Windows Terminal Canary. We are committed to transparency and listening to user feedback. We strongly believe that the inclusion of the open-source community will help us define the roadmap for our core product, Windows Terminal. If you are interested in the AI experiences that we are building, then check out the [iCODE]feature/llm[/iCODE] branch of the Windows Terminal repository or download the latest build of Windows Terminal Canary. If you have a feature request or found a bug, then please submit a new Issue on our GitHub repository. Send us feedback! Help us grow! And let’s build together! If you need to set Group Policies for Terminal Chat, see our Group Policy documentation. Lastly, if you want to explore the other features you get with a GitHub Copilot subscription (which includes GitHub Copilot in Visual Studio Code and Visual Studio!) then check out the GitHub Copilot website for more info! Thank you! The post GitHub Copilot in Windows Terminal appeared first on Windows Command Line. Continue reading... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.