dyn export and dyn apply are the config-as-code pair. Together they let you treat an environment’s configuration as a file you can review, diff, version in git, and apply repeatably.
What you need: The CLI installed and authenticated, with an environment selected. See Getting started. Both commands act on the active environment — confirm it with
dyn status first.Export an environment
Apply a file
dyn apply diffs a file against the current environment and brings the environment into line with the file.
Safety gates
On the real (non-dry-run) path,dyn apply refuses risky changes unless you opt in with an explicit flag. This prevents a stale or hostile YAML file from silently weakening auth or deleting resources.
Other useful flags:
--concurrency <n> to parallelize mutations, and --yes to skip the final confirmation prompt (required in non-interactive contexts).
Common patterns
Clone live into sandbox. Export production, then apply it to a safe playground:envs/sandbox.yaml in your repo, edit it in a pull request, and apply after review:
Related
- Project settings — change individual settings without a full apply.
- Authentication & CI — run
dyn applynon-interactively in pipelines.