Skip to Content
New to Genbox? Check out our Getting Started guide
ConfigurationOverview

Configuration Overview

Genbox uses a declarative genbox.yaml file to configure your development environments.

Configuration Philosophy

Genbox follows a declarative-first approach:

  • Explicit over implicit: You control exactly what happens
  • $detect for convenience: Opt-in auto-detection where useful
  • Profiles for variations: Different configs for different workflows
  • Computed resolution: See exactly what will execute

File Structure

project/ β”œβ”€β”€ genbox.yaml # Main configuration (commit this) β”œβ”€β”€ .env.genbox # Secrets and credentials (gitignore) └── .genbox/ β”œβ”€β”€ detected.yaml # Auto-detected values (gitignore) └── resolved.yaml # Computed final config (gitignore)

Basic Example

version: 4 project: name: myapp structure: monorepo apps: frontend: path: ./web type: frontend port: 3000 framework: nextjs backend: path: ./api type: backend port: 3050 framework: nestjs provides: mongodb: type: database image: mongo:7 port: 27017 profiles: quick: size: small apps: [frontend] default_connection: staging full: size: large apps: [frontend, backend] default_connection: local

Key Sections

Quick Reference

SectionPurpose
projectProject metadata and structure
appsApplication definitions
providesInfrastructure services
environmentsExternal environment connections
profilesEnvironment configurations
defaultsDefault values
hooksLifecycle hooks
reposMulti-repo configurations

Resolution Order

When creating an environment, values are resolved in this order (highest priority first):

  1. CLI flags (--size large)
  2. Profile settings (profiles.full.size)
  3. Explicit values (apps.api.port: 3050)
  4. $detect markers (auto-detected from project)
  5. Default values (defaults.size)
  6. Schema defaults (built-in fallbacks)

Validation

Always validate your configuration:

# Validate current config gb validate # See resolved values gb config show --explain # Compare profiles gb config diff quick full
Last updated on