﻿# Syntax

> Understand valid declarations and syntax errors

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

Use ordinary TOML tables and assignments for rules. Put global settings before the first table, then declare variable rules in `[env.NAME]` tables.

```toml
strict = true

[env.API_KEY]
required = true
storage = "encrypted"
```

Keep values in your environment sources. Duplicate tables or keys, unknown settings, and duplicate normalized file paths report `MALFORMED_DOTENVX_TOML`. A failed value check reports `INVALID_ENV`.

## Related

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