Skip to main content

A library to manage encrypted .env files with Git as a single source of truth

Project description

gitenvy

🔐 Manage encrypted .env files with Git as the single source of truth.

gitenvy helps teams and individuals securely version-control their environment files.
It encrypts .env files before committing them, so sensitive secrets never appear in plaintext inside Git.


✨ Features

  • 🔒 Secure by default — uses Fernet encryption
  • 📂 Git-backed storage — treat your Git repo as the source of truth for .env versions
  • 📈 Versioned environments — each push creates a new version for rollback and audit
  • 👥 Team-ready — share encrypted .env files with teammates
  • 💻 Simple CLI — intuitive commands for init, push, pull, and list

📦 Installation

Install via pip directly from GitHub:

pip install git+https://github.com/swapnilravi10/gitenvy.git

(Coming soon to PyPI: pip install gitenvy)

🚀 Quick Start

  1. Initialize gitenvy with your storage repo
gitenvy init --repo git@github.com:your-org/your-storage-repo.git
  1. Push a .env file securely
gitenvy push --project sales --env prod
  1. Pull and decrypt a version
gitenvy pull --project sales --env prod --version latest --out .env
  1. List available versions
gitenvy list --project sales --env prod

🔑 Encryption Key Management

  • On first use, gitenvy generates a Fernet key and stores it locally (~/.gitenvy/key).

  • To collaborate, share the key with your team securely (1Password, Vault, etc).

  • Everyone using the same key can encrypt/decrypt .env files.

🛠 Development

Clone the repo:

git clone https://github.com/swapnilravi10/gitenvy.git
cd gitenvy
poetry install

Run the CLI locally:

poetry run gitenvy --help

📜 License

This project is licensed under the MIT License.


🙌 Contributing

Contributions, issues, and feature requests are welcome!
Feel free to check out the issues page to get started. Before contributing, please read our Code of Conduct.

Thank you for helping improve Gitenvy! 💜

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gitenvy-0.1.1.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gitenvy-0.1.1-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file gitenvy-0.1.1.tar.gz.

File metadata

  • Download URL: gitenvy-0.1.1.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.13.7 Windows/11

File hashes

Hashes for gitenvy-0.1.1.tar.gz
Algorithm Hash digest
SHA256 94a9a9d579b8dc94861f3c8f0eb86bddb1866efd0cad5ac3bc2cff6f690fa9b1
MD5 3894e3069bb2129e2e0c34fbb63f64b0
BLAKE2b-256 0335125a80d7adf2218cab44aebd2b764a4bca00b46cc54ff3c0e011d551e979

See more details on using hashes here.

File details

Details for the file gitenvy-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: gitenvy-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.13.7 Windows/11

File hashes

Hashes for gitenvy-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e58992049efef8fd8362d974448574f22ff59d7ad91d7b544955e374dc763839
MD5 e953ec8141e639fe40a9ab48de176670
BLAKE2b-256 2f06eee9f952417a2f7b499cc9d59f160665fe7df2234d041c01f24eefc02940

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page