Advanced
dotenvx get --format shell
Return a shell formatted response of all key/value pairs in a .env file.
$ echo "HELLO=World" > .env
$ echo "KEY=value" >> .env
$ dotenvx get --format shell
HELLO=World KEY=value
This can be useful when combined with env
on the command line.
$ env $(dotenvx get format --shell) your-command
or with export
.
$ export $(dotenvx get format --shell) your-command