<h1 align="center">
<a href="https://prompts.chat">
This document describes the telemetry system used by Vibe Tools, covering the infrastructure, data structure, data flow/pipeline, and privacy considerations.
Sign in to like and favorite skills
This document describes the telemetry system used by Vibe Tools, covering the infrastructure, data structure, data flow/pipeline, and privacy considerations.
The telemetry infrastructure for
vibe-tools is designed to collect anonymous usage data to help improve the tool. It involves:
vibe-tools CLITelemetry collection happens in
src/telemetry/index.ts.
The
CommandState interface defines the core data points:
vibe-tools command executed (e.g., repo, web, plan)tokenCount (overall context tokens), promptTokens, completionTokensprovider (e.g., gemini, openai), model namefileProvider, fileModel, thinkingProvider, thinkingModel--debug, --saveTo, but not sensitive values)type (constructor name) and message are recordedThe
TELEMETRY_DATA_DESCRIPTION explicitly states that the following are not tracked:
userId is generated (UUID) and stored in ~/.vibe-tools/diagnostics.jsonuserId can be anonymous_opt_out or anonymous_pending_promptsessionId (UUID) is generated for each CLI invocationVIBE_TOOLS_NO_TELEMETRY=1 environment variablevibe-tools install, users are prompted to enable/disable telemetry, with the choice stored in ~/.vibe-tools/diagnostics.jsonstartCommand(command, options): Initializes currentCommandState when a command beginsupdateCommandState(update): Allows updating the state with information like token counts as the command progressesrecordError(error): Captures error details if a command failsendCommand(): Calculates duration, finalizes the payload, and calls trackEventtrackEvent(eventName, properties):
TELEMETRY_ENDPOINTThe JSON payload sent by the client has the following structure:
{ "data": { "eventName": "command_executed" | "command_error", // Type of event "userId": "string", // User's unique identifier (or anonymous placeholder) "sessionId": "string", // Unique ID for the current CLI session "timestamp": "ISO8601_string", // Time of the event "toolVersion": "string", // Version of vibe-tools // --- Additional properties from CommandState --- "command": "string", "duration": "number_milliseconds", "contextTokens": "number_optional", "promptTokens": "number_optional", "completionTokens": "number_optional", "provider": "string_optional", "model": "string_optional", "fileProvider": "string_optional", // Specific to 'plan' command "fileModel": "string_optional", // Specific to 'plan' command "thinkingProvider": "string_optional",// Specific to 'plan' command "thinkingModel": "string_optional", // Specific to 'plan' command "options": { /* sanitized key-value pairs */ }, "hasError": "boolean", "errorType": "string_optional" // e.g., "ProviderError", "FileError" } }
The infrastructure is provisioned using Alchemy for Cloudflare. The key configuration is in
infra/alchemy/alchemy.run.ts.
vibe-tools-infra)infra/app/index.ts/api/pipeline are handled by a Nuxt server route defined in infra/server/api/pipeline.post.tsvibe-tools CLIvibe-tools-telemetry)binding source, receiving data pushed by the Cloudflare Workervibe-tools-telemetry)telemetry-pipeline-r2-access-token)Workers R2 Storage Bucket Item Write permissionsalchemy.run.ts script updates the TELEMETRY_ENDPOINT constant in src/telemetry/index.ts after deploying the workerhttps://vibe-tools-infra.aejefferson.workers.dev/api/pipeline)vibe-tools CLI gathers telemetry data during command executionendCommand() calls trackEvent(), which sends an HTTP POST request with the JSON payload to the TELEMETRY_ENDPOINTdata object from the payloaddata object, wrapped in an array ([data]), to its bound Cloudflare Pipelinevibe-tools-telemetry R2 bucket┌─────────────────┐ HTTP POST ┌─────────────────────┐ │ │ JSON Payload │ │ │ vibe-tools CLI ├───────────────────► Cloudflare Worker │ │ │ │ │ └─────────────────┘ └─────────┬───────────┘ │ │ pipeline.send([data]) ▼ ┌─────────────────────┐ │ │ │ Cloudflare Pipeline │ │ │ └─────────┬───────────┘ │ │ Batch writes ▼ ┌─────────────────────┐ │ │ │ Cloudflare R2 │ │ │ └─────────────────────┘
userId is designed to be anonymous. Opting out or pending prompt results in placeholder IDsVIBE_TOOLS_NO_TELEMETRY) or through the interactive installersanitizeOptions function ensures that only a whitelist of command-line option keys are trackedTELEMETRY_DATA_DESCRIPTION details what is and isn't collectedBased on the current implementation, the telemetry system focuses primarily on data collection and storage. There are no built-in tools or systems within this repository for analyzing the telemetry data after it's stored in the R2 bucket.
The data is structured in JSON format and stored in batches in the Cloudflare R2 bucket, which makes it suitable for:
For implementing a data analysis solution, one approach would be to:
src/telemetry/index.ts - Client-side telemetry collectioninfra/alchemy/alchemy.run.ts - Infrastructure provisioninginfra/server/api/pipeline.post.ts - Telemetry ingestion endpointinfra/app/index.ts - Cloudflare Worker entry pointinfra/env.ts - Environment configuration