# @tapjs/config

> Utility loading and managing tap configuration

Latest version **5.6.6** (published 2026-09-03) · BlueOak-1.0.0 license · 0 weekly downloads

## Install

```sh
npm install @tapjs/config
pnpm add @tapjs/config
yarn add @tapjs/config
bun add @tapjs/config
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 5.6.6 |
| Published | 2026-09-03 |
| First published | 2022-06-19 |
| Weekly downloads | 0 |
| License | BlueOak-1.0.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | 20 \|\| >=22 |
| Dependencies | 7 |
| Unpacked size | 305 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2423 |
| Author | Isaac Z. Schlueter |
| Maintainers | ljharb, isaacs |

## Links

- npm: https://www.npmjs.com/package/@tapjs/config
- Repository: https://github.com/tapjs/tapjs
- Homepage: https://github.com/tapjs/tapjs/tree/main/src/config#readme
- Issues: https://github.com/tapjs/tapjs/issues
- Funding: https://github.com/sponsors/isaacs
- npm.io page: https://npm.io/package/@tapjs/config

## Dependencies (7)

- [chalk](https://npm.io/package/chalk.md) ^5.6.2
- [tap-yaml](https://npm.io/package/tap-yaml.md) 4.4.2
- [jackspeak](https://npm.io/package/jackspeak.md) ^4.2.3
- [@tapjs/core](https://npm.io/package/@tapjs/core.md) 4.6.0
- [@tapjs/test](https://npm.io/package/@tapjs/test.md) 4.4.10
- [polite-json](https://npm.io/package/polite-json.md) ^5.0.0
- [walk-up-path](https://npm.io/package/walk-up-path.md) ^4.0.0

## Recent versions

- 5.6.6 (latest) — 2026-09-03
- 2.0.0 (pre) — 2023-09-15
- 5.6.5 — 2026-07-27
- 5.6.4 — 2026-05-15
- 5.6.3 — 2026-05-13
- 5.6.2 — 2026-05-01
- 5.6.1 — 2026-04-17
- 5.6.0 — 2026-04-15
- 5.5.3 — 2026-04-05
- 5.5.2 — 2026-02-20
- 5.5.1 — 2026-02-18
- 5.5.0 — 2026-02-18
- 5.4.1 — 2026-02-05
- 5.4.0 — 2025-12-01
- 5.3.0 — 2025-11-26
- … 81 more at https://npm.io/package/@tapjs/config/versions

## README

# `@tapjs/config`

This is the library that tap uses to manage configuration coming
from the command line options, environment variables, and config
files.

## Configuring Node Tap

If a `TAP_RCFILE` value is set in the process environment, then
that will be the initial location that tap looks for
configuration values.

If that's not set, then tap will look for configuration data
first in a .taprc file in the project root, and then in the "tap"
object in the project package.json file. ('Project root' means
the nearest folder at or above the current working directory
containing package.json, .taprc, or .git.)

The config object may set any of the following fields, as well as
the special "extends" field, which may specify either a package
name or file name, relative to the config file that references
it.

If the "extends" field resolves to a file on disk, then that will
be read as the base configuration object. (It may also extend yet
another config file, and so on.)

If the "extends" field specifies a package name, then it must be
resolveable in the `node_modules` folder of the file extending
it. That package must contain either a .taprc file, or a
package.json file with a "tap" object.

To see the format used in a .taprc file, run the `tap
dump-config` command with the desired options specified on the
command line.

Additionally, all config options that are modified from their
defaults will be set in the environment with the `TAP_` prefix,
and will be read from the environment if so specified. For
example, specifying `--omit-version` on the command line, or
`omit-version: true` in a .taprc file, will set
`TAP_OMIT_VERSION=1` in the environment.

Environment and CLI options take priority over any config files.

## Class `TapConfig`

This is the main interface for dealing with tap configuration.

The typical way to use this is by calling `await
TapConfig.load()` to get a
[`LoadedConfig`](https://tapjs.github.io/tapjs/interfaces/_tapjs_config.index.LoadedConfig.html)
object, which is an instance of `TapConfig` that has been fully
loaded with all relevant settings.

The full list of methods and properties are available in [the
typedocs](https://tapjs.github.io/tapjs/classes/_tapjs_config.index.TapConfig.html)

---
_Source: https://npm.io/package/@tapjs/config · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
