Authentication
Sign in to Huddle Cloud from your terminal.
hudl uses API keys for authentication. Huddle01 uses separate API keys for Cloud (VMs, networks, storage, etc.) and GPU services. Store your keys once and the CLI reuses them from ~/.hudl/config.toml, or inject them per-command via environment variables.
Getting API keys
- Cloud API key — Generate from the Huddle Cloud dashboard under Settings > API Keys. Cloud API keys start with
mk_and grant the same permissions as your user account within a workspace. - GPU API key — Generate from the GPU section of the dashboard, or via
hudl gpu apikey create.
Save API keys
# Store both Cloud and GPU keys
hudl login --token mk_xxx --gpu-token gk_xxx
# Store only your Cloud key
hudl login --token mk_xxx
# Store only your GPU key
hudl login --gpu-token gk_xxxThis writes the keys to ~/.hudl/config.toml. The file is created with 0600 permissions so only your user can read it.
Or prompt interactively (the key is not echoed):
hudl loginFallback behavior
If no GPU API key is configured, the Cloud API key is used as a fallback for GPU requests. This means you can get started with just one key if your account supports both services.
Environment variables
For CI pipelines, containers, and scripting, set the keys as environment variables:
export HUDL_API_KEY=mk_xxx # Cloud API key
export HUDL_GPU_API_KEY=gk_xxx # GPU API key
hudl vm list # uses HUDL_API_KEY
hudl gpu list # uses HUDL_GPU_API_KEYEnvironment variables take precedence over the stored config file. This is useful for running different workspaces in parallel:
HUDL_API_KEY=mk_prod hudl vm list --workspace acme-prod
HUDL_API_KEY=mk_staging hudl vm list --workspace acme-stagingWorkspace and region context
Your default workspace and region are stored in the user config. Most commands require both to be set.
hudl ctx # show current workspace + region
hudl ctx use acme-staging # switch workspace
hudl ctx region us1 # switch regionYou can override either on a per-command basis without changing the stored context:
hudl vm list --workspace acme-prod --region eu2Multiple workspaces
If you work across multiple workspaces, you can use a project-level hudl.toml to set the context per repository:
# ./hudl.toml (checked into your repo)
workspace = "acme-prod"
region = "eu2"See Configuration for the full precedence order.
CI/CD setup
For GitHub Actions or other CI systems, store your API keys as secrets and export them:
# .github/workflows/deploy.yml
env:
HUDL_API_KEY: ${{ secrets.HUDL_API_KEY }}
HUDL_GPU_API_KEY: ${{ secrets.HUDL_GPU_API_KEY }}
steps:
- run: |
curl -fsSL https://get.huddle01.com/hudl | sh
hudl vm list --workspace acme-prod --region eu2 -o jsonInspect and clear auth
hudl auth status # show the authenticated user and active workspace
hudl auth clear # remove stored credentials from ~/.hudl/config.tomlSecurity
Never commit API keys to source control. Use HUDL_API_KEY and HUDL_GPU_API_KEY in CI, and keep api_key / gpu_api_key only in ~/.hudl/config.toml (which is in your home directory, not your project).