est-vault is a command-line tool for managing application secrets securely
Project description
est-vault
est-vault is a command-line tool for managing application secrets securely. Instead of storing sensitive environment variables in plaintext .env files or hardcoding them in scripts, you keep them in an encrypted vault and let est-vault inject them into any process at runtime — no plaintext ever touches disk during normal operation.
It's designed to be simple: one vault file, one password, any program.
How it works
- Create an encrypted vault containing your
KEY=VALUEsecrets est-vaultdecrypts the file at runtime (prompting for a password or reading from an env var)- The decrypted variables are injected into the child process environment
- Your program runs with access to the secrets — no plaintext files on disk
est-vault prod.env docker-compose -- up -d
Installation
Requires Python 3.9+.
pip install est-vault
Or install from source:
git clone https://github.com/esteveslean/est-vault
cd est-vault
pip install -e .
Usage
Run a program with vault secrets
est-vault <vault-file> <program> [-- program-args...]
# Basic usage
est-vault prod.env python manage.py migrate
# Pass arguments to the program with --
est-vault prod.env docker-compose -- up -d
# Only use vault variables (don't inherit current environment)
est-vault --pristine prod.env python app.py
Commands
| Command | Description |
|---|---|
est-vault <vault> <program> |
Run program with env vars from vault |
est-vault create <file> |
Create a new encrypted vault (opens editor) |
est-vault view <file> |
View decrypted contents in editor (read-only) |
est-vault edit <file> |
Edit an encrypted vault in-place |
est-vault encrypt <file> |
Encrypt a plaintext file in-place |
est-vault decrypt <file> |
Decrypt a vault file to plaintext in-place |
est-vault rekey <file> |
Change the password of a vault |
est-vault version |
Print version |
Quickstart
1. Create a vault
est-vault create prod.env
This opens your editor. Write your secrets in plain KEY=VALUE format:
DB_HOST=db.example.com
DB_PORT=5432
DB_PASSWORD=super_secret
API_KEY=abc123
Save and close — the file is encrypted automatically.
2. Use the vault
est-vault prod.env docker-compose -- up -d
3. View or edit later
# Read-only view
est-vault view prod.env
# Edit and re-encrypt
est-vault edit prod.env
4. Rotate the password
est-vault rekey prod.env
Non-interactive usage (CI/CD)
Set the ENV_VAULT_PASSWORD environment variable to skip the password prompt:
export ENV_VAULT_PASSWORD="my-vault-password"
est-vault prod.env ./deploy.sh
Note:
ENV_VAULT_PASSWORDis intentionally ignored when creating a new password (i.e.,create,encrypt,rekey) to prevent accidentally reusing an exposed variable as a new secret.
Editor
The editor is selected in the following order:
ENV_VAULT_EDITORenvironment variableEDITORenvironment variablenotepadon Windows /vimon Unix
ENV_VAULT_EDITOR=nano est-vault create prod.env
Docker Compose
A common use case is injecting secrets into Docker Compose without committing a .env file:
# Create the vault
est-vault create prod.env
# Start services with secrets from vault
est-vault prod.env docker-compose -- up -d
Warning: Do not name your vault
.env. Docker Compose reads that filename automatically for variable interpolation, and will fail to parse the encrypted content.
Development
# Install with dev dependencies
pip install -e ".[dev]"
# Run tests
python -m pytest tests/ -v
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file est_vault-1.0.0.tar.gz.
File metadata
- Download URL: est_vault-1.0.0.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a19ac9cc347156e098ac7f5e700a4f7ce8a10d8e85789e53189365a57f1f6467
|
|
| MD5 |
246a6d96e1b666e6a2ad2239982d1caf
|
|
| BLAKE2b-256 |
2b5ce932b7ee64befb003dced3567661f6b61bf2853ce6b699feb97297c0c913
|
File details
Details for the file est_vault-1.0.0-py3-none-any.whl.
File metadata
- Download URL: est_vault-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58b00e0d39bd7918bb1e176895cd518f09834f3fc8ebaaca5bdbd63ded8b177b
|
|
| MD5 |
6489b16ecb1a0eccecc79a6438aa4fff
|
|
| BLAKE2b-256 |
c390624a0e2af1eaa7375d8168784fe4ded46d140a534a784b154878380fce87
|