env-scripts

1.1.0 • Public • Published

Commands

npx env-scripts diff <source-env-relative-path> <destination-env-relative-path>

Compares environment variables defined in both env files, and reports any variables missing in either.

Example:

Given

# .env.example

TEST_VAR_1=AAA
TEST_VAR_2=BBB
# .env

TEST_VAR_1=AAA
TEST_VAR_3=CCC

running

npx env-scripts diff .env.example .env:

will result in

Missing:
TEST_VAR_2

Extra:
TEST_VAR_3

Where "Missing" represents variables defined in .env.example but that are not found in .env, and "Extra" represents the inverse.

npx env-scripts sort <env-file-relative-path>

Reads the env file and writes to a new file named <env-file>-sorted

Example: npx env-scripts sort .env -> writes to a file named .env-sorted

npx env-scripts diff-values <env-1> <env-2>

Compares value equality between two env files

Package Sidebar

Install

npm i env-scripts

Weekly Downloads

1

Version

1.1.0

License

Apache-2.0

Unpacked Size

31.2 kB

Total Files

15

Last publish

Collaborators

  • e-e