Manage .env files with Git - A simple, secure way to share environment variables across your team.
- No server required - Uses Git as storage backend
- Team-friendly - Share .env files securely via your own Git repository
- Environment isolation - Each environment (dev, staging, prod) is a separate branch
- Multi-project - One repository for all your projects
- Version history - Track changes, diff environments, rollback anytime
- Zero configuration - Works with any Git hosting (GitHub, GitLab, Bitbucket)
npm install -g envmark# Set up global configuration with your secrets repository
envmark init -r git@github.com:your-org/env-secrets.git
# This creates:
# - ~/.envmark/config.json (global config)
# - .envmark.json (project config)# Push to development environment
envmark push dev
# Push to staging
envmark push staging
# Push to production
envmark push prod# Clone a project and pull its .env
git clone your-project
cd your-project
envmark init
envmark pull dev| Command | Description |
|---|---|
envmark init |
Initialize EnvMark configuration |
envmark push [env] |
Push local .env to an environment |
envmark pull [env] |
Pull .env from an environment |
envmark list |
List all environments |
envmark status |
Show current configuration |
envmark diff <env1> <env2> |
Compare .env between environments |
envmark history [env] |
Show version history |
envmark rollback [env] |
Rollback to a previous version |
envmark create <env> |
Create a new environment |
envmark delete <env> |
Delete an environment |
EnvMark uses a simple but powerful architecture:
Your Secrets Repository
├── main (production)
│ ├── project-a/.env
│ ├── project-b/.env
│ └── project-c/.env
├── staging
│ ├── project-a/.env
│ ├── project-b/.env
│ └── project-c/.env
└── development
├── project-a/.env
├── project-b/.env
└── project-c/.env
- Branches = Environments -
mainis production, other branches are dev/staging/etc. - Folders = Projects - Each project has its own folder in each branch
- Git = Version Control - Full history, diffs, and rollback capabilities
{
"remote": "git@github.com:your-org/env-secrets.git",
"defaultEnv": "development",
"encrypt": false
}{
"project": "my-project"
}For convenience, EnvMark supports environment aliases:
| Alias | Branch |
|---|---|
dev |
development |
prod |
main |
production |
main |
# These are equivalent:
envmark pull dev
envmark pull development
envmark push prod
envmark push main- Your repository, your control - EnvMark never touches external servers
- Git access controls - Use SSH keys or tokens to control who can access secrets
- Local caching - Repository is cached in
~/.envmark/repos/for performance - Encryption (coming soon) - Optional AES-256-GCM encryption for .env files
- Use a private repository - Never store secrets in a public repo
- Limit access - Only give repository access to team members who need it
- Use deploy keys - For CI/CD, use read-only deploy keys
- Review diffs - Use
envmark diffbefore pulling to see what changed - Don't commit
.envmark.json- Add it to.gitignoreif it contains sensitive project names
EnvMark is part of a suite of developer tools:
- Backmark - AI-powered backlog management
- Stackmark - Docker environment management
- Shipmark - Release automation
MIT License - See LICENSE for details.
Made with love by Grazulex
