Skip to main content

Prevent environment variable drift with Pydantic schema validation, pre-commit hooks, and dotenvx encryption

Project description

envdrift logo

envdrift

PyPI version Python 3.11+ License: MIT Docs codecov

Sync environment variables across your team. No more "it works on my machine."

The Problem

  • New developer joins → spends half a day hunting for the right .env values
  • Someone updates a secret → nobody else knows until production breaks
  • "Can you send me the latest API keys?" in Slack → security nightmare

Paid SaaS solutions exist, but do you really want your production secrets on someone else's infrastructure?

The Solution

envdrift is an open-source CLI that syncs encrypted .env files using your existing cloud vault. No hosted service, no additional servers, no third-party trust.

  • Your infrastructure — Works with Azure Key Vault, AWS Secrets Manager, HashiCorp Vault, GCP Secret Manager
  • Zero trust required — Secrets never leave your cloud
  • No new servers — Just a CLI tool, no client-server architecture
  • Free forever — MIT licensed, no per-seat pricing
# New team member onboarding - one command
envdrift pull

# That's it. Keys synced from vault, .env files decrypted, ready to code.

Installation

pip install "envdrift[vault]"  # All vault providers

Quick Start

1. Encrypt and push to vault (once per project):

envdrift encrypt .env.production
envdrift vault-push . my-app-key --provider azure --vault-url https://myvault.vault.azure.net/

2. Team members pull instantly:

envdrift pull --provider azure --vault-url https://myvault.vault.azure.net/

3. Daily workflow:

envdrift pull   # After git pull - sync keys, decrypt
envdrift lock   # Before commit - encrypt, verify keys

Beyond Sync

Feature Description
Schema Validation Validate .env against Pydantic schemas
Environment Diffing Compare dev vs staging vs production
Vault Integration Azure, AWS, HashiCorp, GCP
Encryption dotenvx and SOPS backends
CI/CD Mode Fail builds on misconfiguration
envdrift validate .env --schema config:Settings
envdrift diff .env.dev .env.prod

Documentation

Full documentation: jainal09.github.io/envdrift

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

envdrift-6.0.0.tar.gz (267.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

envdrift-6.0.0-py3-none-any.whl (116.1 kB view details)

Uploaded Python 3

File details

Details for the file envdrift-6.0.0.tar.gz.

File metadata

  • Download URL: envdrift-6.0.0.tar.gz
  • Upload date:
  • Size: 267.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for envdrift-6.0.0.tar.gz
Algorithm Hash digest
SHA256 6c7db218882f4ede145e8013893db5a4c3d9ff2b605d271acdca074f1dec3846
MD5 8403877ed309f12d105a5185f1441a1b
BLAKE2b-256 2de9ff657b1ee2b03b64998c3a39c267d4a894bbe8e1b17102826df1efce2bb9

See more details on using hashes here.

File details

Details for the file envdrift-6.0.0-py3-none-any.whl.

File metadata

  • Download URL: envdrift-6.0.0-py3-none-any.whl
  • Upload date:
  • Size: 116.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for envdrift-6.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d57391bbfb951d5a9fa3a41de92e0d1884126a1c4501af5d42814bb955a3e742
MD5 ce3ee694afe0ef9ba2300ecf1a30fc7f
BLAKE2b-256 55edffbd2eb840efbe2db72a7ea492cb15efc5571066bab72d1bb04d26308126

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page