Skip to main content

Prerequisites

To get the most out of this guide, you will need to:

Installation

Through homebrew:
To upgrade it:
Already installed? The CLI ships its own version manager under hoop versions. Use hoop versions sync to match the connected gateway, hoop versions upgrade to track the latest release, or hoop versions install <version> to pin a specific version. See hoop versions for details.

Authentication

The authentication process requires either an access token or an API key to interact with the gateway. The following sections outline the various authentication scenarios when using the command line interface.
The authentication process requires knowning the gateway instance URL where the Hoop gateway is running. Our managed instances are hosted under the URL:
Contact your administrator if you have a self hosted installation and don’t know this information.

Connection Usage Scenario

This authentication method is recommended for users who need to regularly access and manage resources within their permission scope. Users will authenticate to obtain a valid access token, which remains active based on your identity provider’s expiration policy.
This command should be executed only once in your machine. It creates and wipes the file $HOME/.hoop/config.toml in your local machine
This command must be executed every time the token expires or the command above is executed.

Automation Usage Scenario

When automating Hoop from scripts, CI jobs, or AI agents, use an API Key for authentication and group related invocations with --correlation-id so they can be traced as a single workflow run.
Every hoop exec call that shares the same correlation value is tagged on the session record, which lets you later filter and group the sessions that belong to one logical task (for example, all the queries and API calls an agent made while processing a single ticket).
The correlation ID is a free-form string up to 255 printable ASCII characters. Use whatever identifier your orchestrator already has — a task ID, job ID, workflow run ID, etc.

Programmatic API Access

This authentication method is designed for administrators who need programmatic access to the API for tasks such as managing resource roles, configuring policies, or executing operations within automation pipelines. Programmatic access requires static authentication credentials that can be obtained through the following methods:

API Key

An API Key (prefixed with hpk_) authenticates the CLI headlessly — no browser login, no token expiry. Keys are created from the Web App under Settings → API Keys and inherit the permissions of the groups assigned to them. Persist the key in your local config when bootstrapping a new machine:
Or, if the config already exists, use hoop login --api-key to store the key as the current token:

Service Account

Service Account authentication is available if your identity provider supports the OAuth2 Client Credentials Grant type.
Access tokens obtained from your identity provider typically have an expiration period. To maintain continuous access, create a script that can generate fresh access tokens as needed.

Using Environment Variables

Another way to use the command line is by exporting the following environment variables:
When using environment variables, it will ignore the local configuration file $HOME/.hoop/config.yaml

Managing Configuration

  • Configure your Gateway URL and clear any existent configuration
  • Configure the Gateway URL and the gRPC URL
This flag is optional and used only to interact with resource roles. The --grpc-url is obtained automatically from the Api when a user Sign In (issue the hoop login command)
  • Configure the Gateway URL, the gRPC URL and the TLS Certificate Root Certificate
This option should be used if your gateway is running with self signed certificates.
  • Show API_URL, GRPC_URL and TLS_CA configuration
  • Show all configuration with the access token (contains sensitive information)
  • Show sections of configuration
  • Wipe Local Configuration