﻿# --format eval-export

> Return export statements for loading .env values into the current shell

[dotenvx get](/docs/cli/get/)

```cli
$ dotenvx get --format eval-export
```

## Usage

```console
$ echo "HELLO=World" > .env
$ dotenvx get --format eval-export
export HELLO='World'
```

Evaluate the output to make the values available to subsequent commands in your current shell.

```console
$ eval "$(dotenvx get --format=eval-export)"
$ echo "$HELLO"
World
```

Pass quoted glob patterns to export only matching variables.

```console
$ eval "$(dotenvx get 'TF_VAR_*' --format=eval-export)"
$ terraform plan
$ terraform apply
```

The exported values remain in the current shell until you unset them or close the shell. Prefer `dotenvx run --` when variables only need to be available to a single command.
