πŸ›‘οΈ EnvShield

Stop Managing Configuration.
Start Declaring It.

Configuration orchestration for multi-service projects. One schema for all services. Typed config code. Interactive onboarding. Drift prevention. Secret scanning. All free, all local, all in your git repo.

pip install envshield
EnvShield compiling env.schema.toml into a typed, secret-masked TypeScript config module

Configuration as a Contract

Multi-service projects have scattered .env files across services. Nobody knows what variables each service needs. New devs spend 2 hours figuring it out. Configuration drifts between environments silently. EnvShield solves this with one schema that all services agree on.

πŸ”— Multi-Service, Auto-Discovered

One env.schema.toml per service, one envshield.yml tying them together β€” and envshield service discover finds every service and seeds all their schemas in one command. Built for multi-service from the ground up.

⚑ 2-Minute Onboarding

New dev runs envshield setup. Prompted with descriptions. Secrets hidden. Done. No Slack threads. No manual guessing.

🎯 Prevents Drift

envshield doctor catches config mismatches before they reach production. envshield check validates your .env.

🧬 Typed Config Code

Generate real Python (pydantic) or TypeScript (zod) code straight from your schema. Type-safe. Validated on startup. Secrets masked.

πŸ” Secret Scanning

Pre-commit hook scans staged content (not working-tree). Catches hardcoded secrets you edited out on disk. Free and local.

πŸ“š Fresh Documentation

envshield schema sync regenerates .env.example from schema. One source of truth. Documentation never rots.

A Secure Foundation, From First Commit to Production

EnvShield transforms your most painful workflows into a secure, automated process.

πŸ—οΈ Bootstrap a Secure Project in Seconds

Run `envshield init` in a new or existing project. EnvShield intelligently detects your framework (Next.js, Django, Flask) and scaffolds a complete, best-practice foundation: a schema, a `.gitignore` update, and an automated security hook, all in one command.

envshield init
EnvShield initializing a new project
$ envshield service discover

                     Discovered Services
┏━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Name   ┃ Directory      ┃ Format ┃ Config File           ┃
┑━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━┩
β”‚ api    β”‚ services/api   β”‚ dotenv β”‚ (default .env)        β”‚
β”‚ web    β”‚ services/web   β”‚ dotenv β”‚ (default .env)        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
? Add these services to envshield.yml? Yes
βœ“ Registered api β†’ services/api/env.schema.toml
βœ“ Registered web β†’ services/web/env.schema.toml

✨ Added 2 service(s) to envshield.yml.

πŸ”­ Already Have Multiple Services? Find Them All At Once

envshield init sets up one schema for one service. In a monorepo, run envshield service discover instead: it scans for every service with its own real config β€” a dotenv file or a recognizable Python config module β€” registers each one, and seeds its schema from its actual current values. Run it again later and it only picks up what's new, leaving already-configured services untouched.

envshield service discover

How EnvShield Compares

EnvShield treats configuration as a contract across multiple services β€” here's how that compares to the tools people usually reach for instead.

EnvShield Gitleaks dotenvx Infisical direnv
Multi-service support βœ… Built-in ❌ ❌ ❌ ❌
Schema-driven βœ… Unique ❌ ❌ ❌ ❌
Typed code generation βœ… Unique ❌ ❌ ❌ ❌
Interactive onboarding βœ… ❌ ❌ βœ… Cloud-only ❌
Works offline βœ… βœ… βœ… ❌ βœ…
Prevent secrets at commit βœ… βœ… Better detection βœ… βœ… (stores them) ❌

The difference: Gitleaks, dotenvx, Infisical, and direnv each solve one piece of the configuration puzzle. EnvShield's schema-as-contract approach, with native multi-service support, is a different angle on the same problem.

Everything You Need

Comprehensive commands for schema management, validation, code generation, secret scanning, and onboarding. Works with single-service or multi-service projects.

πŸ—οΈ `init` - The Architect

Scaffolds a new project with a schema, config, and security hook in one command.

🚚 `import` - The Migrator

Intelligently converts a messy, existing `.env` file into a clean `env.schema.toml` in seconds.

πŸ”­ `service discover` - The Scout

Finds every service in a monorepo, registers them, and seeds each schema from its real config β€” one command instead of hand-writing envshield.yml and importing each service one by one.

πŸ’ͺ `scan` - The Bodyguard

Scans for hardcoded secrets and undeclared variables used in your code, preventing leaks.

πŸ“š `schema sync` - The Librarian

Auto-generates a perfect `.env.example` from your schema, keeping documentation in sync.

πŸͺ„ `setup` - The Assistant

An interactive wizard to help new developers create their local `.env` file in minutes.

βœ… `check` - The Validator

Validates your local `.env` file against the schema, catching typos and missing variables.

🩺 `doctor` - The Medic

Runs a full health check on your setup and provides interactive fixes with the `--fix` flag.

🧬 `generate` - The Compiler

Compiles your schema into a typed, validated `pydantic-settings` or `zod` config module β€” auto-detected for your stack, or set with `--lang`.

πŸ›‘ `install-hook` - The Guardian

Installs a Git pre-commit hook that automatically runs secret scanning before each commit. Prevents secrets from ever reaching your repository.

Why EnvShield?

A scanner is a smoke detector. A cloud vault is a bank. EnvShield is the fireproof, self-organizing house you should have been living in all along.

Developer Pain Point πŸ›‘οΈ EnvShield TruffleHog / Gitleaks Doppler / Infisical
Preventing Secret Commits βœ… Built-in Hook βœ… Core Feature ❌ Indirectly
Migrating Existing Projects βœ… `import` command ❌ Not Addressed ❌ Not Addressed
New Developer Setup βœ… `setup` command ❌ Not Addressed βœ… Via Cloud
Handling Config Drift βœ… Solved via Schema ❌ Not Addressed βœ… Solved via Cloud
Typed, Validated Config Code βœ… `generate` (Python & TypeScript) ❌ Not Addressed ❌ Not Addressed
Primary Focus Complete Local Workflow Secret Detection Engine Cloud-Based Secret Vault

Works With Your Stack

Python TypeScript Node.js Next.js Django Flask

The Future is Collaborative & Automated

Phase 1 is the free, powerful "Local Guardian." Upcoming paid tiers will turn EnvShield into a complete collaboration and automation platform for teams and enterprises.

Phase 2: The Team Collaborator (Coming Soon)

  • Environment Profiles: Switch between dev/staging/prod with one command.
  • Automated Onboarding: Setup, config, and scripts in one command.
  • Team Collaboration: Securely share secrets with teammates.
  • CI/CD Integration: Validate config before deployment.

Phase 3: The Enterprise System (Future)

  • Cloud Secret Vault: Optional centralized backend for teams.
  • Vault Integration: Pull from HashiCorp, AWS Secrets, etc.
  • Audit Logs & RBAC: Full compliance and team permissions.
  • Policy Engine: Enforce naming conventions and best practices.