Skip to content
Reference

Telemetry

What anonymous usage data the Kubb CLI sends, when it sends it, the exact OTLP fields, and how to opt out with DO_NOT_TRACK or KUBB_DISABLE_TELEMETRY.

The Kubb CLI sends anonymous data about each run: which command, which plugins and the shape of their options, how long it took, and whether it succeeded.

Telemetry is on by default. Set DO_NOT_TRACK or KUBB_DISABLE_TELEMETRY to 1 or true to turn it off.

When Kubb sends it

kubb generateNotice on stderrRun the commandStart detached, pass the payloadExitPOST /v1/tracesYouKubb CLISender processotlp.kubb.devYouKubb CLISender processotlp.kubb.dev

A detached process sends the request, so the CLI exits without waiting. The request fails silently after 5 seconds, so an offline machine never interrupts a run.

CommandSends one event
kubb generatePer config, when that config finishes or fails
kubb validateWhen validation finishes or fails
kubb mcpWhen an MCP client connects, or when the server fails to start
kubb studioWhen the Studio command finishes or fails

Each command prints a telemetry notice to stderr when it starts. --help, -h, --version, -v, and --json skip it.

What is collected

Each event is an OpenTelemetry OTLP trace with one span, sent as JSON to https://otlp.kubb.dev/v1/traces. The span carries the command as its name, the run's start and end times, an OK or error status, and random trace and span ids.

Span attributeValueExample
kubb.commandThe command"generate"
kubb.versionThe Kubb CLI version"5.0.0"
kubb.node_versionThe Node.js major version"22"
kubb.runtimeThe JavaScript runtime"node", "bun", "deno"
kubb.runtime_versionThe runtime major version"22"
kubb.platformThe operating system"linux", "darwin", "win32"
kubb.ciWhether the run is in CItrue
kubb.ttyWhether stdin is a terminal, which usually means a person typed the commandtrue
kubb.agentThe AI coding agent that ran the command, when Kubb detects one"claude"
kubb.mcp_clientThe name the MCP client reports, up to 64 characters. kubb mcp only."claude-code"
kubb.files_createdFiles generated. 0 outside kubb generate.47
kubb.statusThe outcome"success", "failed"
kubb.pluginsThe plugin names, sorted["plugin-ts", "plugin-zod"]
kubb.plugin.<name>true for each plugin, such as kubb.plugin.plugin-tstrue
kubb.plugin_optionsEach plugin's name and the shape of its options as a JSON string{ "name": "plugin-ts", "options": "{\"output\":{\"path\":\"string\",\"clean\":true},\"enumType\":\"asConst\"}" }

The resource attributes are service.name: "kubb", service.version (the Kubb version), and telemetry.sdk.language: "nodejs". The request carries the headers Kubb-Telemetry-Version: 1 and Kubb-Telemetry-Source: kubb-cli.

kubb.plugin_options holds the shape of the options, not their values. Booleans, numbers and enum-like strings keep their value. An enum-like string is one word of letters and digits, up to 32 characters, such as asConst or camelcase. Every other value becomes its type name: a string such as output.path, baseURL or a banner is sent as "string", an array as "array", and a function as "function". A string under a key that names a secret, such as token, password or apiKey, is always sent as "string". Object keys are sent as written, so an option object keyed by file paths or other names sends those keys. Set DO_NOT_TRACK or KUBB_DISABLE_TELEMETRY to 1 to send nothing.

What is not collected

  • The spec contents
  • The input path, the project root, or the names of generated files
  • Source code or generated code
  • A user, machine, or project identifier

The one exception is an object key in kubb.plugin_options, which is sent as written. See the warning above.

Kubb does not read environment variables or credential files for telemetry.

How to opt out

Set DO_NOT_TRACK or KUBB_DISABLE_TELEMETRY to 1 or true. Kubb then sends nothing and prints no notice.

Terminal
DO_NOT_TRACK=1 kubb generate

DO_NOT_TRACK follows Console Do Not Track.