@sanki92/envsync
v0.1.3
Published
Encrypted .env sync for dev teams using GitHub SSH keys and git
Downloads
383
Maintainers
Readme
@sanki92/envsync
Use envsync without installing Go manually. The npm package installs a small wrapper that downloads the right envsync binary from GitHub Releases on first run and then executes it locally.
The binary is cached in ~/.envsync/bin.
Install
Run once without installing globally:
npx @sanki92/envsync initInstall globally:
npm install -g @sanki92/envsync
envsync --helpThe package name is @sanki92/envsync, but the installed command is envsync.
What it does
envsync keeps encrypted .env files in git for a team.
envsync lockencrypts.env.localinto.env.vaultenvsync unlockdecrypts.env.vaultinto.env.localenvsync initsets up a repo for envsyncenvsync joinprints the age public key a teammate shares with the repo adminenvsync addandenvsync removemanage team access
Each value is encrypted separately with age. Team access is based on GitHub SSH public keys.
Quick start
Initialize a repo:
envsync init
git add .env.vault .envteam .gitignore
git commit -m "chore: init envsync"
git pushJoin an existing team:
envsync joinAfter the admin adds your printed age public key to the team, pull and decrypt:
git pull
envsync unlockSupported platforms
- Linux amd64
- Linux arm64
- macOS amd64
- macOS arm64
- Windows amd64
- Windows arm64
Requirements
- A GitHub repo for your project
- Git installed locally
- A GitHub SSH key on each developer machine
Notes
- The first run downloads the matching binary from the GitHub release for this package version
- Nothing is sent to any envsync server because there is no envsync server
- If you prefer, you can install from source with
go install github.com/sanki92/envsync@latest
Links
- Source: https://github.com/sanki92/envsync
- Releases: https://github.com/sanki92/envsync/releases
