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

# [NAME](#NAME)

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

# [SYNOPSIS](#SYNOPSIS)

**gh copilot \[flags] \[args]**

# [DESCRIPTION](#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 /root/.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](#OPTIONS)

[**--remove**](#remove)

Remove the downloaded Copilot CLI

# [EXIT CODES](#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](#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](#SEE_ALSO)

[**gh(1)**](/man/os/gh/gh.1)

Sep 2026

---

Document: gh-copilot(1) from gh 2.102.0-r0 (Chainguard OS)
Source: https://github.com/cli/cli
