Hoko CLI
Install and use the Hoko command-line client for links, analytics, conversions, and webhooks.
Install
The hosted installer detects your operating system and CPU architecture.
curl -fsSL https://cli.hoko.to/install.sh | bashWindows PowerShell:
irm https://cli.hoko.to/install.ps1 | iexThe installer selects the operating system and CPU architecture, installs a bundled binary, and adds the user install directory to your shell profile. Bun is not required. Open a new terminal after installation. Use the CLI landing page for direct downloads. Use the full CLI reference for machine-readable command details.
Authenticate
Use OAuth for a human user. The CLI stores the credential in the operating system credential store.
hoko auth login --workspace-id <workspace_id>
hoko auth statusUse an API key for automation:
HOKO_API_KEY=hk_... hoko links listFind the workspace ID in the dashboard, then sign in:
hoko auth login --workspace-id <workspace_id>Switch the selected workspace later:
hoko workspace select <workspace_id>Run commands
Resource commands print JSON to stdout. Errors print JSON to stderr and return a non-zero exit code.
hoko links list
hoko links create --body '{"destination":"https://example.com"}'
hoko analytics list --take 50
hoko webhooks listResources include links, collections, tags, partners, utm-templates, customers, analytics, events, journeys, webhooks, usage, keys, lead, and sale.
Use the generic operation command for named engine operations:
hoko operations list
hoko operation measurement.events.list --body '{}'Use another deployment
Pass both origins when you work against staging or local development:
hoko --api https://api.staging.hoko.to --issuer https://auth.staging.hoko.to auth login --workspace-id <workspace_id>For local Portless development, use HTTP loopback origins:
hoko --api http://api.hoko.localhost:1355 --issuer http://auth.hoko.localhost:1355 auth login --workspace-id <workspace_id>The values must be origins. Do not include a path, query string, fragment, username, or password.