# Import

Merge a dotenv file into the environment.

### Syntax

```
$ vela env import <file> [--public] -t <target>
```

```
$ vela env import .env.production -t production
$ vela env import previews.env --public -t preview
```

This is a merge, not a replace: variables already set that the file doesn't mention are left alone. Variables the file does mention are overwritten.

Every value lands secret unless `--public` is passed; `PUBLIC_*` keys land public either way, and a key already on the other side moves. Importing into the same file you are importing from is refused. The instances the layer reaches are restarted once afterwards, and the environment is asked for when `-t` is missing.