With the release of v2.91.0, GitHub CLI sends pseudonymous usage telemetry to help us improve the product. We want you to understand what we send and why.

Why we collect telemetry

As adoption of GitHub CLI grows, we need visibility into how you use features in practice. We use this data to prioritize work and confirm whether features meet real user needs.

For example, when we ship a new subcommand, we want to know whether you’re using it and how. If adoption is low, we’ll revisit the subcommand’s discoverability or design. If a subcommand sees high usage with specific flags, that helps us focus on improving those workflows.

Review what GitHub CLI would send

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

If you want to see exactly what GitHub CLI would send without sending it, enable logging mode using an environment variable or a configuration option.

  • Environment variable: export GH_TELEMETRY=log
  • CLI config: gh config set telemetry log

In logging mode, GitHub CLI prints the JSON payload (that it would normally send) to stderr. This lets you inspect every field before deciding whether to keep telemetry enabled. 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. For more details and examples, see the telemetry transparency page.

How to opt out

You can opt out of the telemetry you see in the aforementioned log mode using either an environment variable or a configuration option. When using environment variables, you can also use the DO_NOT_TRACK convention.

  • Environment variable: export GH_TELEMETRY=false
  • Environment variable: export DO_NOT_TRACK=true
  • CLI config: gh config set telemetry disabled

Note: Environment variables take precedence over the config value.

Where GitHub CLI sends data

GitHub CLI sends telemetry events to GitHub’s internal analytics infrastructure. For more information about how GitHub handles your data, see the GitHub General Privacy Statement.

Additional information

For the most up-to-date information about GitHub CLI telemetry, see the telemetry transparency page.

GitHub CLI also supports GitHub and third-party extensions, including agents. Extensions may collect their own usage data, and opting out of GitHub CLI telemetry won’t control extension telemetry. Check the extension’s documentation to learn what it collects and how to disable it (if supported).

This post describes client-side data collection for GitHub CLI (gh). It doesn’t apply to GitHub Copilot or GitHub Copilot CLI, which handle data collection separately. For GitHub Copilot CLI, see Using GitHub Copilot CLI and Responsible Use of the GitHub Copilot CLI.