10 Best JavaScript Environment Variables Libraries

List hand-picked by Openbase Experts
Learn More

dot

dotenv

Loads environment variables from .env for nodejs projects.

License Icon
License: BSD-2-Clause
TypeScript Icon
TypeScript Definitions: Built-In
User Rating
4.9/ 5
100
Top Feedback
54Easy to Use
41Great Documentation
26Performant
GitHub Stars
15K
Weekly Downloads
23M
Last Commit
8mos ago
dw

dotenv-webpack

A secure webpack plugin that supports dotenv and other environment variables and only exposes what you choose and use.

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User Rating
4.8/ 5
5
Top Feedback
4Great Documentation
3Easy to Use
3Performant
GitHub Stars
1K
Weekly Downloads
3M
Last Commit
4mos ago
env

envalid

Environment variable validation for Node.js

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Built-In
User Rating
5.0/ 5
1
Top Feedback
1Great Documentation
1Easy to Use
GitHub Stars
775
Weekly Downloads
76K
Last Commit
1mo ago
nco

nconf

Hierarchical node.js configuration with files, environment variables, command-line arguments, and atomic object merging.

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User Rating
4.0/ 5
1
Top Feedback
2Great Documentation
2Easy to Use
1Performant
GitHub Stars
4K
Weekly Downloads
812K
Last Commit
3mos ago
ce

cross-env

🔀 Cross platform setting of environment scripts

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User Rating
4.9/ 5
8
Top Feedback
4Easy to Use
2Great Documentation
1Abandoned
GitHub Stars
6K
Weekly Downloads
5M
Last Commit
1yr ago
ec

env-cmd

Setting environment variables from a file

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Built-In
User Rating
5.0/ 5
5
Top Feedback
3Easy to Use
2Performant
1Highly Customizable
GitHub Stars
1K
Weekly Downloads
511K
Last Commit
2yrs ago
ds

dotenv-safe

Load environment variables from .env and ensure they are all present

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User Rating
5.0/ 5
1
Top Feedback
2Easy to Use
1Great Documentation
1Performant
GitHub Stars
706
Weekly Downloads
108K
Last Commit
2yrs ago

jest-environment-node

Delightful JavaScript Testing.

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Built-In
User RatingN/A
Top Feedback
N/A
GitHub Stars
37K
Weekly Downloads
15M
Last Commit
1mo ago
cog

cogenv

Cogenv is a module that loads environment variables from an .env file into cog.env or process.env

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User Rating
5.0/ 5
1
Top Feedback
1Great Documentation
GitHub Stars
3
Weekly Downloads
2
Last Commit
2yrs ago
ev

env-var

Verification, sanitization, and type coercion for environment variables in Node.js

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: Built-In
User RatingN/A
Top Feedback
N/A
GitHub Stars
284
Weekly Downloads
90K
Last Commit
3mos ago
env

envify

🔧 Selectively replace Node-style environment variables with plain strings.

License Icon
License: MIT
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
873
Weekly Downloads
462K
Last Commit
5yrs ago
nef

node-env-file

Parse and load environment files (containing ENV variable exports) into Node.js environment, i.e. `process.env`.

License Icon
License: Unknown
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
119
Weekly Downloads
25K
Last Commit
6yrs ago

env2

💻 Simple environment variable (from config file) loader for your node.js app

License Icon
License: GPL-2.0
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
99
Weekly Downloads
3K
Last Commit
4yrs ago
hc

heroku-config

[Utility] Push and pull heroku environment variables to your local env

License Icon
License: ISC
TypeScript Icon
TypeScript Definitions: DefinitelyTyped
User RatingN/A
Top Feedback
N/A
GitHub Stars
221
Weekly Downloads
132
Last Commit
2yrs ago