Installation
Multiple ways to install EnvMark.
Global Installation (Recommended)
Install globally to use envmark command anywhere:
npm
$ npm install -g @grazulex/envmark
yarn
$ yarn global add @grazulex/envmark
pnpm
$ pnpm add -g @grazulex/envmark
Run Without Installing
Use npx to run without global installation:
$ npx @grazulex/envmark pull dev
Verify Installation
$ envmark --version
1.2.1
$ envmark --help
EnvMark - Manage .env files with Git
──────────────────────────────────────────────────
Usage: envmark [options] [command]
Manage .env files using Git as storage backend
Options:
-V, --version output the version number
-h, --help display help for command
Commands:
init Initialize EnvMark configuration
push [env] Push local .env file to the repository
pull [env] Pull .env file from the repository
create <env> Create a new environment (branch)
list|ls List all environments
status Show current EnvMark configuration
diff <e1> <e2> Compare .env files between environments
history [env] Show version history of .env file
delete|rm Delete an environment or project .env
rollback [env] Rollback .env to a previous version
keygen Generate or manage encryption keys
Requirements
- Node.js 18+ - Required runtime
- Git - For repository operations
- SSH key or HTTPS credentials - For Git authentication
Setting Up the Secrets Repository
Before using EnvMark, you need a Git repository to store your .env files. This can be:
- A private GitHub repository (recommended)
- A private GitLab repository
- A Bitbucket repository
- A self-hosted Git server
Create a new repository
# On GitHub, create a new private repository named 'envmark-secrets'
# Then use this URL during envmark init:
$ envmark init -r git@github.com:yourteam/envmark-secrets.git
Tip: Use branch protection rules on main (production) to require pull request reviews before changes can be merged.