# seniority > Resolves flags, environment variables, config files and defaults in one fixed order, with provenance: every value can say where it came from. Zero dependencies. Drop-in paths for cosmiconfig, lilconfig, dotenv and rc. ## Documentation - [seniority/config](https://seniority.interlace.tools/docs/api/config): Every export of seniority/config, with its signature and doc comment: deepMerge, lineOf, packageLayer, loadWithExtends, candidates, discover, plus 3 types. - [seniority/cosmiconfig](https://seniority.interlace.tools/docs/api/cosmiconfig): Every export of seniority/cosmiconfig, with its signature and doc comment: cosmiconfig, cosmiconfigSync, Explorer, ExplorerSync, plus 10 types. - [seniority/dotenv](https://seniority.interlace.tools/docs/api/dotenv): Every export of seniority/dotenv, with its signature and doc comment: parse, populate, configDotenv, config, dotenv, plus 11 types. - [seniority/dotenv/cli](https://seniority.interlace.tools/docs/api/dotenv/cli): Every export of seniority/dotenv/cli, with its signature and doc comment: parseRunArgs, run, HELP, plus 2 types. - [seniority/dotenv/config](https://seniority.interlace.tools/docs/api/dotenv/config): seniority/dotenv/config exports nothing: importing it is the call. - [seniority/explain](https://seniority.interlace.tools/docs/api/explain): Every export of seniority/explain, with its signature and doc comment: explain, explanation, renderExplanation, plus 1 type. - [seniority/find-up](https://seniority.interlace.tools/docs/api/find-up): Every export of seniority/find-up, with its signature and doc comment: findUpMultipleSync, findUpMultiple, findUpSync, findUp, findDownSync, findDown and 1 more, plus 3 types. - [seniority](https://seniority.interlace.tools/docs/api): Every export of seniority, with its signature and doc comment: explain, ConfigError, envBoolean, envName, ORDER, RANK and 37 more, plus 33 types. - [seniority/lilconfig](https://seniority.interlace.tools/docs/api/lilconfig): Every export of seniority/lilconfig, with its signature and doc comment: lilconfig, lilconfigSync, defaultLoadersSync, defaultLoaders, plus 11 types. - [seniority/plugin](https://seniority.interlace.tools/docs/api/plugin): Every export of seniority/plugin, with its signature and doc comment: validate, register, reset, registered, sources, CONTRACT and 1 more, plus 5 types. - [seniority/precedence](https://seniority.interlace.tools/docs/api/precedence): Every export of seniority/precedence, with its signature and doc comment: screaming, envName, envBoolean, resolve, ORDER, RANK and 1 more, plus 10 types. - [seniority/rc](https://seniority.interlace.tools/docs/api/rc): Every export of seniority/rc, with its signature and doc comment: parse, rc, rc, plus 3 types. - [seniority/yaml](https://seniority.interlace.tools/docs/api/yaml): Every export of seniority/yaml, with its signature and doc comment: parse, YAMLException, plus 1 type. - [Changelog](https://seniority.interlace.tools/docs/changelog): Every release of seniority, newest first, from its CHANGELOG.md — what changed and the pull request it came from. - [Coming from cosmiconfig](https://seniority.interlace.tools/docs/coming-from/cosmiconfig): A cosmiconfig alternative with zero dependencies: import { cosmiconfig } from seniority, graded 242 / 243 by cosmiconfig's own suite, level with cosmiconfig itself — with provenance, so every resolved value can say where it came from, as text, --json data or an agent event. - [Coming from dotenv](https://seniority.interlace.tools/docs/coming-from/dotenv): A dotenv alternative with a drop-in path: import dotenv from seniority/dotenv, graded 197 / 197 by dotenv 18's own test suite, level with dotenv itself — then the same package resolves every value across flags, env, config files and defaults, with provenance as text, --json data or an agent event. - [Coming from rc](https://seniority.interlace.tools/docs/coming-from/rc): An rc alternative with a drop-in path: import rc from seniority/rc, graded 1 / 1 by rc's own test — one exit-code bit, not a case count — then rc's file stack and merge with none of its four dependencies, and a resolver that says where every value came from. - [Compatibility](https://seniority.interlace.tools/docs/drop-ins): How seniority's four drop-ins are graded by their incumbents' own suites — lilconfig 77 / 77, rc 1 / 1 (one bit), cosmiconfig 242 / 243 (level with cosmiconfig itself), dotenv 197 / 197 (level with dotenv 18 itself) — and the differences that remain. - [FAQ](https://seniority.interlace.tools/docs/faq): Short answers about seniority — the order, YAML, numbers from the environment, discovery, dotenv's vault, testing, plugins and CommonJS — each with where to read more. - [Getting started](https://seniority.interlace.tools/docs/getting-started): Install seniority, declare three options, resolve them from flags, the environment, a config file and defaults in one fixed order, and ask where each value came from. - [Config files](https://seniority.interlace.tools/docs/guides/config-files): discover() finds a config file in a fixed order, follows extends, and records each key's line; search() walks upward only when asked, bounded by stopAt, a depth limit and the root; loaders bring any format. - [Environment variables](https://seniority.interlace.tools/docs/guides/environment): How seniority reads the environment: only declared options, named PREFIX_OPTION_NAME in SCREAMING_SNAKE, one boolean spelling each way, PREFIX_NO_X refused — and the environment always an argument. - [Source plugins](https://seniority.interlace.tools/docs/guides/plugins): seniority/plugin: add a configuration source — a vault, a CI variable set, a remote config — at a rank between two built-ins, named in --explain, and checked by npx seniority check before it ships. - [Precedence and --explain](https://seniority.interlace.tools/docs/guides/precedence): resolve() applies one fixed order — flag, env, config, package.json, default — and records, for every value, the source that set it, the file line, and every candidate it beat, as text, --json data or an agent event. - [The truth table](https://seniority.interlace.tools/docs/guides/truth-table): Every combination of the 5 sources seniority reads, and which one wins: 32 rows generated from the exported TRUTH_TABLE, which is generated from ORDER, the array the resolver reads. - [Validation](https://seniority.interlace.tools/docs/guides/validation): validate() returns every violation at once, each naming the rule, the value and the source that set it — file and line, flag or variable — and check() throws them as one CONFIG error. - [seniority](https://seniority.interlace.tools/docs): Resolves flags, environment variables, config files and defaults in one fixed order, with provenance: every value can say where it came from. Zero dependencies. Drop-in paths for cosmiconfig, lilconfig, dotenv and rc. - [Add --explain to a CLI](https://seniority.interlace.tools/docs/recipes/explain-flag): Give a CLI a --explain