GH-COPILOT(1) GitHub CLI manual GH-COPILOT(1)

gh-copilot - Run the GitHub Copilot CLI (preview)

gh copilot [flags] [args]

Runs the GitHub Copilot CLI.

Executing the Copilot CLI through gh is currently in preview and subject to change.

If already installed, gh will execute the Copilot CLI found in your PATH. If the Copilot CLI is not installed, it will be downloaded to /build/.local/share/gh/copilot.

Use --remove to remove the downloaded Copilot CLI.

This command is only supported on Windows, Linux, and Darwin, on amd64/x64 or arm64 architectures.

To prevent gh from interpreting flags intended for Copilot, use -- before Copilot flags and args.

Learn more at https://gh.io/copilot-cli

Remove the downloaded Copilot CLI

0: Successful execution

1: Error

2: Command canceled

4: Authentication required

NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information.

# Download and run the Copilot CLI
$ gh copilot
# Run the Copilot CLI
$ gh copilot -p "Summarize this week's commits" --allow-tool 'shell(git)'
# Remove the Copilot CLI (if installed through gh)
$ gh copilot --remove
# Run the Copilot CLI help command
$ gh copilot -- --help

gh(1)

Jan 2026