Skip to main content

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

  1. env-sync init creates .env-sync/ with encrypted storage
  2. All variables are encrypted at rest using AES-256-GCM
  3. Encryption key derived from password + salt via PBKDF2 (600k iterations)
  4. Secret keys are auto-detected by name patterns (password, token, key, etc.)
  5. Share creates an encrypted bundle — safe to commit or transfer
  6. 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 secrets module
  • 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)

Source distribution for dotlocker 0.1.0
File Size Uploaded
dotlocker-0.1.0.tar.gz 17.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dotlocker 0.1.0
File Interpreter ABI Platform
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}

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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