Configuration
Overview
Hyve’s configuration model is intentionally minimal. There are no embedded credential stores or cloud-provider config files. Everything lives in three places:
hyve.yamlat your repository root — reconciliation behaviourhyve.lockat your repository root — locked module versions (auto-managed)- Your environment — credentials passed as module params or standard env vars
hyve.yaml
Place hyve.yaml at the root of your Hyve state repository to control reconciliation behaviour.
# hyve.yaml — placed at the root of your Hyve state repositoryreconcile: mode: local # "local" (default) or "cicd" strictDelete: false # set to true to warn about untracked cloud clusters strictResourceDelete: false # set to true to auto-prune orphaned spec.resources entries| Field | Type | Default | Description |
|---|---|---|---|
reconcile.mode | string | local | local — Hyve provisions clusters directly from the machine running hyve reconcile. cicd — Hyve validates and pushes desired state to Git; a CI/CD pipeline calls hyve reconcile --path . to provision. |
reconcile.strictDelete | bool | false | When true, after each reconcile Hyve scans the cloud provider for clusters with no matching YAML in clusters/ and logs a warning naming each one — it does not delete anything automatically. See Provider Scan for what the scan can and can’t see. |
reconcile.strictResourceDelete | bool | false | When true, a spec.resources entry removed from a cluster’s YAML without delete: true is pruned automatically instead of just logged as orphaned. |
See the CI/CD Workflow Guide for a complete walkthrough of CI/CD mode with GitHub Actions.
server (optional)
Add a server block to configure hyve serve — hyve’s REST + WebSocket API mode:
server: port: 8080 # default; also settable via --port or HYVE_PORT frontendUrl: "http://localhost:5173" # opened by `hyve serve --open`
auth: mode: none # none (default) | forward forward: validateUrl: "" # also settable via HYVE_AUTH_VALIDATE_URL timeout: "3s" # also settable via HYVE_AUTH_VALIDATE_TIMEOUT| Field | Default | Description |
|---|---|---|
server.port | 8080 | TCP port hyve serve listens on |
server.frontendUrl | — | URL hyve serve --open navigates to |
server.auth.mode | none | none — no auth. forward — every request’s Authorization header is forwarded to validateUrl for validation |
server.auth.forward.validateUrl | — | External endpoint hyve delegates token validation to |
server.auth.forward.timeout | 3s | Timeout before the validator is treated as unreachable (fails closed) |
See the Server Mode guide for the full REST API reference and authentication model.
env (optional)
Add an env block to point hyve at a local, gitignored file of environment variables — loaded before every reconcile and workflow run, CLI or server-triggered:
env: file: local.env # relative to the repo root| Field | Default | Description |
|---|---|---|
env.file | — | Path, relative to the repo root, to a .env-style file loaded into the process environment before reconciling or running a workflow. Unset means nothing extra is loaded. |
Set it from the CLI or from Hyve Studio’s Configuration section — either way, the filename is automatically appended to .gitignore the moment it’s set, so it can’t ship to your remote by omission:
hyve config set env.file local.envhyve config get# local.env — never committedCIVO_TOKEN=your-tokenSOME_APP_SECRET=whatever# clusters/my-cluster.yaml — reads from local.env, the real process# environment, or CI secrets, in that orderspec: resources: - name: my-app source: ./resource-files/my-app.yaml values: token: ${SOME_APP_SECRET}See hyve config for the full CLI reference.
hyve.lock
hyve.lock is a content-addressed YAML lock file at the root of your state repository. It is auto-managed by the hyve module and hyve workflow commands and should be committed to Git.
version: 1modules: github.com/hyve-modules/civo@v1.0.0: source: github.com/hyve-modules/civo@v1.0.0 resolved: https://github.com/hyve-modules/civo/archive/v1.0.0.tar.gz sha256: "abc123..."workflows: github.com/myorg/shared-workflows//setup-monitoring.yaml@v1.2.0: name: setup-monitoring source: github.com/myorg/shared-workflows//setup-monitoring.yaml@v1.2.0 resolved: https://raw.githubusercontent.com/myorg/shared-workflows/v1.2.0/setup-monitoring.yaml sha256: "def456..."The workflows key only appears once a template or cluster references a remote workflow — repositories using only local workflows in workflows/ don’t have it at all.
You should never edit hyve.lock directly. Use the module and workflow commands to manage it:
hyve module add github.com/hyve-modules/civo@v1.0.0 # add and lock a modulehyve module update github.com/hyve-modules/civo # update a module to latesthyve module install # install all locked moduleshyve module list # show locked modules
hyve workflow install # lock all remote workflow refshyve workflow update github.com/myorg/shared-workflows//setup-monitoring.yamlhyve workflow verify # confirm cached content matches sha256Credentials
Hyve does not store cloud credentials. Modules read credentials from:
- Module params passed as
--set KEY=VALUEwhen creating a template - Standard cloud CLI config files (
~/.civo.json,~/.aws/credentials, GCP ADC,az loginsession) - Environment variables (
CIVO_TOKEN,AWS_ACCESS_KEY_ID,GOOGLE_APPLICATION_CREDENTIALS, etc.)
Passing credentials as params
When a module expects a credential (like a Civo API token), you can pass it directly as a template param. This value is stored in cluster.spec.params in the cluster YAML and injected as HYVE_PARAM_<KEY> on every reconcile.
hyve template create my-template \ --driver github.com/hyve-modules/civo \ --driver-version v1.0.0 \ --region PHX1 \ --set api_key=${CIVO_TOKEN}Environment variables
Most modules support reading credentials directly from the environment, matching their underlying cloud CLI conventions:
# Civoexport CIVO_TOKEN=your-token
# AWSexport AWS_ACCESS_KEY_ID=your-key-idexport AWS_SECRET_ACCESS_KEY=your-secret-keyexport AWS_REGION=us-east-1
# GCPexport GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json
# Azureexport AZURE_TENANT_ID=your-tenant-idexport AZURE_CLIENT_ID=your-client-idexport AZURE_CLIENT_SECRET=your-client-secretFor CI/CD pipelines, store credentials as pipeline secrets (e.g., GitHub Actions secrets) and export them before running hyve reconcile.
Git Credentials
For private Git repositories, configure authentication via environment variable or git’s credential helper:
# Environment variable (preferred for CI/CD)export HYVE_GIT_TOKEN=ghp_xxxxxxxxxxxx
# Or configure git's credential managergit config --global credential.helper osxkeychain # macOSgit config --global credential.helper manager # Windows
# SSH authenticationeval $(ssh-agent)ssh-add ~/.ssh/id_rsahyve git add production --repo-url git@github.com:company/hyve-prod.gitSee the Git Management guide for full authentication options.
Directory Structure
~/.hyve/├── repositories.db # Repository configurations (SQLite)├── temp/ # Temporary kubeconfig files└── repositories/ # Cloned repository storage └── <repo-name>/ ├── clusters/ # Cluster YAML definitions ├── workflows/ # Workflow YAML definitions ├── templates/ # Template YAML definitions ├── hyve.yaml # Reconciliation config (optional) └── hyve.lock # Module + remote workflow lock file (auto-managed)Configuration Priority
Hyve resolves values in this order:
Command-line flags
Highest priority — overrides all other sources
hyve cluster auth my-clusterEnvironment variables
Second priority — from shell or CI/CD pipeline secrets
export CIVO_TOKEN=tokenCloud CLI credential stores
Third priority — ~/.civo.json, ~/.aws/credentials, GCP ADC, az login session
Default values
Lowest priority — built-in defaults from hyve.yaml or the module manifest
Security Best Practices
Use environment variables for secrets
Pass sensitive values like API tokens as environment variables rather than --set params. Environment variables are never written to Git.
export CIVO_TOKEN=your-token# The module reads CIVO_TOKEN automatically — no --set neededhyve template create my-template \ --driver github.com/hyve-modules/civo \ --driver-version v1.0.0 \ --region PHX1Commit hyve.lock to Git
The hyve.lock file ensures reproducible module installs. Always commit it to your state repository:
git add hyve.lockgit commit -m "Lock module versions"Use separate repositories per environment
Keep production and development state in separate Git repositories with separate credentials:
hyve git add production --repo-url https://github.com/company/hyve-prod.githyve git add development --repo-url https://github.com/company/hyve-dev.gitNever commit secrets
If you use .env files for local development, add them to .gitignore:
.env.env.*!.env.exampleIf you set env.file in hyve.yaml (via hyve config set env.file <path> or Hyve
Studio — see env (optional)), this is handled for you automatically:
the filename is appended to .gitignore the moment it’s set, before it’s ever written to
disk.