
Security News
Re-Enabled GitHub Actions Expose Thousands of Repositories to Mini Shai-Hulud
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.
dotenv-sync
Advanced tools
Keep .env.example in sync with .env and validate environment variables before boot. Detect missing, extra and empty env vars in CI. A zero-dependency dotenv-linter alternative that stops apps crashing on a missing variable.
.env.example in sync with .env — and never boot with a missing variable again.The number one "works on my machine" bug: someone adds STRIPE_KEY to their .env,
forgets to update .env.example, and a teammate's app crashes with a cryptic error.
envsync fixes both sides of that — automatically, with zero dependencies.
Installed from PyPI as
dotenv-sync; it gives you theenvsynccommand (and adotenv-syncalias).
.env.example is the contract every teammate copies. But it drifts the instant someone
adds a variable to their local .env and forgets the template:
cp .env.example .env, run the app → crash, because a required key was
never in the template..env.example by hand and leak into git.uvx dotenv-sync # add new keys from .env to .env.example (values stripped)
uvx dotenv-sync check # CI: fail if the template drifted
uvx dotenv-sync validate # preflight: fail if your local .env is missing required keys
$ uvx dotenv-sync
✔ added 2 key(s) to .env.example:
+ STRIPE_KEY
+ REDIS_URL
$ uvx dotenv-sync validate
✖ missing 1 required key(s) (declared in .env.example):
✖ DATABASE_URL
Your app may crash on boot. Fill these in .env (copy from .env.example).
.env.example (KEY=), and your
curated placeholders/comments are preserved.uvx dotenv-sync # run without installing (uv)
pipx install dotenv-sync # or install the CLI globally
pip install dotenv-sync # or into your project
| Command | What it does |
|---|---|
envsync / envsync sync | Append keys in .env missing from .env.example (values stripped) |
envsync check | CI mode — exit 1 if .env.example is missing keys from .env |
envsync validate | Preflight — exit 1 if your .env is missing keys the template requires |
envsync init | Create .env.example from .env (values stripped) or a starter |
Options: --env <file>, --example <file>, --cwd <dir>, --allow-empty, --process
(also accept keys from the process environment during validate), --quiet.
# .github/workflows/env.yml
name: env
on: [push, pull_request]
jobs:
envsync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
- run: uvx dotenv-sync check # fail if someone forgot to update .env.example
Pre-commit hook:
# .pre-commit-config.yaml
repos:
- repo: local
hooks:
- id: envsync
name: envsync check
entry: envsync check
language: system
pass_filenames: false
Catch missing config before a confusing runtime crash — e.g. in a container entrypoint:
envsync validate && python -m myapp
from envsync import validate
result = validate()
if not result.ok:
raise SystemExit(f"Missing env: {result.missing}")
KEY=VALUE, export KEY=VALUE, single/double-quoted values, # comments, and blank
lines. Unrecognized lines are preserved verbatim, so envsync never mangles your files.
Run uvx dotenv-sync (or pip install dotenv-sync then envsync). It adds any key in
.env that's missing from .env.example, values stripped, preserving your comments. Add
uvx dotenv-sync check to CI so the build fails when the template drifts.
uvx dotenv-sync validate reads the keys declared in .env.example and exits 1 listing
any missing or empty ones in your .env or process environment — a preflight that catches
misconfiguration before a confusing runtime crash.
Never. Only keys are written (KEY=); values are always stripped and existing lines are
preserved.
python-dotenv/pydantic-settings load env vars; dotenv-sync keeps the template
honest and validates it — sync, CI drift-check, and preflight validation, with zero
dependencies. It's the Python twin of the npm envsync package (byte-identical output).
JavaScript project? The same tool ships on npm — npx envsync.
MIT — free for personal and commercial use.
FAQs
Keep .env.example in sync with .env and validate environment variables before boot. Detect missing, extra and empty env vars in CI. A zero-dependency dotenv-linter alternative that stops apps crashing on a missing variable.
We found that dotenv-sync demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.

Research
/Security News
A malicious Firefox extension fetches its payload after installation to evade detection, steal Google session cookies, and automate account takeover.

Research
/Security News
The compromise affects MemTensor's MemOS, an open source memory framework for large language models (LLMs) and AI agents. Both npm package @memtensor/memos-cloud-openclaw-plugin and the PyPI package MemoryOS are compromised. They drop cross-platform Go binaries that exfiltrate developer secrets.