Skip to main content
hexr login saves your Hexr Cloud API key to ~/.hexr/config.json so that subsequent hexr push --cloud and hexr deploy --cloud calls can authenticate without prompting. You only need to run this once per machine — or when you rotate your API key. Your key is scoped to a specific tenant and role, which are stored alongside it and used by all cloud-connected commands.

Usage

hexr login --key <api_key>

Options

--key, -k
string
Your Hexr Cloud API key. Keys follow the format hxr_live_<64 hex characters>.
hexr login --key hxr_live_0f0ea94b...
--url
string
default:"https://api.hexr.cloud"
Cloud API endpoint. Override this when connecting to a self-hosted Hexr Cloud API.
--status
flag
Show your current authentication status without modifying stored credentials.
$ hexr login --status

Authenticated:
API Key: hxr_live_0f0e...d739 (masked)
Tenant: Hexr Internal (tnt_e979ae50...)
Role: admin
Endpoint: https://api.hexr.cloud

What gets stored

hexr login writes a JSON file to ~/.hexr/config.json:
{
  "api_key": "hxr_live_...",
  "api_url": "https://api.hexr.cloud",
  "tenant_id": "tnt_e979ae50...",
  "tenant_name": "Hexr Internal"
}
Once authenticated, the following commands use these credentials automatically:
  • hexr push --cloud — builds your container via Google Cloud Build
  • hexr deploy --cloud — deploys to Hexr Cloud’s managed GKE cluster
  • hexr status — lists agents deployed in your Hexr Cloud tenant

Logging out

To remove stored credentials from your machine:
$ hexr logout
 Credentials removed from ~/.hexr/config.json
hexr logout permanently removes the stored API key from this machine. Commands that require authentication will prompt you to log in again.