Hierarchical environment management with secure vault storage.
- You work on many projects, with different teams, many repos.
- You need a personal workspace, which is attached to the project, but does not become part of its official repository (e.g. patched docker-compose.yml, bespoke Java test classes, etc.)
- environment configurations are not DRY, they share variables, often follow even a hierarchy (globlal -> company -> region -> stage)
Solution:
- File/directory overrides: when work starts swap workspace data in, when finished replace with originals, keep your personal data separate (vault)
- Model environment variable configs as trees and keep it DRY
Benefit:
- Personal project specific workspace (can have its own repo)
- Minimal footprint in original project: one symlink to link the project and workspace (.envrc)
This is a complete rewrite of V1 with 100% functional compatibility and new features.
- Hierarchical env files - Link files with
# rsenv: parent.env, children override parents - Vault storage - Move sensitive files outside your project, replaced by symlinks
- File swapping - Swap files with personal versions for the duration of the work-session
- SOPS encryption - Encrypt sensitive files in the vault with GPG or Age
- Shell integration - Works seamlessly with [direnv9(https://direnv.net/)
cargo install rsenv
rsenv init vault # Create vault for project
rsenv guard add .env # Move .env to vault, create symlink
rsenv env tree # View environment hierarchy
rsenv env select # Interactive environment selection| Command | Purpose |
|---|---|
init |
Initialize vault for project |
env |
Manage environment hierarchy |
guard |
Protect sensitive files |
swap |
Toggle dev/prod configs |
sops |
Encrypt/decrypt vault |
config |
Manage settings |
info |
Show project status |
Getting Started: Installation · Quick Start · Core Concepts
Features: Environment Variables · Vault Management · File Swapping · SOPS Encryption
Reference: Commands · Configuration · Troubleshooting · Migration Guide
BSD-3-Clause

