Skip to content

The worldwide standard for securing environment variables

License

Notifications You must be signed in to change notification settings

HankThePidgeon/dotenv-vault

 
 

Repository files navigation

From the same people that pioneered dotenv.

dotenv-vault

dotenv-vault

Dotenv Vault securely syncs secrets and app configuration across your machines, environments, and team members. Stop sharing .env files over insecure channels like Slack and email.

Learn more at dotenv.org.

oclif Version Downloads/week License

Usage

Usage is easy! Run the command:

$ npx dotenv-vault new

Follow those instructions and then run:

$ npx dotenv-vault push

And if you need to pull changes that another teammate made, run:

$ npx dotenv-vault pull

That's it!

Read our security statement.

Commands

dotenv-vault new

Create your project at Dotenv Vault.

Example:

$ dotenv-vault new

dotenv-vault push [FILENAME]

Push your .env file securely to Dotenv Vault

Example:

$ dotenv-vault push
# pushes local .env to remote development

Arguments

[FILENAME]

Set input filename. Defaults to .env.

Example:

$ dotenv-vault push .env.development
# pushes .env.development to remote development environment

⚠️ The push command ONLY pushes to development currently. It is not like the pull command that can pull from different environments. For example, if you run $ npx dotenv-vault push .env.production that will actually push your local .env.production file to development. (Check back soon for push support that can push to any environment.)

Options

--dotenvMe

Directly pass your DOTENV_ME value to the command line, instead of reading from a .env.me file.

Examples:

$ dotenv-vault push .env.development --dotenvMe=me_1234
# pushes local .env.development to remote development

dotenv-vault pull [ENVIRONMENT] [FILENAME]

Pulls your development|staging|ci|production environment(s) to your machine.

Example:

$ dotenv-vault pull
# pulls remote development envs to .env

Arguments

[ENVIRONMENT]

Pull .env.ci, .env.staging, and .env.production

Example:

$ dotenv-vault pull staging
# pulls remote staging envs to .env.staging
[FILENAME]

Set output filename. Defaults to .env for development and .env.{environment} for other environments

Example:

$ dotenv-vault pull production .env
# pulls remote production envs to .env

Options

--dotenvMe

Directly pass your DOTENV_ME value to the command line, instead of reading from a .env.me file.

Examples:

$ dotenv-vault pull staging --dotenvMe=me_1234
# pulls remote staging envs to .env.staging

$ dotenv-vault pull production .env --dotenvMe=me_1234
# pulls remote production envs to .env

dotenv-vault help [COMMAND]

Display help for dotenv-vault commands.

USAGE
  $ dotenv-vault help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

Example:

$ dotenv-vault help push

Development

NODE_TLS_REJECT_UNAUTHORIZED=0 DOTENV_API_URL=https://vault.dotenv.development ./bin/dev

Testing

npm test

Publishing

Only for those with permission.

npm version patch
npm publish

Contributing Guide

See CONTRIBUTING.md

CHANGELOG

See CHANGELOG.md

About

The worldwide standard for securing environment variables

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 94.4%
  • JavaScript 5.3%
  • Batchfile 0.3%