Documentation Index
Fetch the complete documentation index at: https://www.dynamic.xyz/docs/llms.txt
Use this file to discover all available pages before exploring further.
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.
| Flag | Required when the plan… |
|---|---|
--allow-critical-changes | …mutates auth-critical resources (providers, JWT keys, MFA, etc.). |
--allow-security-downgrades | …weakens a security setting (e.g. turns MFA off, removes an allowlist entry). |
--allow-new-domains | …introduces a URL whose host is not already trusted. In a TTY, you’re prompted to confirm the host. |
--allow-delete | …deletes any resource. Off by default so a YAML missing entries can’t silently remove them. |
--skip-deletions | Apply adds and updates but skips every delete. A safe default for partial-YAML workflows. |
--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.