# @code-pushup/models

> Model definitions and validators for the Code PushUp CLI

Latest version **0.126.4** (published 2026-09-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install @code-pushup/models
pnpm add @code-pushup/models
yarn add @code-pushup/models
bun add @code-pushup/models
```

## Health

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

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

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.126.4 |
| Published | 2026-09-11 |
| First published | 2023-12-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 536.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| Maintainers | vmasek, matejchalk, bio_photon |
| Keywords | CLI, Code PushUp, developer tools, code quality, conformance, type definition, validators, models |

## Links

- npm: https://www.npmjs.com/package/@code-pushup/models
- Repository: https://github.com/code-pushup/cli
- Homepage: https://github.com/code-pushup/cli/tree/main/packages/models#readme
- Issues: https://github.com/code-pushup/cli/issues?q=is%3Aissue%20state%3Aopen%20type%3ABug%20label%3A"🧩%20models"
- npm.io page: https://npm.io/package/@code-pushup/models

## Dependencies (3)

- [zod](https://npm.io/package/zod.md) ^4.2.1
- [ansis](https://npm.io/package/ansis.md) ^3.3.2
- [vscode-material-icons](https://npm.io/package/vscode-material-icons.md) ^0.1.0

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 0.126.4 (latest) — 2026-09-11
- 0.126.3 — 2026-05-19
- 0.126.2 — 2026-03-31
- 0.126.1 — 2026-03-31
- 0.126.0 — 2026-03-30
- 0.125.0 — 2026-03-27
- 0.124.0 — 2026-03-26
- 0.123.0 — 2026-03-24
- 0.122.1 — 2026-03-24
- 0.122.0 — 2026-03-23
- 0.121.0 — 2026-03-20
- 0.120.1 — 2026-03-18
- 0.120.0 — 2026-03-17
- 0.119.1 — 2026-03-17
- 0.119.0 — 2026-03-16
- … 240 more at https://npm.io/package/@code-pushup/models/versions

## README

# @code-pushup/models

[![npm](https://img.shields.io/npm/v/%40code-pushup%2Fmodels.svg)](https://www.npmjs.com/package/@code-pushup/models)
[![downloads](https://img.shields.io/npm/dm/%40code-pushup%2Fmodels)](https://npmtrends.com/@code-pushup/models)
[![dependencies](https://img.shields.io/librariesio/release/npm/%40code-pushup/models)](https://www.npmjs.com/package/@code-pushup/models?activeTab=dependencies)

**Model definitions and validators** for the [Code PushUp CLI](../cli/README.md).

For a full list of models defined by this package, see the auto-generated [Code PushUp models reference](./docs/models-reference.md).

## Setup

If you've already installed another `@code-pushup/*` package, then you may have already installed `@code-pushup/models` indirectly.

If not, you can always install it separately:

```sh
npm install --save-dev @code-pushup/models
```

```sh
yarn add --dev @code-pushup/models
```

```sh
pnpm add --save-dev @code-pushup/models
```

## Usage

Import the type definitions if using TypeScript:

- in `code-pushup.config.ts`:

  ```ts
  import type { CoreConfig } from '@code-pushup/models';

  export default {
    // ... this is type-checked ...
  } satisfies CoreConfig;
  ```

- in custom plugin:

  ```ts
  import type { PluginConfig } from '@code-pushup/models';

  export default function myCustomPlugin(): PluginConfig {
    return {
      // ... this is type-checked ...
    };
  }
  ```

  ```ts
  import type { AuditOutput } from '@code-pushup/models';

  async function myCustomPluginRunner() {
    const audits: AuditOutput[] = await collectAudits();

    await writeFile(RUNNER_OUTPUT_FILE, JSON.strinfigy(audits));
  }
  ```

If you need runtime validation, use the underlying Zod schemas:

```ts
import { coreConfigSchema, validate } from '@code-pushup/models';

const json = JSON.parse(readFileSync('code-pushup.config.json'));
const config = validate(coreConfigSchema, json); // throws SchemaValidationError if invalid
```

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