env-paths
npmv4.0.0TypeScriptGet paths for storing things like data, config, cache, etc
Safe to adopt
Yes — env-paths scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 228 days ago.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- BMaintenance: grade B, Good.
Last published 228 days ago.
- AWeight: grade A, Excellent.
Pulls in 1 transitive package, about 14 KB installed.
- BSupply chain: grade B, Good.
This package has a single maintainer (bus factor of 1).
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding env-paths to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Licenses in the dependency tree
Every license you inherit by installing env-paths, not just its own. Check this before a legal review, not after.
Compatibility
- Node.js
- node >=20
- Module format
- ESM only
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the env-paths README.
import envPaths from 'env-paths';
const paths = envPaths('MyApp');
paths.data;
//=> '/home/sindresorhus/.local/share/MyApp-nodejs'
paths.config
//=> '/home/sindresorhus/.config/MyApp-nodejs'env-paths vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| env-pathsthis page | 0 | 2 | MIT | 7 months ago |
| path-key | 244.9M | 1 | MIT | 1 day ago |
| tildify | 0 | 1 | MIT | 1 day ago |
| path-parse | 0 | 1 | MIT | 1 day ago |
| strip-json-comments | 0 | 2 | MIT | 1 day ago |
| getenv | 0 | 7 | MIT | 1 day ago |
Dependencies
Declared by env-paths v4.0.0. Runtime dependencies are installed with the package; dev dependencies are not.
Runtime (1)
Dev (3)
Used by
Popular packages that depend on env-paths.
Relationship graph
Dependencies (left) and dependents (right) of env-paths.
Frequently installed together
TypeScript definitions for node
An AST-based pattern checker for JavaScript.
Prettier is an opinionated code formatter
Next generation testing framework powered by Vite
Istanbul coverage provider for Vitest
Like which(1) unix command. Find the first instance of an executable in the PATH.
TypeScript Execute (tsx): Node.js enhanced with esbuild to run TypeScript & ESM files
Delightful JavaScript Testing.
Import a module while bypassing the cache
The semantic version parser used by npm.
IEEE 754 half-precision floating-point for JavaScript
Parse JSON with more helpful errors
Release history
1 release in the last two years, typically about 119 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 4.0.0latest | 7 months ago | 9.3 KB | MIT |
| 3.0.0 | 5 years ago | 9.6 KB | MIT |
| 2.2.1 | 5 years ago | 9.9 KB | MIT |
| 2.2.0 | 7 years ago | 6.5 KB | MIT |
| 2.1.0 | 7 years ago | 5.9 KB | MIT |
| 2.0.0 | 7 years ago | 4.9 KB | MIT |
| 1.0.0 | 9 years ago | — | MIT |
| 0.3.1 | 10 years ago | — | MIT |
| 0.3.0 | 10 years ago | — | MIT |
| 0.2.0 | 10 years ago | — | MIT |
| 0.1.0 | 10 years ago | — | MIT |
Overview
env-paths is an npm package that get paths for storing things like data, config, cache, etc. It has 2 known dependents in the graph. The latest version is 4.0.0, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need get paths for storing things like data, config, cache, etc and value a focused solution.
When not to use it
Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.
Pros
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
Cons
- No significant drawbacks detected from available metadata.
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Funding
Frequently asked questions
Should I use env-paths?
Yes — env-paths scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 228 days ago.
How do I install env-paths?
Run `npm install env-paths` to add env-paths to your npm project.
How many dependencies does env-paths have?
env-paths declares 4 direct dependencies and pulls in 1 packages in total once its runtime tree is resolved totalling about 14 KB on disk.
What license is env-paths released under?
env-paths is distributed under the MIT license.
How popular is env-paths?
npm does not publish download counts. Within PackageGraph's crawl, 2 known packages depend on env-paths.
Is env-paths still maintained?
The most recent release of env-paths (v4.0.0) was published 7 months ago.
Does env-paths run install scripts?
No. env-paths does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.