cosmiconfig/cosmiconfig
Find and load configuration from a package.json property, rc file, TypeScript module, and more! observed · 2026-08-28
Health v2 · maintenance only
77/100
- Activity 95
- Release rhythm 40
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 3952
- days_rel: 184
- days_push: 31
- n_releases_24m: 1
Adoption not part of the score
4157 stars · 143 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
Cosmiconfig is a Node.js library that searches for and loads configuration files for JavaScript tools and applications. It supports conventional locations like package.json properties, rc files, and JS/TS config modules, with flexible search strategies and caching.
Use cases
- load configuration from package.json property
- find and load rc files for a CLI tool
- support multiple config file formats (json, yaml, js, ts)
- search up the directory tree for a config file
- add configurable settings to a JavaScript library
- load TypeScript config modules
When to choose
- you're building an npm tool or library that needs user configuration
- you want to support the standard JS ecosystem config conventions out of the box
- you need flexible config file discovery with caching
When to avoid
- you need environment-variable-only configuration
- you're not in the Node.js/JavaScript ecosystem
- you need a full config validation schema system (combine with a validator instead)
Facets
library · maturity stable
configuration-management parser developer-tools developer-tools web-development backend cross-platform config-loading rc-files package-json config-discovery javascript-tooling npm automation nodejs javascript typescript
2 sources
- readme: https://github.com/cosmiconfig/cosmiconfig · fetched 2026-08-28 · c749ad54ad7c
- registry_npm: https://registry.npmjs.org/cosmiconfig · fetched 2026-08-29 · 57f57f47a33e
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| cosmiconfig/cosmiconfig | main | 77 |
For agents
markdown · JSON · MCP: product_card(name="cosmiconfig/cosmiconfig")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem