Quick Start

Get up and running with EnvMark in under 5 minutes.

Prerequisites

Before you begin, make sure you have:

  • Node.js 18+ installed
  • Git installed and configured
  • A Git repository for storing secrets (can be created during init)

Step 1: Install EnvMark

Install EnvMark globally using npm:

terminal
$ npm install -g @grazulex/envmark

Or use npx to run without installing:

terminal
$ npx @grazulex/envmark init

Step 2: Initialize EnvMark

Run the init command in your project directory:

terminal
$ cd my-project
$ envmark init
📦 EnvMark Initialization
──────────────────────────────────────
? Git remote URL for secrets repository: git@github.com:myteam/envmark-secrets.git
? Default environment: development
? Enable encryption for .env files? No
Repository accessible (3 environment(s) found)
Global configuration saved
? Project name: my-project
Project configuration saved
✔ EnvMark initialized successfully!

This creates two configuration files:

  • ~/.envmark/config.json - Global configuration (remote, default env, encryption)
  • .envmark.json - Project-specific configuration (project name)

Step 3: Pull Your .env File

Retrieve the .env file for your environment:

terminal
$ envmark pull dev
📦 Pull from development
──────────────────────────────────────
Project: my-project
Environment: dev (branch: development)
Remote: git@github.com:myteam/envmark-secrets.git
Syncing repository...
Fetched .env file
📄 .env pulled from development
Saved to: .env
Lines: 24

Step 4: Make Changes and Push

After editing your .env file, push the changes back:

terminal
$ envmark push dev
📦 Push to development
──────────────────────────────────────
Project: my-project
Environment: dev (branch: development)
Encryption: disabled
Pushed successfully
📄 .env pushed to development
File: my-project/.env
Commit: Update my-project .env [2025-01-15 14:30:00]

Daily Workflow

Your typical workflow
# Start of day - get latest .env
$ envmark pull dev
# ... work on your project ...
# End of day - push your changes
$ envmark push dev
# Compare dev vs prod before deployment
$ envmark diff dev prod
# Deploy to production - get prod .env
$ envmark pull prod

What's Next?