Placeholder types
${secrets.*} — for sensitive values such as credentials and API keys. The logical key (e.g. secrets.email) maps to a shell environment variable declared in your binding file. The actual value is never stored in YAML.
${variables.*} — for non-sensitive values such as locale codes, search terms, and feature flags. Values are declared directly in the binding file as plain strings.
Both types must be declared in .finalrun/env/<name>.yaml before you use them in a test.
Env binding file
Create a file under.finalrun/env/ for each environment you use (e.g. dev.yaml, staging.yaml). Declare secrets as ${SHELL_ENV_VAR} placeholders and variables as plain values:
secrets entries are placeholders only. The CLI resolves them from shell environment variables and .env files at run time. Do not put real credentials in this YAML file.
Using placeholders in tests
Reference declared placeholders with${secrets.<key>} or ${variables.<key>} syntax anywhere in setup, steps, or expected_state:
Load order
When you run FinalRun with an env namedN (e.g. --env dev), the CLI resolves values in this order:
When no env profile is configured, the CLI uses
process.env and .env directly. You do not need a .env.<name> file for a simple single-environment workspace.Selecting an env profile
Pass--env <name> to the CLI to activate a specific env profile. The name must match a file under .finalrun/env/:
.env.staging, then .env, then process.env, and resolve all ${secrets.*} bindings declared in .finalrun/env/staging.yaml.
Never commit secrets
.env.example to document which shell variables team members need to export, without including real values.
