# Installation

> Install @welldot/core with npm, pnpm or yarn, check the requirements, and find the JSON Schema and example files it ships with.

::code-group

```bash [pnpm]
pnpm add @welldot/core
```

```bash [npm]
npm install @welldot/core
```

```bash [yarn]
yarn add @welldot/core
```

::

## Requirements

- Node.js 18 or later, or any modern browser or bundler. The package has no DOM or network dependency, so it also runs in workers and edge runtimes.
- ES modules and CommonJS are both published (`import` and `require`), with TypeScript declarations.
- Dependencies: [`zod`](https://zod.dev) 3 (the validators are Zod schemas) and `defu`. They install with the package.

## What else is in the package

| Path                                 | Contents                                                                                                                              |
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------- |
| `@welldot/core`                      | The library: types, validators, serialization, units, vocabularies.                                                                   |
| `@welldot/core/well.schema.json`     | The [JSON Schema](/format/reference/json-schema) for v2, the same file published at `https://welldot.org/schema/v2/well.schema.json`. |
| `@welldot/core/examples/<file>.well` | The 19 [example wells](/format/reference/examples).                                                                                   |

```ts
// Node: read an example from the installed package
import { readFile } from 'node:fs/promises';
import { createRequire } from 'node:module';

const require = createRequire(import.meta.url);
const path =
  require.resolve('@welldot/core/examples/coluna-mg-cristalino-abastecimento.well');
const text = await readFile(path, 'utf8');
```

## Versions

The package follows semantic versioning from 1.0 onward; during 0.x a minor release can change the API, and the [changelog](/core/changelog) says how. Format support by release:

| `@welldot/core` | Format revision      |
| --------------- | -------------------- |
| 0.5.0           | 2.4 (writes `"2.4"`) |
| 0.4.0           | 2.3                  |
| 0.3.0           | 2.1                  |
| 0.2.0           | 2.0                  |

::warning
Releases up to 0.4.0 reject files with `"version": "2.4"`. Update every program that reads your files before any of them starts writing 2.4 files.
::

## Next

[First use](/core/getting-started/first-use)
