Cloudsmith CLI

CLI telemetry

The Cloudsmith CLI sends pseudonymous usage data and anonymized error reports to help improve the product. Learn what data is collected and how to opt out.

Note

Error reports apply to Cloudsmith CLI v1.30.0 and later. Usage data applies to Cloudsmith CLI v1.32.0 and later.

Why the CLI collects telemetry

Usage data shows Cloudsmith which commands and options are used, how they end, and how long they take. For example, when a new command ships, usage data shows whether anyone runs it. Usage data also shows which options and platforms are still in use, so Cloudsmith can change or remove them without breaking your workflows.

Error reports show Cloudsmith which command failed, where in the code it failed, and on which platform. This helps Cloudsmith find and fix bugs.

Note

Usage data isn't sent when the CLI connects to an API host other than Cloudsmith, such as a self-hosted or proxied host, or when SSL verification is turned off.

What is collected

Usage data

The CLI sends one event when most commands finish. Each event contains:

  • The command name and the names of the options and aliases you used
  • The names of the CLI environment variables you set, and where each setting came from, such as an option, an environment variable, or config.ini
  • The names of the keys set in config.ini and credentials.ini
  • The sign-in method and output format
  • The outcome, exit code, API status code, and duration
  • The CLI version and installation method
  • The operating system and version, CPU architecture, and Python version
  • Whether the command ran in a terminal, in CI, or from an AI coding agent, and which CI provider or agent
  • A random install ID

The first time you run a command in a terminal after upgrading to v1.32.0 or later, the CLI shows a notice about usage data and sends no usage data for that command. In CI pipelines, containers, and scripts, the CLI doesn't show the notice and sends usage data from the first command.

Install ID

The CLI stores a random install ID in telemetry.json, in the CLI's application directory: ~/.config/cloudsmith on Linux, ~/Library/Application Support/cloudsmith on macOS, or %APPDATA%\cloudsmith on Windows. CI pipelines and containers use a new ID for every command.

  • To view your install ID, run cloudsmith telemetry id.
  • To replace it, run cloudsmith telemetry reset.
  • To stop storing it, set CLOUDSMITH_TELEMETRY_INSTALL_ID=disable.

Error reports

The CLI sends an error report when a command fails because of a bug in the CLI. Each report contains:

  • The exception type and exception message
  • The stack trace
  • The command name
  • The CLI version and installation method
  • The operating system and version, CPU architecture, and Python version

Before sending a report, the CLI removes credentials, email and IP addresses, user and machine names, and file paths.

Reviewing telemetry

The Cloudsmith CLI is open source. You can review the telemetry implementation in the cloudsmith-cli repository. If you want to see exactly what would be sent without sending it, set CLOUDSMITH_TELEMETRY to log:

shell
CLOUDSMITH_TELEMETRY=log cloudsmith --version

In logging mode, the CLI prints the usage event to stderr instead of sending it. If the command fails with an unexpected error, the CLI also prints the error report. On the first run in a terminal, the CLI shows the first-run notice instead of the usage event. For example:

text
[telemetry] would send (log mode, nothing sent):
{
  "distinct_id": "31b023d1-966a-4fb2-a60d-3e17af367674",
  "event": "cli command executed",
  "properties": {
    "$geoip_disable": true,
    "$process_person_profile": false,
    "aliases_used": [],
    "arch": "arm64",
    "channel": "homebrew",
    "ci": false,
    "cli_version": "1.32.0",
    "command": "<root>",
    "config_keys": [],
    "duration_ms": 207,
    "environment": "production",
    "envvars": [],
    "exit_code": 0,
    "first_run": false,
    "flags": [
      "version"
    ],
    "flags_typed": [
      "--version"
    ],
    "install_id_persisted": true,
    "os": "Darwin",
    "os_version": "25.6",
    "outcome": "success",
    "output_format": "pretty",
    "persona": "human",
    "python_version": "3.13",
    "sample_rate": 100,
    "schema_version": 1,
    "stdout_tty": true
  },
  "timestamp": "2026-10-26T11:56:11.787694+00:00"
}

Note

Logging mode shows the event only for the exact command and environment it ran in. Different options, environment variables, or configuration can change the event.

To check whether usage data and error reports are turned on, and which setting turned each one on or off, run:

shell
cloudsmith telemetry status
text
Usage reporting: enabled (default)
Error reporting: enabled (default)
Install ID: enabled (default)

The value in parentheses shows the setting that applies, for example, default, config, or DO_NOT_TRACK. For the order the CLI checks these settings in, see How to opt out.

How to opt out

You can opt out of telemetry using either an environment variable or a configuration option. You can turn off usage data and error reports together, or each one separately.

Environment variables:

To disable all CLI telemetry, set CLOUDSMITH_TELEMETRY=disable:

shell
export CLOUDSMITH_TELEMETRY=disable

To disable only usage data or error reporting, set CLOUDSMITH_TELEMETRY_USAGE_REPORTING or CLOUDSMITH_TELEMETRY_ERROR_REPORTING to disable:

shell
export CLOUDSMITH_TELEMETRY_USAGE_REPORTING=disable

These variables take enable, disable, or log. They also accept enabled, on, true, yes, and 1, or disabled, off, false, no, and 0.

You can also use the CLOUDSMITH_NO_TELEMETRY environment variable or the DO_NOT_TRACK convention. These disable both kinds of telemetry when set to 1, true, or yes:

shell
export DO_NOT_TRACK=true

Config file:

Set telemetry, telemetry_usage_reporting, or telemetry_error_reporting under [default] or a [profile:NAME] section in config.ini. These keys take the same values as the environment variables:

ini
[default]
telemetry = disable

A [profile:NAME] section uses the [default] value of each of these keys unless it sets the key itself. In versions earlier than v1.31.0, a profile that you select with -P turns telemetry back on. To turn it off for these versions, add telemetry=false to each profile section.

Telemetry settings apply in the following order of precedence. If you set more than one, the CLI uses only the highest one in the list:

  1. CLOUDSMITH_TELEMETRY_USAGE_REPORTING or CLOUDSMITH_TELEMETRY_ERROR_REPORTING
  2. CLOUDSMITH_TELEMETRY
  3. CLOUDSMITH_NO_TELEMETRY
  4. DO_NOT_TRACK
  5. telemetry_usage_reporting or telemetry_error_reporting in config.ini
  6. telemetry in config.ini

Because environment variables take precedence over config.ini, you can set a default in config.ini and override it for a single run.

For example:

  • CLOUDSMITH_TELEMETRY=enable turns telemetry on for the Cloudsmith CLI even when DO_NOT_TRACK is set for other tools.
  • If you set both CLOUDSMITH_TELEMETRY_USAGE_REPORTING and telemetry in config.ini, the CLI applies the CLOUDSMITH_TELEMETRY_USAGE_REPORTING setting only.

Where data is sent

Usage data and error reports are sent to third-party services that process them on Cloudsmith's behalf.

Usage data is deleted 12 to 13 months after it's sent. Because events aren't linked to your Cloudsmith account, Cloudsmith can't delete them on request before then. The IP address of each event is discarded when the event is received.