Design guarantees
Built for predictable behaviour on real repositories
Most .env loaders silently mutate process state, discard formatting, or
expand shell-like syntax behind your back. adotenv keeps every boundary explicit.
Literal by default
Never expands or executes values silently
Values like ${HOME}, $USER, and command-like text stay literal. Variable resolution, file cascades, process mutation, and command execution live in explicit opt-in APIs or separate crates.
References & resolution →
Byte-for-byte lossless
Exact round-trips for any UTF-8 source
Comments, indentation, quoting, blank lines, invalid statements, a UTF-8 BOM, and mixed CRLF/LF line endings are preserved verbatim.
Parsing & lookup →
Verified edits
Exact byte spans & re-parsed edits
Every token carries a byte span and decoded values map back to source bytes. Edits return source-relative TextEdits and a re-parsed, verified document before returning.
Source-preserving editing →
#![forbid(unsafe_code)]
Zero required runtime dependencies
The core crate forbids unsafe code, supports no_std + alloc, and adds zero required dependencies (only the optional serde feature pulls serde).
Architecture →
5 dialect presets
Portable, Node, Python, Compose & Docker
Switch between Dialect::PORTABLE, NODE_DOTENV, PYTHON_DOTENV, COMPOSE, and DOCKER_RAW without changing files or re-allocating input.
Dialect rules →
Tooling ecosystem
CLI, linter, LSP, config & Figment
Share one parser across adotenv-cli, adotenv-lint, adotenv-lsp, adotenv-process, adotenv-config, and adotenv-figment with versioned JSON report schemas.
CLI & editor tooling →