Skip to content

env.toml

env.toml marks the project root (usually api/) and defines its environments.

api/env.toml
project = "billing-api" # optional
default = "dev" # optional
secrets = ["token"] # optional
[vars]
version = "v1"
[env.dev]
base = "http://localhost:8080"
[env.prod]
base = "https://api.example.com"
Key Description
project Namespace for secrets and saved values. Default: the project folder name, or its parent’s name if the folder is called api
default Environment used when --env is not given. Default: the first environment in alphabetical order
secrets Names of variables that are secrets. Values live in the keychain or OUTRY_*; the list lets outry vars and the app point out missing ones
[vars] Variables shared by all environments
[env.<name>] An environment; its variables override [vars]
[import.middleware] Headers that requests for routes behind a Go middleware need: AuthRequired = { headers = { Authorization = "Bearer ${Login().body.token}" } }. Used by outry import go, see Middleware

Values may be strings, numbers or booleans; non-strings are inserted as written (port = 8080 → 8080). Unknown keys are an error, so typos like defualt are caught.

Secrets do not belong here — see Secrets.