Skip to main content

The contract for your .env — validate it, catch team drift, and never commit a secret. 100% local.

Project description

envcontract

The contract for your .env. Validate it, catch team drift, and never commit a secret — 100% local, your values never leave your machine.

Status: early development (v0.1.0). Built in the open.

Why

Teammates add an env var and forget to tell anyone. Secrets get committed by accident. .env.example drifts out of sync and was never a real schema. envcontract fixes this with one committed contract — .env.schema — that lists your variables and their rules, but never their secret values.

Install

pipx install envcontract   # recommended (isolated)
# or
pip install envcontract

Commands

Command What it does
envcontract init Generate a .env.schema from your existing .env (values stripped).
envcontract check Validate your .env against the schema: missing keys, wrong types, failed rules.
envcontract diff Show what your local .env has vs. the schema (catches team drift).
envcontract guard Pre-commit hook that blocks committing real values for secret keys.

Privacy promise

envcontract makes zero network calls and has no telemetry. It reads files on your machine and prints to your terminal. Nothing else. This is enforced by a test that fails if any network socket is opened.

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

envcontract-0.1.0.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

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

envcontract-0.1.0-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

Details for the file envcontract-0.1.0.tar.gz.

File metadata

  • Download URL: envcontract-0.1.0.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.5

File hashes

Hashes for envcontract-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cc5b2f717c49121addcaf860b0d0de3ffd80878fa654b84c2d46cb673157d6b7
MD5 42a5997bfb9269880575cba9edd93c05
BLAKE2b-256 dce563c52176fb43c8330658f335454383b76edbd8fde014c532742899850627

See more details on using hashes here.

File details

Details for the file envcontract-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: envcontract-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.5

File hashes

Hashes for envcontract-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cb0e0ea2e1f81abab0caec70ccdd8b07a4c74d270fd84841ed157b2804079493
MD5 76c89b1a779e325eafa37dabb6e87f4d
BLAKE2b-256 64c6fa07a07a0557b035043bbaa6c03973465235454f7a41e6361ebb74523917

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