MCPcopy Index your code
hub / github.com/dotenv-org/dotenv-vault

github.com/dotenv-org/dotenv-vault @v1.27.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.27.0 ↗ · + Follow
259 symbols 477 edges 43 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

dotenv-vault is a cli to sync .env files across machines, environments, and team members.

NPM Version

 

[!NOTE] dotenv-vault is a paid only cloud service for syncing your .env files (as of May 2025).

Looking for a free cloud-less alternative? See my new product dotenvx – that lets you: - encrypt your .env files - commit them to code - and securely sync them over git

🌱 Install

It works with a single command. Run npx dotenv-vault@latest push.

npx dotenv-vault@latest push
remote:   Securely pushing (.env)... done
remote:   Securely pushed development (.env)
remote:   Securely built vault (.env.vault)

That's it. You securely synced your .env file. Next, tell your teammate to run npx dotenv-vault@latest pull

npx dotenv-vault@latest pull

Nice!

See further usage and commands.


Other Ways to Install

Don't want to use npx? Install a number of other ways.

apple icon Install via Homebrew

$ brew install dotenv-org/brew/dotenv-vault
$ dotenv-vault help

windows icon Install on Windows

docker icon Install and run commands via Docker

$ docker run -w $(pwd) -v $(pwd):$(pwd) -it dotenv/dotenv-vault help

Learn more about installation

🏗️ Usage

When you make a change to your .env file, push it up.

$ npx dotenv-vault@latest push

Commit your .env.vault file safely to code.

$ git add .env.vault
$ git commit -am "Add .env.vault"
$ git push

Now your teammate can pull the latest .env changes.

$ git pull
$ npx dotenv-vault@latest pull

That's it!

Learn more about usage

🚀 Deploying

Stop scattering your production secrets across multiple third-parties and tools. Instead, use an encrypted .env.vault file.

Generate your encrypted .env.vault file.

$ npx dotenv-vault@latest build

Fetch your production DOTENV_KEY.

$ npx dotenv-vault@latest keys production
remote:   Listing .env.vault decryption keys... done
dotenv://:key_1234…@dotenv.org/vault/.env.vault?environment=production

Set DOTENV_KEY on your server.

# heroku example
heroku config:set DOTENV_KEY=dotenv://:key_1234…@dotenv.org/vault/.env.vault?environment=production

Commit your .env.vault file safely to code and deploy.

$ git add .env.vault
$ git commit -am "Update .env.vault"
$ git push
$ git push heroku main # heroku example

That's it! On deploy, your .env.vault file will be decrypted and its secrets injected as environment variables – just in time.

Learn more about deploying

🌴 Manage Multiple Environments

After you've pushed your .env file, dotenv-vault automatically sets up multiple environments. Manage multiple environments with the included UI. learn more

$ npx dotenv-vault@latest open production

That's it! Manage your ci, staging, and production secrets from there.

Would you also like to pull your production .env to your machine? Run the command:

$ npx dotenv-vault@latest pull production

Learn more about environments

📚 Examples

Vercel Vercel Heroku Heroku GitHub GitHub Actions GitLab GitLab CI/CD
Netlify Netlify Docker Docker Docker Compose Docker Compose CircleCI CircleCI
Serverless Serverless Railway Railway Render Render Travis CI Travis CI
Google Cloud Google Cloud Fly.io Fly.io dotenv-vault + Slack Slack Buddy Buddy
Cloud66 Cloud66 Digital Ocean Digital Ocean Dagger Dagger Bitbucket Bitbucket
Node.js Node.js Express Express NextJS NextJS
Remix Remix Astro Astro Rails Rails Ruby Ruby
Sinatra Sinatra Flask Flask Python Python Supabase Supabase
Pulumi Pulumi Angular Angular Nuxt Nuxt Vite Vite

See more integration guides

📖 Commands

$ npx dotenv-vault@latest help

new

Create your project at Dotenv Vault.

Example:

$ npx dotenv-vault@latest new
ARGUMENTS

[DOTENV_VAULT]

Set .env.vault identifier. Defaults to generated value.

$ npx dotenv-vault@latest new vlt_6beaae5…
local:    Adding .env.vault (DOTENV_VAULT)... done
local:    Added to .env.vault (DOTENV_VAULT=vlt_6beaa...)
FLAGS

-y, --yes

Automatic yes to prompts. Assume yes to all prompts and run non-interactively.


login

Log in to

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Method 175
Class 68
Interface 16

Languages

TypeScript100%

Modules by API surface

src/vars.ts24 symbols
src/services/abort-service.ts20 symbols
src/services/push-service.ts12 symbols
src/services/login-service.ts12 symbols
src/services/append-to-vercelignore-service.ts12 symbols
src/services/append-to-npmignore-service.ts12 symbols
src/services/append-to-gitignore-service.ts12 symbols
src/services/append-to-dockerignore-service.ts12 symbols
src/services/new-service.ts11 symbols
src/services/pull-service.ts10 symbols
src/services/log-service.ts10 symbols
src/services/versions-service.ts9 symbols

For agents

$ claude mcp add dotenv-vault \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page