New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

env-sync

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

env-sync

dotenv checker and sync

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

Dot Environment Sync

Check different of 2 dotenv file and sync it

Install

npm install --save env-sync

Usage:

CLI

./node_modules/.bin/env-sync.js .env .env.default

DOCKER

docker run --rm -v $(pwd):$(pwd) kenylieou/env-sync /path/to/.env /path/to/.env.sample

example:

docker run --rm -v $(pwd):$(pwd) kenylieou/env-sync $(pwd)/.env $(pwd)/.env.default -v

CLI Options

Usage: env-sync [options] <file1> <file2>

file1: is file need to check
file2: is file use to compare

Options:
  -V, --version  output the version number
  -s, --sync     Sync the missing environment key and write to file1
  -v, --verbose  Display verbose
  -h, --help     output usage information

This is in .env.default

VAR1=1
VAR2=true
VAR3=false
VAR4=0
VAR5="hello world"

This is in .env

VAR1=
VAR2=1
VAR3=false

After run env-sync

VAR1=1
VAR2=1
VAR3=false
VAR4=0
VAR5="hello world"

Keywords

dotenv

FAQs

Package last updated on 30 Nov 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts