﻿# Commands

> Encrypt and validate with Dotenv.toml

[Dotenv.toml](/docs/dotenv-toml/)

Create `Dotenv.toml` in your project root, then encrypt and run your app.

```console
$ dotenvx encrypt
$ dotenvx run -- node index.js
```

Use `-f` to select a specific environment file and apply its [file overrides](/docs/dotenv-toml/file/).

```console
$ dotenvx encrypt -f .env.production
$ dotenvx run -f .env.production -- node index.js
```

Dotenvx validates resolved values before starting the command. With `strict = true`, validation failures stop startup.

See the [quickstart](/docs/dotenv-toml/quickstart/) for a complete example.

## Related

- [Dotenv.toml Quickstart](/docs/dotenv-toml/quickstart/)
- [Full Dotenv.toml Spec](/docs/dotenv-toml/spec/)
