{"schemaVersion":1,"id":"cosmiconfig","name":"Cosmiconfig","locale":"en","canonicalUrl":"https://base.akulich.dev/en/library/cosmiconfig/","officialUrl":"https://github.com/cosmiconfig/cosmiconfig","isCatalog":false,"description":"Configuration discovery and loading for JavaScript tooling: it helps your CLI support package.json and common config files.","tasks":["Add user configuration loading to a CLI","Connect config discovery and test the processing order of detected settings"],"categoryIds":["backend"],"subcategoryIds":["backend.api"],"tags":["Cosmiconfig","API","Development"],"aliases":["cosmiconfig/cosmiconfig","cosmiconfig"],"platforms":[],"stack":[],"compatibility":null,"pricing":"free","freeUsage":"Code and local use under MIT.","paidUsage":"Computing resources, self-hosting, and external services are paid for separately if used.","license":"MIT for the code; dependencies have separate licenses.","selectionGuide":{"purpose":"Add user configuration loading to a CLI","chooseWhen":["Add user configuration loading to a CLI","Connect config discovery and test the processing order of detected settings"],"considerInstead":[],"requirements":[],"limitations":["Costs and limits of free use: Computing resources, self-hosting, and external services are paid for separately if used.","Terms of use: MIT for the code; dependencies have separate licenses.","The sync API lacks .mjs/.mts; moduleName must be a valid filename, so a scoped package name cannot be used directly."],"faq":[{"question":"What can you use for free in Cosmiconfig?","answer":"Code and local use under MIT."},{"question":"What additional costs might arise with Cosmiconfig?","answer":"Computing resources, self-hosting, and external services are paid for separately if used."},{"question":"What terms of use matter for Cosmiconfig?","answer":"MIT for the code; dependencies have separate licenses."},{"question":"How do you get started with Cosmiconfig?","answer":"Define the tool name and supported configuration sources. Connect config discovery and test the processing order of detected settings. Add error handling and an integration check of the result."},{"question":"How should I choose search, load, and configuration search boundaries?","answer":"search searches searchPlaces; load reads a known path; the result includes config/filepath/isEmpty. searchStrategy none checks the current directory, project climbs to package.json, and global climbs to stopDir then the global config directory. Handle parser errors; no config returns null."}],"related":[],"sources":["https://github.com/cosmiconfig/cosmiconfig","https://raw.githubusercontent.com/cosmiconfig/cosmiconfig/HEAD/README.md","https://raw.githubusercontent.com/cosmiconfig/cosmiconfig/HEAD/LICENSE","https://www.open-source-tools.com/"]},"selectionCheckedAt":null,"applicationGuide":{"goal":"Add user configuration loading to a CLI.","inputs":["A data contract or HTTP workflow.","A project with a supported runtime."],"steps":["Define the tool name and supported configuration sources.","Connect config discovery and test the processing order of detected settings.","Add error handling and an integration check of the result."],"checks":["Invalid and missing data are handled predictably.","Types and the actual response agree; errors are not hidden."]},"sources":["https://github.com/cosmiconfig/cosmiconfig","https://raw.githubusercontent.com/cosmiconfig/cosmiconfig/HEAD/README.md","https://raw.githubusercontent.com/cosmiconfig/cosmiconfig/HEAD/LICENSE","https://www.open-source-tools.com/"],"checkedAt":"2026-10-06","reviewScope":"The purpose, current repository license, and separate terms for code, services, and models have been reviewed. The product was not run, and no security audit was performed.","relatedIds":[],"dataVersion":"cbbe7123b47a5ae80983","type":"Backend / API library","kind":"library","pricingNote":"Code and local use under MIT. Computing resources, self-hosting, and external services are paid for separately if used.","notes":null,"labeledSources":[{"url":"https://github.com/cosmiconfig/cosmiconfig","label":"Official source"},{"url":"https://raw.githubusercontent.com/cosmiconfig/cosmiconfig/HEAD/README.md","label":"Official source"},{"url":"https://raw.githubusercontent.com/cosmiconfig/cosmiconfig/HEAD/LICENSE","label":"License"},{"url":"https://www.open-source-tools.com/","label":"Catalog / discovery source"}],"licenseGuides":[{"id":"mit","title":"MIT — permissive license","scope":null,"summary":"You can use, modify, distribute, and sell the code, including in a closed-source commercial product. When sharing copies or substantial portions of the code, retain the license text and copyright notice. You do not need to open-source your entire project; the author provides no warranties.","url":"https://opensource.org/license/mit"}],"entryIds":[],"composition":null}