Hoko CLI
Use Hoko from your terminal when you need repeatable link and workspace operations.
Install
Open cli.hoko.to. The installer detects macOS, Linux, or Windows and selects the matching CPU architecture.
curl -fsSL https://cli.hoko.to/install.sh | bash
For PowerShell:
irm https://cli.hoko.to/install.ps1 | iex
The installer detects your platform, downloads a release archive, verifies its SHA-256 checksum, installs a bundled binary, and adds the user install directory to your shell profile. Bun is not required. Open a new terminal after installation.
Sign in or use an API key
Find the workspace ID in workspace settings, then run hoko auth login --workspace-id <workspace_id> for a human account. The browser opens the Hoko OAuth consent page, then the CLI stores the credential in your operating system credential store.
Use HOKO_API_KEY for CI and server jobs:
HOKO_API_KEY=hk_... hoko links list
Run hoko auth status to see which credential is available. Run hoko workspace select <workspace_id> to switch workspace after login.
Common commands
hoko links list
hoko links create --body '{"destination":"https://example.com"}'
hoko analytics list --take 50
hoko webhooks list
Commands return JSON. A successful command exits with 0. Invalid input exits with 2. A missing credential exits with 3.
Fix common errors
No credential
Run hoko auth login --workspace-id <workspace_id> or set HOKO_API_KEY in the process environment. Do not paste a key into a shell history that another user can read.
Wrong workspace
Run hoko workspace select <workspace_id>, then run the command again.
Staging or local development
Pass the API and OAuth origins together:
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>
Rate limit
Wait for the Retry-After value, then retry a read. Check whether a write completed before retrying it so you do not create duplicate records.
Read the full reference
See the CLI documentation for install and command reference. The CLI host also provides README.md, a short machine-readable guide, and the full machine-readable guide.