# @protobuf-ts/plugin

> The protocol buffer compiler plugin "protobuf-ts" generates TypeScript, gRPC-web, Twirp, and more.

Latest version **2.11.1** (published 2025-06-18) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @protobuf-ts/plugin
pnpm add @protobuf-ts/plugin
yarn add @protobuf-ts/plugin
bun add @protobuf-ts/plugin
```

Provides the commands `protoc-gen-ts`, `protoc-gen-dump`.

## Health

**Score 35/100 (D)** — status: stable.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 2.11.1 |
| Published | 2025-06-18 |
| First published | 2020-08-14 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 1.3 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1344 |
| Author | Timo Stamm |
| Maintainers | timostamm |
| Keywords | Protocol Buffers, protobuf, TypeScript, protoc, bigint, gRPC-web, gRPC, Twirp, Reflection |

## Links

- npm: https://www.npmjs.com/package/@protobuf-ts/plugin
- Repository: https://github.com/timostamm/protobuf-ts
- Issues: https://github.com/timostamm/protobuf-ts/issues
- npm.io page: https://npm.io/package/@protobuf-ts/plugin

## Dependencies (6)

- [typescript](https://npm.io/package/typescript.md) ^3.9
- [@bufbuild/protobuf](https://npm.io/package/@bufbuild/protobuf.md) ^2.4.0
- [@protobuf-ts/protoc](https://npm.io/package/@protobuf-ts/protoc.md) ^2.11.1
- [@protobuf-ts/runtime](https://npm.io/package/@protobuf-ts/runtime.md) ^2.11.1
- [@bufbuild/protoplugin](https://npm.io/package/@bufbuild/protoplugin.md) ^2.4.0
- [@protobuf-ts/runtime-rpc](https://npm.io/package/@protobuf-ts/runtime-rpc.md) ^2.11.1

## 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

- 2.11.1 (latest) — 2025-06-18
- 2.2.3-alpha.1 (next) — 2022-03-15
- 2.11.0 — 2025-05-26
- 2.10.0 — 2025-05-01
- 2.9.6 — 2025-03-19
- 2.9.5 — 2025-03-09
- 2.9.4 — 2024-03-13
- 2.9.3 — 2023-12-07
- 2.9.2 — 2023-12-05
- 2.9.1 — 2023-07-31
- 2.9.0 — 2023-04-24
- 2.8.3 — 2023-03-20
- 2.8.2 — 2022-11-16
- 2.8.1 — 2022-09-07
- 2.8.0 — 2022-08-17
- … 85 more at https://npm.io/package/@protobuf-ts/plugin/versions

## README

@protobuf-ts/plugin
===================

The protocol buffer compiler plugin for TypeScript: [protobuf-ts](https://github.com/timostamm/protobuf-ts) 
 
Installation:

```shell script
# with npm:
npm install -D @protobuf-ts/plugin

# with yarn:
yarn add --dev @protobuf-ts/plugin
```             

This will install the plugin as a development dependency.  

Basic usage:
```shell script
npx protoc --ts_out . --proto_path protos protos/my.proto 
```

With some options:
```shell script
npx protoc \ 
  --ts_out . \
  --ts_opt long_type_string \
  --ts_opt optimize_code_size \
  --proto_path protos \
  protos/my.proto 
```

`protoc` is the protocol buffer compiler. [protobuf-ts](https://github.com/timostamm/protobuf-ts) 
installs it automatically.

Plugin parameters are documented in the [MANUAL](https://github.com/timostamm/protobuf-ts/blob/master/MANUAL.md#the-protoc-plugin).  
For a quick overview of [protobuf-ts](https://github.com/timostamm/protobuf-ts), check the repository [README](https://github.com/timostamm/protobuf-ts/blob/master/README.md).

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