env-sync
CLI tool for managing and syncing .env files across machines and team members. Encrypts secrets locally, syncs via git or file transfer, diffs between environments, and auto-rotates secrets.
Install
pip install env-sync
Quick Start
# Initialize in your project
env-sync init
# Add variables (auto-detects and encrypts secrets)
env-sync add DATABASE_URL=postgresql://user:pass@host/db
env-sync add NODE_ENV=development
env-sync add API_KEY=sk-abc123def456
# List all variables (secrets masked)
env-sync list
# Get a specific value
env-sync get API_KEY
# Import from existing .env
env-sync import .env
# Export to .env file
env-sync export
# Compare environments
env-sync diff staging prod
# Rotate a secret
env-sync rotate API_KEY
# Share encrypted bundle with team
env-sync share
# Check for secrets in git-staged files
env-sync ci
# Install as pre-commit hook
env-sync ci --install
How It Works
env-sync initcreates.env-sync/with encrypted storage- All variables are encrypted at rest using AES-256-GCM
- Encryption key derived from password + salt via PBKDF2 (600k iterations)
- Secret keys are auto-detected by name patterns (password, token, key, etc.)
- Share creates an encrypted bundle — safe to commit or transfer
- Audit log tracks all access
Security
- AES-256-GCM encryption for all stored secrets
- PBKDF2 key derivation with 600k iterations
- Cryptographically secure random values via
secretsmodule - Secret values are never logged or displayed unmasked
- Pre-commit hook prevents secrets from being committed to git
Secret Detection Patterns
- AWS Access Keys (
AKIA...) - API keys and secrets
- Bearer tokens
- Passwords
- Private keys (RSA, EC, OpenSSH)
- Database connection strings
- Webhook URLs
- JWT tokens
License
MIT © Hiren Thakore
Metadata
Release files for dotlocker 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dotlocker-0.1.0.tar.gz | 17.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dotlocker-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 34.8 kB
Release files / dotlocker-0.1.0.tar.gz
| Download URL | dotlocker-0.1.0.tar.gz |
|---|---|
| Size | 17.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
220612d55320d39b6eadecb08c15611a3789dbc9a7b2fdfd67620d8ec7eea06a
|
|
BLAKE2b-256 checksum How to use checksums |
ffc2fadf150da14aec7877fada2f5461246bd5c8f38cb19a994ed72c73c93136
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / dotlocker-0.1.0-py3-none-any.whl
| Download URL | dotlocker-0.1.0-py3-none-any.whl |
|---|---|
| Size | 17.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
34ff651e55ee5997c0a65e95cced09ff390d23f1bd614e1dce57b85e2c82799a
|
|
BLAKE2b-256 checksum How to use checksums |
8a4c5560e79e47b378617da5f450d3403eb382c400bba2d032ab7bb5e6d9e86a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|