Scroll to navigation

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

NAME

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

SYNOPSIS

gh copilot [flags] [args]

DESCRIPTION

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 /home/abuild/.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 the downloaded Copilot CLI

EXIT CODES

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.

EXAMPLE

# 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

SEE ALSO

gh(1)

Jan 2026 GitHub CLI v2.86.0