@honeyhive/cli) is a single-binary client that maps one-to-one to the HoneyHive REST API. Use it to script datasets, experiments, and trace events from your terminal, CI, shell pipelines, or AI coding agents like Cursor and Claude Code.
The CLI is organized into namespaces: honeyhive datasets, honeyhive datapoints, honeyhive experiments, etc. Pass JSON literals for JSON-shaped flags and plain shell values for scalar flags. Run honeyhive --help to discover namespaces, honeyhive <namespace> --help to discover commands, or honeyhive <namespace> <command> --help to discover flags.
Installation
macOS (Homebrew)
Linux/WSL (install script)
The install script downloads the linux-x64 or linux-arm64 binary from the corresponding GitHub Release, verifies its SHA256, and installs it to/usr/local/bin (falling back to ~/.local/bin if /usr/local/bin isn’t writable). To install to a different directory, set the INSTALL_DIR environment variable.
brew tap honeyhiveai/tap then brew install honeyhive) work on Linux as well.
Authorization
The HoneyHive API authenticates requests using an API key sent as a Bearer token in theAuthorization header. Each command selects its credential:
See API Keys to create the credentials your commands need.
Data plane API key
SetHH_DATA_PLANE_API_KEY to a complete hh_fgdp_ key. For supported commands, pass --project-id even if the key is rooted at that project. This example requires project.chart.list:
HH_DATA_PLANE_URL if the URL differs from the default. You can also supply the key with honeyhive --data-plane-api-key "$MY_DATA_PLANE_KEY" charts list --project-id "$PROJECT_ID".
For commands with both legacy and scoped routes, --project-id selects the scoped route and data plane key. Without it, the command selects the legacy route and project key. Legacy chart, dataset, and datapoint calls are deprecated. Configuring a data plane key does not change calls that omit --project-id, and a project key cannot substitute for a data plane key. See the credential matrix.
The data-plane-api-keys create and ingestion-api-keys create commands also use this credential and require --project-id. They need an organization-rooted key with key-creation permissions. See How to create API keys programmatically.
Project API key
Environment variable (recommended)
Set theHH_PROJECT_API_KEY environment variable. The CLI reads it automatically when no --project-api-key flag is provided:
—project-api-key flag
Pass the key directly on the command line.Never hard-code the key or commit it to source control. Always read it from a secret store or environment variable.
Ingestion API key
An ingestion API key (hh_ingst_) can be supplied alongside the other keys, in the HH_INGESTION_API_KEY environment variable or with --ingestion-api-key. The commands that create sessions and create or update events send it when it is set, and fall back to the project key otherwise. Other commands never use the ingestion key.
Control plane commands
honeyhive projects, honeyhive alerts, honeyhive workspaces, and honeyhive virtual-dataplanes talk to the HoneyHive control plane, which accepts only a fine-grained API key (hh_fgcp_) created at workspace or organization scope. Supply it in the HH_CONTROL_PLANE_API_KEY environment variable or with --control-plane-api-key. A project key is not accepted there, and the data plane commands never use this key, so you only need it for the commands you run.
Data plane URL
By default the CLI talks tohttps://api.dp1.us.honeyhive.ai. To point at a self-hosted deployment or a staging environment, set the HH_DATA_PLANE_URL environment variable or pass --data-plane-url:
Control plane URL
The control plane commands talk tohttps://api.cp.us.honeyhive.ai by default. To point them at a self-hosted deployment, set the HH_CONTROL_PLANE_URL environment variable or pass --control-plane-url:
Verbose logging
Pass--verbose (or set HH_VERBOSE=true) to log the resolved URL for the command’s plane, its masked API keys, and the CLI version on startup. Useful when debugging “is this hitting prod or staging?” or “did the right HH_PROJECT_API_KEY get picked up?”.
--verbose flag matches the precedence of the other flags. Data plane commands log all three data plane credential slots, including (none) for unset keys. Control plane commands log only the control plane URL and key.
Keys are masked. A classic project API key shows a recognized prefix and the last 4 characters. Ingestion and fine-grained keys show their prefix and key id with the secret replaced by ******: hh_ingst_<key id>_******, hh_fgdp_<key id>_******, or hh_fgcp_<key id>_******. These match the masked forms shown in the HoneyHive app. A typed key with a missing or malformed key id is replaced entirely with asterisks.
Schema introspection
Every command that takes arguments supports two read-only flags for tooling and AI agents:--show-file-schema: print the JSON Schema for the full request object (the same shape--filenameaccepts). See Using a file for upload arguments for the file format.--show-argument-schema <flag-name>: print the JSON Schema for a single argument’s value (e.g.,honeyhive sessions create --show-argument-schema user-properties). Pass the kebab flag name without the leading--.
Example: Creating and deleting a dataset
Given adatapoint.json file:
Using a file for upload arguments
Instead of passing data via command line arguments, you can read from a file using the--filename/-f flag:
snake_case or camelCase, not --kebab-case like the CLI flags.
Related
Config as Code
Keep evaluators, datasets, charts, and alerts in your repo and apply them with the CLI.
Use with Coding Agents
Combine the CLI with HoneyHive Skills and Docs MCP.
CLI Reference
Browse the full auto-generated command reference.
TypeScript API SDK
The programmatic counterpart to the CLI for TypeScript/Node.js.