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.
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.
