Skip to main content

env-diff

Compare two .env files and see what changed — ignoring order and comments.

Install

# From source
pip install -e .

# Or run directly
python3 env-diff file1.env file2.env

Usage

# Basic comparison
env-diff .env.example .env

# Disable colors (for piping)
env-diff .env.example .env --no-color

# Quiet mode (exit code only, for CI/CD)
env-diff .env.example .env --quiet
echo $?   # 0 = identical, 1 = differences found

Output

  • Red -: Keys only in file1 (removed)
  • Green +: Keys only in file2 (added)
  • Yellow ~: Keys in both files with different values (changed)

Example:

- REDIS_URL  (only in .env.example)
+ DEBUG  (only in .env)
~ DATABASE_URL: postgres://prod/db -> postgres://localhost/db

1 removed, 1 added, 1 changed total

Features

  • Compares by key name, ignores line order
  • Skips # comments and blank lines
  • Handles export KEY=VALUE prefix
  • Strips surrounding quotes from values
  • Color-coded output (disable with --no-color)
  • Exit code 0/1 for CI/CD pipelines
  • Zero dependencies — pure Python 3.11+ stdlib

Running tests

PYTHONPATH=src python3 -m unittest tests.test_env_diff -v

License

MIT

Metadata

Release files for shipstack-envdiff 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for shipstack-envdiff 0.1.0
File Size Uploaded Provenance
shipstack_envdiff-0.1.0.tar.gz 29.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for shipstack-envdiff 0.1.0
File Interpreter ABI Platform
shipstack_envdiff-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 34.3 kB

Release files / shipstack_envdiff-0.1.0.tar.gz

Download URL shipstack_envdiff-0.1.0.tar.gz
Size 29.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e3cf36d39786c3cf05cf28a8bedc0028ec3ae155f0568504fff1c15048431c2e
BLAKE2b-256 checksum
How to use checksums
3ac1c3c8d92f6c7382014f1cdfce0acc085996719ec64c2a8e6fa2001985dbbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / shipstack_envdiff-0.1.0-py3-none-any.whl

Download URL shipstack_envdiff-0.1.0-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f4f5e9add303d918a2dc7d0b883dbe0f75522aade8cb56e1c281354d0415b079
BLAKE2b-256 checksum
How to use checksums
a51fef53fc7885c86b85b0f34fdf12fb0d8f093ef8de85f0464cde74e2542bc1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Security for shipstack-envdiff 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page