GUIDEGuide

Export a dotenv file

movitera secrets pull prints an ENV_BUNDLE dotenv body to stdout or writes it to a file with mode 0600.

Print to stdout

bash
$ movitera secrets pull -c myapp-prod
DATABASE_URL="postgres://user:pass@db/prod"
REDIS_URL="redis://cache:6379"
APP_SECRET="<secret-value>"

Use stdout when another process will consume the output. Prompts and status messages go to stderr so they do not contaminate the dotenv body.

Write to a file

bash
$ movitera secrets pull -c myapp-prod -o .env
✓ Wrote myapp-prod to .env.

$ ls -l .env
-rw-------  1 you  staff  126 .env

0600 file

When you use -o, the CLI creates or replaces the file with read and write access only for the current user.

Next