# @protobuf-ts/protoc

> Installs the protocol buffer compiler "protoc" for you.

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

## Install

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

Provides the command `protoc`.

## 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-09-08 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 20.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1344 |
| Author | Timo Stamm |
| Maintainers | timostamm |
| Keywords | Protocol Buffers, protobuf, protoc, installation |

## Links

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

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [jwt-simple](https://npm.io/package/jwt-simple.md) — 259.5K weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K 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
- … 68 more at https://npm.io/package/@protobuf-ts/protoc/versions

## README

@protobuf-ts/protoc
===================


Installs the protocol buffer compiler "protoc" for you. 


Installation (not necessary if you use the [protobuf-ts plugin](https://github.com/timostamm/protobuf-ts/tree/master/packages/plugin)):

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

# with yarn:
yarn add @protobuf-ts/protoc
```

Now you can run protoc as usual, you just have to prefix your command with 
`npx` or `yarn`:

```shell script
# with npm:
npx protoc --version 

# with yarn:
yarn protoc --version 
``` 

If you do not already have protoc in your `$PATH`, this will automatically 
download the latest release of protoc for your platform from the github 
release page, then run the executable with your arguments.   


#### Yarn berry

This package is not compatible with Yarn berry. Please use 
[node-protoc](https://www.npmjs.com/package/node-protoc).


#### Installing a specific version

Add the following to your package json:

```
"config": {
   "protocVersion": "29.2"
}
``` 

#### Prevent using protoc from `$PATH`

Add a `protocVersion` to your package json, see above.


#### Added arguments

The script passes all given arguments to protoc and adds the 
following arguments:  

1. `--proto_path` that points to the `include/` directory of the 
   downloaded release (skipped when found on `$PATH`)
2. `--plugin` argument for all plugins found in `node_modules/.bin/`
3. `--proto_path` argument for `node_modules/@protobuf-ts/plugin`

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