Skip to main content

Config-as-Code

A .caged.yaml file in your repository root defines sandbox settings declaratively. When you run caged up, the CLI reads this file and creates a sandbox with the specified configuration.

Full Reference

Templates

Aliases resolve to the latest stable version. Use full names when you need a specific version.

Precedence

When both .caged.yaml and CLI flags are provided, CLI flags take precedence:

Secrets

Secrets are referenced by name in .caged.yaml and resolved from your account’s secret store:
Set secrets via CLI:
Never put actual secret values in .caged.yaml. The file should only contain secret names that reference your account’s secret store.

Multiple Environments

Use different config files for different environments:

Private Repositories

For private repos, provide authentication via token: Reference an environment variable containing your token:
Then run:

Option 2: CLI Flag

Pass the token directly (useful in CI):

Option 3: Secrets Store

Store your token in the Caged secrets store:
Then reference it in your config:
Token formats by provider:
  • GitHub: Personal access token (ghp_...) or fine-grained token
  • GitLab: Personal access token or OAuth token
  • Bitbucket: App password

Monorepo Support

Extract a subdirectory from a monorepo:

Validation

The CLI validates your config before creating a sandbox:
Common validation errors: