gh-copilot(1)

gh-copilot1

Run the github copilot cli (preview)

Usage

gh copilot [flags] [args]

Overview

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

Options

--remove

Remove the downloaded Copilot CLI

Exit status

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.

Examples

# 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

From github-cli 2.102.1-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.