Quickstart Guide
Get started with env-sentinel in minutes — install, lint your .env files, generate a schema, and validate environment variables for safety and consistency.
Quick Start
Welcome to env-sentinel — a lightweight tool for analyzing and validating .env files. This guide will help you set up env-sentinel, lint your environment variables, generate a schema, and validate them in just a few steps.
1. Installation
You can run env-sentinel directly with npx (no installation required):
npx env-sentinel lint --file .env
Or install it locally in your project:
npm install --save-dev env-sentinel
2. Lint Your .env
Linting checks for formatting errors, unsafe characters, and common pitfalls.
npx env-sentinel lint
👉 Learn more about Linting
3. Generate a Schema
Schemas describe the expected environment variables and their rules (required, number, boolean, etc.).
npx env-sentinel init
This will create a .env-sentinel schema file based on your current .env.
4. Validate Environment Variables
Once you have a schema, validate your .env against it:
npx env-sentinel validate
👉 Learn more about Validation
5. Document Your Config
You can also use env-sentinel to document environment variables for your team.
👉 See Documenting
Next Steps
- Explore the Linting rules and best practices.
- Understand Validation with schema-based checks.
- Learn how to Document your configuration for better team workflows.
With env-sentinel, your .env files stay consistent, safe, and production-ready.