Skip to content

pchristensen/env_cleaner

Repository files navigation

EnvSync

Created by Claude Code. Cost $9.56 in credits.

Sync missing environment variables from .env.example to .env for local development.

Usage

# Run interactively (default)
ruby env_sync.rb

# Specify directory
ruby env_sync.rb /path/to/project

# Auto-accept all missing keys
ruby env_sync.rb --auto-accept

# Silent operation for scripts
ruby env_sync.rb --auto-accept --quiet

# Show help
ruby env_sync.rb --help

Options

  • --auto-accept: Accept all missing keys automatically
  • --quiet: Suppress all output
  • --version: Show version information
  • --help: Show help message

The script creates timestamped backups of your .env file before making changes.

Git Hook Integration

To automatically sync environment variables before commits:

# Link the pre-commit hook
ln -s ../../scripts/pre-commit.sh .git/hooks/pre-commit

About

Make sure every key from .env.example exists in .env

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors