getenv
npmv2.0.0Get and typecast environment variables.
Overview
getenv is an npm package that get and typecast environment variables. It is extremely widely used, with about 8.7M downloads per week and 5 known dependents in the graph. The latest version is 2.0.0, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need get and typecast environment variables and value a battle-tested, widely-adopted solution.
When not to use it
Consider an alternative if you need to have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.
Pros
- Large, well-established user base (8.7M weekly downloads).
- Clear open-source license (MIT).
- Lean dependency tree (1 direct dependencies).
Cons
- No bundled TypeScript types (may require a separate @types package).
Auto-generated from collected registry metadata. No external claims are inferred.
Relationship graph
Dependencies (left) and dependents (right) of getenv.
Dependencies
Dev (1)
Used by
Popular packages that depend on getenv.
A library for interacting with the app.json
hydrate environment variables from .env files into process.env
A package used by Expo CLI for processing images
A Metro config for running React Native projects with the Metro bundler
The Expo CLI
A library to generate a fingerprint from a React Native project
A library for Expo config plugins
Alternatives to getenv
Strip comments from JSON. Lets you use comments in your JSON files!
Get paths for storing things like data, config, cache, etc
Check if the process is running inside a container (Docker/Podman)
Fast (and loose) selective `process.env` replacer using js-tokens instead of an AST
Get the PATH environment variable key cross-platform
Check if the process is running inside a Docker container
Offers getProxyForUrl to get the proxy URL for a URL, respecting the *_PROXY (e.g. HTTP_PROXY) and NO_PROXY environment variables.
TypeScript execution environment and REPL for node.js, with source map support
test for inclusion or exclusion of paths using globs
Metro configuration for React Native.
General purpose glob-based configuration matching.
Frequently installed together
The semantic version parser used by npm.
Lightweight debugging utility for Node.js and the browser
the most correct and second fastest glob implementation in JavaScript
The Expo SDK
Reusable require and Node resolution utilities library for Expo
A module for reading, writing, and manipulating JSON files
A Promise-based interface into processes created by child_process.spawn
Resolve the path of a module like `require.resolve()` but from a given path
hydrate environment variables from .env files into process.env
Slugifies a String
Mac OS X Plist parser/builder for Node.js and browsers
A library for interacting with the app.json
Version history
| Version | Published | License |
|---|---|---|
| 2.0.0latest | 1 year ago | MIT |
| 1.0.0 | 6 years ago | MIT |
| 0.7.0 | 9 years ago | MIT |
| 0.6.0 | 10 years ago | MIT |
| 0.5.0 | 11 years ago | MIT |
| 0.4.0 | 11 years ago | MIT |
| 0.3.0 | 14 years ago | MIT |
| 0.2.0 | 14 years ago | MIT |
| 0.1.0 | 14 years ago | MIT |
Maintainers
Frequently asked questions
How do I install getenv?
Run `npm install getenv` to add getenv to your npm project.
What license is getenv released under?
getenv is distributed under the MIT license.
How popular is getenv?
getenv has approximately 8,730,798 downloads per week and 5 known dependent packages.