</>PackageGraphPackageGraph

env-paths

npmv4.0.0TypeScript

Get 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.

1
Direct dependencies

Runtime packages this one declares itself.

1
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

14 KB
Install size

Unpacked size of this package plus its entire runtime tree.

1
Tree depth

Longest resolved dependency chain below this package.

Licenses in the dependency tree

MIT

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.

PackageWeekly downloadsDependentsLicenseLast release
env-pathsthis page02MIT7 months ago
path-key244.9M1MIT1 day ago
tildify01MIT1 day ago
path-parse01MIT1 day ago
strip-json-comments02MIT1 day ago
getenv07MIT1 day ago

Dependencies

Declared by env-paths v4.0.0. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (3)

ava ^6.4.1tsd ^0.33.0xo ^1.2.3

Used by

Popular packages that depend on env-paths.

Relationship graph

Dependencies (left) and dependents (right) of env-paths.

is-safe-filenamecosmiconfiggelenv-paths
env-paths dependencies dependents

Frequently installed together

Release history

1 release in the last two years, typically about 119 days apart.

Recent versions of env-paths
VersionPublishedSizeLicense
4.0.0latest7 months ago9.3 KBMIT
3.0.05 years ago9.6 KBMIT
2.2.15 years ago9.9 KBMIT
2.2.07 years ago6.5 KBMIT
2.1.07 years ago5.9 KBMIT
2.0.07 years ago4.9 KBMIT
1.0.09 years agoMIT
0.3.110 years agoMIT
0.3.010 years agoMIT
0.2.010 years agoMIT
0.1.010 years agoMIT

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

Keywords

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.