# @sourcelib/kv

> Source Engine KeyValue file parser and tokenizer library

Latest version **0.9.1** (published 2026-02-26) · GPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install @sourcelib/kv
pnpm add @sourcelib/kv
yarn add @sourcelib/kv
bun add @sourcelib/kv
```

## Health

**Score 60/100 (C)** — status: stable.

Positive: has types; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.9.1 |
| Published | 2026-02-26 |
| First published | 2022-09-13 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 66.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Stefan Heinz |
| Maintainers | stefanhat |

## Links

- npm: https://www.npmjs.com/package/@sourcelib/kv
- Repository: https://github.com/source-lib/sourcelib
- Homepage: https://github.com/source-lib/sourcelib#readme
- Issues: https://github.com/source-lib/sourcelib/issues
- npm.io page: https://npm.io/package/@sourcelib/kv

## Recent versions

- 0.9.1 (latest) — 2026-02-26
- 0.9.0 — 2026-02-26
- 0.8.0 — 2026-02-11
- 0.7.6 — 2025-11-10
- 0.7.5 — 2025-11-10
- 0.7.3 — 2025-06-08
- 0.7.2 — 2025-06-08
- 0.7.1 — 2023-01-18
- 0.6.0 — 2023-01-17
- 0.5.1 — 2023-01-12
- 0.4.0 — 2023-01-04
- 0.3.3 — 2022-12-29
- 0.3.2 — 2022-12-29
- 0.3.1 — 2022-12-29
- 0.3.0 — 2022-12-27
- … 2 more at https://npm.io/package/@sourcelib/kv/versions

## README

# @sourcelib/kv

Typescript library to tokenize, parse, inspect, analyse, reformat and do other language integrations for source engine keyvalue files.

## Installation

```bash
npm install @sourcelib/kv
```

## Usage

```typescript
import { tokenize, parse } from '@sourcelib/kv';

const tokens = tokenize(`
"KV" {
    "key" "value"
    "key2" "value2"
}`);

const kvTree = parse(tokens);
kvTree.getChildren()[0].getValues()[0].getValue(); // "value"
```

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