Skip to content

Typed config Reference (carotene.toml) ​

In traditional ecosystems, configuring a project requires a fragmented mess of files: package.json, tsconfig.json, .prettierrc, jest.config.js, and docker-compose.yml.

Carotene replaces all of this with a single, strictly typed control plane: carotene.toml.

This file dictates how the Carotene compiler generates your monorepo, which AI provider powers your Generative Operators, and how your sandboxes and production environments connect to physical infrastructure.

1. [project] ​

Defines the core metadata for your monorepo workspace.

toml
[project]
name = "enterprise-billing-system"
version = "1.0.0"
authors = ["Platform Team <platform@corp.com>"]
description = "Core billing and invoice generation architecture."
  • name: (Required) The root name of your monorepo.
  • version: Semantic versioning for your architecture.
  • authors: List of maintainers.

2. [compiler] ​

Instructs the Carotene CLI on how to translate your .carrot blueprints into physical code inside the .generated/ and src/directories.

toml
[compiler]
target = "typescript"       # Options: "typescript", "go"
out_dir = "./apps"          # Where the monorepo apps are generated
strict_null_checks = true   # Enforces rigorous type safety in generated code
  • target: (Required) The physical language the compiler writes.
  • out_dir: The root directory where your dynamic backend and frontend folders are placed. Defaults to ./apps.
  • strict_null_checks: If true, prevents the AI from generating code that ignores ? optional fields in your models.

3. [ai] ​

Configures the LLM engine that resolves your @(...) Generative Operators during carrot dev and carrot build.

toml
[ai]
provider = "google"         # Options: "google", "anthropic", "openai"
model = "gemini-1.5-pro"    # The specific model version to use
temperature = 0.0           # Locked to 0.0 for maximum determinism
max_retries = 5             # How many times the Sandbox can correct the AI
  • provider: (Required) The LLM provider you authenticated with via carrot login.
  • model: The specific model to use for logic synthesis.
  • temperature: Defaults to 0.0. Carotene overrides high temperatures to ensure mathematical determinism during the build step.
  • max_retries: The maximum number of autonomic correction loops the Vapor Sandbox will run before failing the build.

4. [sandbox] ​

Configures the default behavior for the Vapor Sandbox during Test-Driven Generation. (Note: You can override these settings on a per-test basis inside a .carrot file).

toml
[sandbox]
default_engine = "EmbeddedWASM"  # Options: "EmbeddedWASM", "DockerTransactional"
timeout_ms = 5000                # Sandbox execution timeout per test
network_strict = true            # If true, unmocked network calls fail instantly

5. [environments] ​

This block is how Carotene maps the abstract store and integration definitions from your blueprints to actual, physical URLs and API keys.

Carotene securely injects environment variables using the env() wrapper, ensuring secrets are never checked into version control.

[environments.development] ​

Used automatically when running carrot dev.

toml
[environments.development]
database = "sqlite://.carotene/local.db"

[environments.development.integrations]
Stripe = "sk_test_12345"
SendGrid = "mock_sendgrid_key"

[environments.production] ​

Used during carrot build or when deploying the generated application.

toml
[environments.production]
database = "postgres://env(DB_USER):env(DB_PASS)@env(DB_HOST)/env(DB_NAME)"

[environments.production.integrations]
Stripe = "env(STRIPE_SECRET_KEY)"
SendGrid = "env(SENDGRID_API_KEY)"
  • database: The connection string mapped to your store primitives.
  • integrations: Maps the external APIs declared in your calls verbs to physical API keys. If a calls verb exists in your architecture but the key is missing here, the compiler will warn you.