astro env variable export
This command is only available on Astro.
Export the environment variables for a scope as KEY=VALUE lines suitable for a .env file. The output round-trips with the --from-file flag on astro env variable create and astro env variable update, so you can promote variables between Workspaces or pull them into a local Astro project.
By default, the CLI masks secret values. Pass --include-secrets to include them, subject to an Organization policy that allows it. When you use --include-secrets, the CLI prints a sensitive-data warning to stderr so the warning never lands in the exported file.