# Set

Set an environment variable.

### Syntax

```
$ vela env set <key> [value]
```

```
$ vela env set STRIPE_SECRET_KEY                  # prompts, without echo
$ vela env set PUBLIC_APP_NAME "My App"
$ vela env set STRIPE_SECRET_KEY -t production
```

Omit the value and you'll be prompted for it without echo, which keeps secrets out of your shell history. The key has to be a valid environment variable name.

Setting a variable on a remote target restarts the instance so the new value takes effect; setting one locally applies it to the running dev server. Defaults to `-t local`.