# capnp-ts

> Strongly typed Cap'n Proto implementation for the browser and Node.js using TypeScript

Latest version **0.9.3** (published 2026-08-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install capnp-ts
pnpm add capnp-ts
yarn add capnp-ts
bun add capnp-ts
```

## Health

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

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

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

## Facts

| | |
|---|---|
| Version | 0.9.3 |
| Published | 2026-08-21 |
| First published | 2017-08-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=20 |
| Dependencies | 2 |
| Unpacked size | 1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 167 |
| Author | jdiaz5513 |
| Maintainers | jdiaz5513 |
| Keywords | capnp, rpc, typescript |

## Links

- npm: https://www.npmjs.com/package/capnp-ts
- Repository: https://github.com/jdiaz5513/capnp-ts
- Homepage: https://github.com/jdiaz5513/capnp-ts#readme
- Issues: https://github.com/jdiaz5513/capnp-ts/issues
- npm.io page: https://npm.io/package/capnp-ts

## Dependencies (2)

- [debug](https://npm.io/package/debug.md) ^4.4.0
- [tslib](https://npm.io/package/tslib.md) ^2.8.0

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.9.3 (latest) — 2026-08-21
- 0.9.2 — 2026-08-02
- 0.9.1 — 2026-08-02
- 0.9.0 — 2026-08-01
- 0.8.0 — 2026-07-10
- 0.7.0 — 2021-08-19
- 0.6.0 — 2021-08-19
- 0.5.1 — 2021-08-18
- 0.5.0 — 2021-08-18
- 0.4.0 — 2018-09-27
- 0.3.0 — 2018-08-29
- 0.2.4 — 2017-11-24
- 0.2.0 — 2017-11-19
- 0.1.6 — 2017-11-03
- 0.1.5 — 2017-11-02
- … 5 more at https://npm.io/package/capnp-ts/versions

## README

# capnp-ts

A strongly typed [Cap'n Proto](https://capnproto.org/) implementation for the browser and Node.js using TypeScript.

Here's a quick usage example:

```typescript
import * as capnp from 'capnp-ts';

import {MyStruct} from './myschema.capnp.js';

export function loadMessage(buffer: ArrayBuffer): MyStruct {

  const message = new capnp.Message(buffer, false);

  return message.getRoot(MyStruct);

}
```

An extended readme is available on the project site: [https://github.com/jdiaz5513/capnp-ts](https://github.com/jdiaz5513/capnp-ts).

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