﻿# Dotenv.toml

> Define the rules for your environment variables

[Advanced](/docs/advanced/)

A Dotenv.toml contains variable names and rules. Values stay in your `.env` files or other environment sources. It is safe to commit.

Start with the [Dotenv.toml quickstart](/docs/dotenv-toml/quickstart/), then explore each declaration and setting below.

```toml
strict = true

[env.DATABASE_URL]
type = "url"
required = true
storage = "encrypted"
redacted = true

[env.PORT]
type = "port"
storage = "plaintext"
redacted = false
```

## Reference

- [Declarations](/docs/dotenv-toml/env/)
- [Strictness](/docs/dotenv-toml/strict/)
- [Required](/docs/dotenv-toml/required/)
- [Optional](/docs/dotenv-toml/optional/)
- [Types](/docs/dotenv-toml/type/)
- [Choices](/docs/dotenv-toml/enum/)
- [Minimum](/docs/dotenv-toml/min/)
- [Maximum](/docs/dotenv-toml/max/)
- [Encryption](/docs/dotenv-toml/encrypted/)
- [Redaction](/docs/dotenv-toml/redacted/)
- [File overrides](/docs/dotenv-toml/file/)
- [Syntax](/docs/dotenv-toml/syntax/)
- [Commands](/docs/dotenv-toml/commands/)

## Related

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