Built with Rust

Security-first .env linter

Lint, audit secrets, enforce inline policies, and export safely. Built in Rust. Zero config.

~/project
$

Six commands. Zero config.

Security scanning, policy enforcement, and DevOps export โ€” built in from day one.

๐Ÿ”

Check + Policy

Validate format, detect duplicates, catch typos โ€” with inline policy annotations for per-key rules.

$ dotlint check .env --strict
๐Ÿ”’

Audit

Detect secrets via regex + Shannon entropy analysis. Flag weak passwords and missing .gitignore.

$ dotlint audit .env
๐Ÿ“‹

Strip

Generate safe .env.example by stripping values. Preserves comments and structure for commits.

$ dotlint strip .env -o .env.example
๐Ÿ“ฆ

Export

Convert .env to Docker Compose, Kubernetes ConfigMap, or shell exports โ€” with auto-masked secrets.

$ dotlint export .env k8s
โš–๏ธ

Diff

Compare two .env files side-by-side. See added, removed, and changed keys at a glance.

$ dotlint diff .env .env.prod
๐Ÿ”—

Sync

Ensure your .env matches the template. Find missing and extra keys before deployment.

$ dotlint sync .env.example .env

Inline policy annotations

Add validation rules as comments directly in your .env file. No config files, no schemas โ€” just comments.

.env
# dotlint:required,url
DATABASE_URL=postgres://localhost/db
# dotlint:required,min=8
SESSION_SECRET=short
# dotlint:boolean
DEBUG=maybe
# dotlint:port
APP_PORT=3000
$ dotlint check .env
โœ“ 4 variables loaded
โœ— LINE 5: SESSION_SECRET must be at least 8 characters (policy: min=8)
โœ— LINE 8: DEBUG must be a boolean (policy: boolean)
Result: 2 errors, 0 warnings
โ†’
Zero config
Rules live in the file they validate
โ†’
7 policy types
required, url, port, number, boolean, min=N, pattern=REGEX
โ†’
CI-ready
Exit code 2 on policy violations, JSON output for automation

Get started in seconds

Single binary, no runtime, no dependencies.

$ cargo install dotlint
MIT License~2MB binary<5ms startup