Sputnik is a Rust crate designed to help CLI developers collect anonymous usage data. It centers around the sputnik::Session struct, which captures metadata about a single command execution, such as the command name, arguments, machine ID, session ID, working directory hash, platform details (OS and CI status), and the CLI version.
To use Sputnik, you must implement the sputnik::Report trait. This trait allows you to define how the sputnik::Session is populated for every command and how that data is reported to your telemetry backend.
body:
command:
name: config list
arguments:
machine_id: edd890f0-3f8d-43f5-a22e-d3731d7e5042
session_id: a9d345b6-75f9-4bc1-9685-8475c6771610
cwd_hash: 52b120fee6f41776b6fb561ecb708cfe187e6922fa33a2399f8e01cb94e89bb0
platform:
os: macos
continuous_integration: null
cli_version: 0.0.0