cosmiconfig/cosmiconfig
Find and load configuration from a package.json property, rc file, TypeScript module, and more! observed · 2026-10-11
Health v2 · maintenance only
86/100
- Activity 92
- Release rhythm 69
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-10-21. Adoption (stars, forks) is never an input.
- gap_med: 90.5
- age_days: 4000
- days_rel: 51
- days_push: 49
- n_releases_24m: 3
Adoption not part of the score
4166 stars · 144 forks observed · 2026-10-11
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-10-11 · c749ad54ad7c
- registry_npm: https://registry.npmjs.org/cosmiconfig · fetched 2026-08-29 · 57f57f47a33e
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| cosmiconfig/cosmiconfig | main | 86 |
For agents
markdown · JSON · MCP: product_card(name="cosmiconfig/cosmiconfig")
Data as of 2026-10-19T08:05:51.212177+00:00 · Report a problem