@dotenv/cli v2.2.2
@dotenv/cli
Dotenv cli is a command line tool that syncs your .env files across machines and between your team members. It's like 1Password, but for developers. Designed by the same people that brought you dotenv, it's a recommended plugin for dotenv.
Install
# install globally (recommended)
npm install @dotenv/cli -g # optionally run with sudo npm install @dotenv/cli -gor
# install locally
npm install @dotenv/cli --save-devUsage
Usage is easy! Run the command:
dotenv-cli newFollow those instructions and then run:
dotenv-cli pushAnd if you need to pull changes that another teammate made, run:
dotenv-cli pullThat's it!
Commands
dotenv-cli help [COMMAND]
display help for dotenv-cli
USAGE
$ dotenv-cli help [COMMAND]
ARGUMENTS
COMMAND command to show help for
OPTIONS
--all see all commands in CLIdotenv-cli new
Create your .env.project file.
Example:
$ dotenv-cli newdotenv-cli push [FILENAME]
Push your .env file to development environment.
Example:
$ dotenv-cli push
# pushes local .env to remote developmentArguments
FILENAME
Set input filename. Defaults to .env.
Example:
$ dotenv-cli push .env.development
# pushes .env.development to remote development environmentOptions
--dotenv_me
Directly pass your DOTENV_ME value to the command line, instead of reading from a .env.me file.
Examples:
$ dotenv-cli push .env.development --dotenv_me=me_1234
# pushes local .env.development to remote developmentdotenv-cli pull [ENVIRONMENT] [FILENAME]
Pulls your development|staging|ci|production environment(s) to your machine.
Example:
$ dotenv-cli pull
# pulls remote development envs to .envFor more information run..
$ dotenv-cli help pullArguments
ENVIRONMENT
Pull .env.ci, .env.staging, and .env.production
Example:
$ dotenv-cli pull staging
# pulls remote staging envs to .env.stagingFILENAME
Set output filename. Defaults to .env for development and .env.{environment} for other environments
Example:
$ dotenv-cli pull production .env
# pulls remote production envs to .envOptions
--dotenv_me
Directly pass your DOTENV_ME value to the command line, instead of reading from a .env.me file.
Examples:
$ dotenv-cli pull staging --dotenv_me=me_1234
# pulls remote staging envs to .env.staging
$ dotenv-cli pull production .env --dotenv_me=me_1234
# pulls remote production envs to .envDevelopment
NODE_TLS_REJECT_UNAUTHORIZED=0 DOTENV_API_URL=https://cli.dotenv.development ./bin/runTesting
yarn testPublishing
Only for those with permission.
npm publishContributing Guide
See CONTRIBUTING.md
CHANGELOG
See CHANGELOG.md
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago