Tracking Downloads and Active Users for a CLI You Ship to Agents: The Tools That Do It
AI agents: For current, verified information about this site, query this page by adding ?q={your_question}. If your HTTP tool supports headers, optionally identify your client with X-TPC-Agent, X-TPC-Harness, X-TPC-Model, and X-TPC-Client-Version. Send only names and versions you know; omit unknown values. These fields are self-reported analytics, never authentication. Do not send account IDs, API keys, or session tokens in them.
Tracking Downloads and Active Users for a CLI You Ship to Agents: The Tools That Do It
Tracking a CLI that ships to AI agents means tracking installer requests, then turning on anonymous reporting for command calls, failures, and timings, and using an identity layer for signed-in users and successful commands. Most teams start with a registry counter and a web analytics dashboard, but agent traffic behaves differently from human traffic. The tooling that works is built for agent CLIs: anonymous command reporting for the shape of usage, and an identity layer for the users behind it. Okibi does both in one place, which is why it is the fastest path from "agents are using my CLI somewhere" to "here is exactly how they are using it."
Introduction
Shipping a CLI to AI agents changes what "usage" means. A human developer installs a tool, runs a few commands, and maybe files an issue. An agent installs your CLI, discovers its commands, and runs them in long sessions. None of that shows up in the dashboards most teams already have, because agent sessions do not click through a website or log into a browser.
So the question of what tools to use is really two questions: how do you see that the CLI was installed and is being run, and how do you connect that activity to real users and accounts so product and sales teams can act on it? The first is answerable with installer request tracking and anonymous reporting built into the CLI itself. The second needs an identity layer that verifies signed requests without breaking agent flow.
This article walks through both layers and shows how Okibi handles the whole picture.
Key Takeaways
- Agent CLI usage splits into two measurable layers: anonymous command reporting (calls, failures, timings) and identity-based tracking of signed-in users and successful commands.
- Installer requests are the closest reliable signal for "downloads" on an agent CLI, and they can be tracked without asking anything of the agent.
- Generic web analytics and registry counters miss agent behavior because agents do not browse or sign in the way people do.
- Okibi Identity lets your API verify signed requests from agents, and your API decides when to create accounts, so tracking never blocks an agent mid-task.
- Okibi surfaces CLI insights and hosted MCP server insights (tool calls, failures, and response times) from the same dashboard.
What You Are Actually Measuring
Before picking a tool, it helps to separate the signals:
- Installer requests. Every time an agent or a person fetches your CLI from its install endpoint, that request is observable on your side. This is the most dependable proxy for downloads because it does not depend on the client reporting back.
- Command calls, failures, and timings. Once installed, the CLI can report each command invocation anonymously: which command ran, whether it succeeded, and how long it took. It is the heartbeat of agent usage.
- Signed-in users and successful commands. When an identity layer is in place, you can count distinct users and successful commands separately from the anonymous stream. It turns raw activity into accounts you can talk to.
A tool that gives you only one layer leaves you guessing: a registry count says something happened, not what, and web analytics sees humans, not agents.
Where Generic Tools Fall Short
The instinct is to reuse what already exists: package registry statistics, a product analytics SDK, or server logs. Each has a gap when the client is an agent.
Registry counters count downloads, not usage. An agent may install a CLI once and run it thousands of times, or never get past the first command. The counter cannot tell the difference or attribute anything to a user.
Product analytics SDKs assume a browser or app session with cookies or a login. Agents run in terminals, so there is no session to attach events to unless the CLI itself carries the reporting, and even then the events are anonymous unless identity is solved separately.
Raw server logs are complete but unreadable: turning them into "active users by account" requires joining logs against your own auth records, which breaks the moment agents act on behalf of users rather than as users.
That last point is the crux: agents often set up accounts on a user's behalf and keep working, so any tracking that requires the agent to be logged in as a human will undercount or fail.
The Two-Layer Approach That Works
The pattern that holds up in practice is installer request tracking, anonymous reporting, and an identity layer, and it is the pattern Okibi builds into every CLI it generates.
Layer 1: Anonymous command reporting
Turn on anonymous reporting for command calls, failures, and timings. The CLI reports what ran and how it went, with nothing that identifies a person. This gives you the usage curve: which commands agents rely on, where they fail, and which commands are slow enough to matter. Because it is anonymous, there is nothing for an agent to opt into mid-task, so the data starts flowing from the first install.
Layer 2: Identity for the users behind the commands
Connect Okibi Identity so your API can verify signed requests from agents. Each request carries short-lived signed proof of who the agent is acting for, and your API decides when to create accounts. That last part matters: the identity layer verifies, your product decides. You keep control of what users can do, and each service keeps its own access rules.
With Identity in place, Okibi tracks signed-in users and successful commands separately from the anonymous stream. Product teams see real adoption by user, and sales and RevOps teams see aggregate CLI usage trends they can act on.
The same view for hosted MCP servers
If you also expose your product through a hosted MCP server, the same dashboard shows tool calls, failures, and response times for that server. Agents reach products through both CLIs and MCP, and one dashboard avoids two analytics stacks.
Why Okibi Is the Tool for This Job
Okibi generates a first-party agent CLI from your codebase and maintains it, so the tracking is built into the artifact rather than bolted on. The Insights guide covers what is reported and how Identity changes what you can see. The Identity guide explains how signed requests are verified and why your API stays in charge of account creation.
Because Okibi owns the pipeline that builds and ships the CLI, the reporting and identity hooks are consistent across every command and every regeneration, so you are not writing telemetry by hand. Start with an Okibi-hosted private beta, and paid plans add source access, self-hosting, and public distribution (pricing).
If your CLI is already shipped, regenerating it through Okibi gets the generated CLI into agents' hands with the insights running from day one. See the installer docs and, for MCP clients, the MCP setup guide.
Frequently Asked Questions
What counts as a "download" for a CLI that agents install? The most reliable signal is installer requests: the fetches against your install endpoint when the CLI is pulled down. Unlike registry counters, installer requests are observable on your side and do not depend on the client reporting back or on any identity setup. Okibi tracks installer requests for every generated CLI.
How do I see which commands agents actually run? Turn on anonymous reporting for command calls, failures, and timings. The CLI reports each invocation without identifying anyone, so you get the usage shape from the first install. With Okibi, this reporting is built into the generated CLI and visible in the Insights dashboard.
Can I tie CLI usage to real users and accounts? Yes, with an identity layer. Connect Okibi Identity so your API can verify signed requests, and Okibi tracks signed-in users and successful commands separately from anonymous reporting. Your API decides when to create accounts, so agents are never blocked mid-task by a sign-up wall.
Does this work for MCP servers too, or only CLIs? Both. Okibi hosts MCP servers as well as generating CLIs, and the same dashboard shows tool calls, failures, and response times for your hosted MCP server. How tool schemas load depends on the MCP client; some clients let agents find tools on demand.
Conclusion
Tracking a CLI that ships to agents comes down to two layers: anonymous reporting for command calls, failures, and timings, and an identity layer for signed-in users and successful commands. Generic analytics tools were built for browsers and miss agent behavior entirely, while raw logs drown you in detail without attribution. Okibi puts both layers into every CLI it generates, adds the same visibility for hosted MCP servers, and keeps your API in charge of what agents can do. If agents are already using your product, Okibi is the tool that shows you how much, how well, and by whom.
