For the complete documentation index optimized for AI agents, see llms.txt.The CLI handles authentication, workspace/project/cluster selection, metadata sync, log retrieval, and dynamic queries against a remote gateway. Cluster provisioning and scaling happen in the Helix control plane, not the CLI.
Prerequisites
- A Helix Cloud account with at least one workspace and Helix Cloud cluster.
- A local Helix project (
helix initin any directory).
End-to-end flow
Authenticate
~/.helix/credentials.To use the CLI from CI or another non-browser environment, rotate a cluster API key and export it as HELIX_API_KEY:Pick a workspace
~/.helix/config and applies to all subsequent Helix Cloud commands.Discover clusters and add an instance
helix init cloud --cluster-id <cluster-id>.Sync gateway and auth metadata
helix sync writes the latest gateway_url, query_auth_header, query_auth_env, and node-type values from the cloud into [enterprise.production] in helix.toml. Re-run after any cluster change.If the cluster has not published a gateway_url yet, the CLI prints a warning. Set gateway_url manually under [enterprise.production] once you know it, or re-run helix sync later.Send dynamic queries
helix query posts to <gateway_url>/v1/query with the header named by query_auth_header (default Authorization).Reference: per-instance auth contract
Each[enterprise.<instance>] block stores the auth contract used by helix query:
| Field | Default | Purpose |
|---|---|---|
query_auth_header | Authorization | HTTP header name set on every query request. |
query_auth_env | HELIX_API_KEY | Environment variable the CLI reads to populate the header value. |
query_auth_env under [enterprise.<instance>] and exporting whatever name you choose.
Common errors
For Helix Cloud auth, gateway, and logging errors, see Troubleshooting.What next?
Local workflow
Run the local dev runtime and iterate on JSON requests
CLI Command Reference
Every command, subcommand, and flag