Skip to content

v1.0.0

Compare
Choose a tag to compare
@gh-copilot-promote-release gh-copilot-promote-release released this 21 Mar 14:04
· 5 commits to main since this release
ca1ec33

Release notes for v1.0.0

Following our public beta, we're excited to announce the general availability of GitHub Copilot in the CLI! 🎉

Bringing GitHub Copilot to your terminal, GitHub Copilot in the CLI assists with any task in the terminal:

  • Suggest commands using natural language for unfamiliar or hard to remember use cases.
  • Explain commands with finer details of arguments, flags, and expected outcomes.
  • Execute suggested commands in supported shells to stay in the flow.

What's New

Introducing support for ghcs and ghce aliases and executing commands for popular shells

Before GitHub Universe, we knew our community would need these two features from the Copilot for CLI technical preview, however your feedback in #2 and #5 confirmed it!

gh copilot alias will generate aliases for Bash, PowerShell, or Zsh that use fewer keystrokes to jump into the gh copilot experience:

  • ghcs for gh copilot suggest
  • ghce for gh copilot explain
For instructions to setup aliases, gh copilot alias --help

  • Bash

    echo 'eval "$(gh copilot alias -- bash)"' >> ~/.bashrc
  • PowerShell

    $GH_COPILOT_PROFILE = Join-Path -Path $(Split-Path -Path $PROFILE -Parent) -ChildPath "gh-copilot.ps1"
    gh copilot alias -- pwsh | Out-File ( New-Item -Path $GH_COPILOT_PROFILE -Force )
    echo ". $GH_COPILOT_PROFILE" >> $PROFILE
  • Zsh

    echo 'eval "$(gh copilot alias -- zsh)"' >> ~/.zshrc

In addition to making you faster, the new ghcs alias is the basis for the new Execute command option to execute and preserve generated suggestions:

$ ghcs upgrade GitHub CLI on MacOS

Welcome to GitHub Copilot in the CLI!
version 1.0.0 (2024-03-18)

I'm powered by AI, so surprises and mistakes are possible. Make sure to verify any generated code or suggestions, and share feedback so that we can learn and improve. For more information, see https://gh.io/gh-copilot-transparency

Suggestion:

  brew upgrade gh

? Select an option  [Use arrows to move, type to filter]
> Copy command to clipboard
  Explain command
  Execute command
  Revise command
  Rate response
  Exit

Note

We are open to supporting additional popular shells with help from our community providing the same experience! 🙇

Configuration for Execute command confirmation prompt

GitHub Copilot in the CLI prompts for confirmation when executing commands. This safeguard will return you to the interactive loop if declined, focusing on safety by minimizing accidents.

$ ghcs upgrade GitHub CLI on MacOS

Welcome to GitHub Copilot in the CLI!
version 1.0.0 (2024-03-18)

I'm powered by AI, so surprises and mistakes are possible. Make sure to verify any generated code or suggestions, and share feedback so that we can learn and improve. For more information, see https://gh.io/gh-copilot-transparency

Suggestion:

  brew upgrade gh

? Select an option
> Execute command

? Are you sure you want to execute the suggested command?  [Use arrows to move, type to filter]
> No
  Yes

However if you feel the trade off between safety and speed is important, gh copilot config provides an option that can change the confirmation prompt default, allowing faster execution of commands by removing the need to select Yes.

$ gh copilot config

? What would you like to configure?
> Default value for confirming command execution

? Default when asked to confirm execution of a generated suggestion?  [Use arrows to move, type to filter]
> No
  Yes

Copy to clipboard exits immediately

With GitHub Copilot's goal of keeping you in the flow, the Copy to clipboard option has been changed to exit immediately based on feedback from #2.

$ ghcs upgrade GitHub CLI on MacOS

Welcome to GitHub Copilot in the CLI!
version 1.0.0 (2024-03-18)

I'm powered by AI, so surprises and mistakes are possible. Make sure to verify any generated code or suggestions, and share feedback so that we can learn and improve. For more information, see https://gh.io/gh-copilot-transparency

Suggestion:

  brew upgrade gh

? Select an option
> Copy command to clipboard

Command copied to clipboard!