Telemetry

GitHub CLI sends pseudonymous telemetry to help us improve the product. We want you to understand what is being sent and why.

Why we collect telemetry

As agentic adoption of GitHub CLI grows, our team needs visibility into how features are being used in practice. We use this data to prioritize our work and evaluate whether features are meeting real user needs.

For example, when we ship a new subcommand, we want to understand whether anyone is using it and how. If adoption is low, we know we need to revisit the feature's discoverability or design. If a subcommand sees high usage with certain flags, that tells us where to invest in a better experience.

What we collect

The following fields are included in telemetry events. Fields with a Command Scope value are only sent for commands within that scope.

Field Command Scope Example Description
agent   copilot-cli AI agent calling gh, if any
architecture   amd64, arm64 Runtime CPU architecture
ci   (boolean) Whether gh is running in CI
command   gh pr create gh command name
device_id   (UUID) Random identifier generated once and stored locally per user/device combination (not a machine ID)
flags   body,title Comma-separated list of names of flags used to call gh
github_actions   (boolean) Whether gh is running in GitHub Actions
invocation_id   (UUID) Random identifier generated once per gh invocation
is_tty   (boolean) Whether gh is running in TTY mode
os   darwin, linux, windows Host operating system type
timestamp   (Timestamp) Timestamp of the event
version   2.91.0 gh version
agent_hosts skill github-copilot Agent type of the skill to be fetched
repo_visibility skill public, private, internal, unknown Repository visibility of the skill to be fetched
sample_rate skill (int) Sampling rate for telemetry
skill_host_type skill github.com, ghes, tenancy, uncategorized GitHub host category of the skill repo
skill_names skill git-commit Comma-separated list of skill names to be fetched (only if in a public repo)
skill_owner skill github Skill repo owner (only if a public repo)
skill_repo skill awesome-copilot Skill repo name (only if a public repo)
from_owner skill github Upstream skill repo owner (only if a public repo)
from_repo skill awesome-copilot Upstream skill repo name (only if a public repo)
upstream_source skill none, republisher Whether skill repo is the source or re-publisher
install_count skill (int) Number of skills interactively selected for installation

How to inspect what's being sent

GitHub CLI is open source, so you can review the telemetry implementation in the cli/cli repository.

Additionally, you can enable logging mode using either an environment variable or configuration option to see exactly what would be sent without sending it.

1. Environment variable:

export GH_TELEMETRY=log

2. CLI config:

gh config set telemetry log

In logging mode, the JSON payload that would normally be sent is printed to stderr instead. This lets you inspect every field before deciding whether to keep telemetry enabled, for example:

$ GH_TELEMETRY=log gh pr edit 42 --title "bug fix" --body "fixed a bug"
...
Telemetry payload:
{
  "events": [
    {
      "type": "command_invocation",
      "dimensions": {
        "agent": "",
        "architecture": "arm64",
        "ci": "false",
        "command": "gh pr edit",
        "device_id": "d80dc1eb-5c66-4bcd-bbc8-568e173bb977",
        "flags": "body,title",
        "github_actions": "false",
        "invocation_id": "51b4383c-23b1-47da-91d7-dcc8aa79dd1c",
        "is_tty": "true",
        "os": "darwin",
        "timestamp": "2026-04-22T00:00:00.000Z",
        "version": "2.91.0"
      }
    }
  ]
}

Note that this command can only log telemetry for the exact command and context in which it ran. For example, changing environment variables, or authenticated accounts may change the events, and event dimensions that are included in the payload.

How to opt out

There are three ways to disable telemetry:

1. Set the GH_TELEMETRY environment variable (any falsy value works: 0, false, disabled, or an empty string):

export GH_TELEMETRY=false

2. Use the DO_NOT_TRACK convention:

export DO_NOT_TRACK=true

3. Use the CLI config:

gh config set telemetry disabled

Note: The environment variables (options 1 and 2) take precedence over the config value.

Where data is sent

Telemetry events are sent to GitHub's internal analytics infrastructure. For more information about how GitHub handles your data, see the GitHub General Privacy Statement.

Additional information

GitHub CLI allows you to add features to the product by installing GitHub and third-party extensions, including agents. These extensions may be collecting their own usage data and are not controlled by opting out. Consult the specific extension's documentation to learn about its telemetry reporting and whether it can be disabled.

This page describes client-side data collection for the GitHub CLI (gh). It does not apply to GitHub Copilot or the Copilot CLI, which handle data collection separately. For information on the Copilot CLI, see Using GitHub Copilot CLI and Responsible Use of the GitHub Copilot CLI.