# ts-proto-build

> CLI protoc wrapper for recursive Typescript code generation from Protobuf files

Latest version **1.0.2** (published 2022-03-25) · ISC license · 0 weekly downloads

## Install

```sh
npm install ts-proto-build
pnpm add ts-proto-build
yarn add ts-proto-build
bun add ts-proto-build
```

Provides the command `ts-proto-build`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2022-03-25 |
| First published | 2021-09-30 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 5.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Tom Schamberger |
| Maintainers | legalsoftware |
| Keywords | protoc, protobuf, TypeScript |

## Links

- npm: https://www.npmjs.com/package/ts-proto-build
- Repository: https://github.com/Legal-Software/ts-proto-build
- Homepage: https://github.com/Legal-Software/ts-proto-build#readme
- Issues: https://github.com/Legal-Software/ts-proto-build/issues
- npm.io page: https://npm.io/package/ts-proto-build

## Dependencies (2)

- [yargs](https://npm.io/package/yargs.md) ^17.2.1
- [ts-proto](https://npm.io/package/ts-proto.md) ^1.83.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

- 1.0.2 (latest) — 2022-03-25
- 1.0.1 — 2021-10-12
- 1.0.0 — 2021-09-30

## README

# Typescript Protobuf Build Tool

This project implements an NPM CLI wrapper tool for [ts-proto](https://www.npmjs.com/package/ts-proto) to recursively generate TypeScript code for Protobuf definitions using NPM run scripts.

## Usage

```
$ ts-protobuf-build

Options:
      --version  Show version number                                   [boolean]
  -d, --dir      Source directory                            [string] [required]
  -o, --out      Output directory                            [string] [required]
  -e, --ext      Proto file extensions             [array] [default: [".proto"]]
      --ignore   Ignore files matching JS RegExp           [array] [default: []]
      --interop  Compile with 'esModuleInterop' flag  [boolean] [default: false]
      --plugin   Path to the 'protoc-gen-ts_proto' plugin executable
                     [string] [default: "node_modules/.bin/protoc-gen-ts_proto"]
  -h, --help     Show help                                             [boolean]
```

## Requirements

Please make sure that the `protoc` binary is installed.

- See [protoc installation](https://grpc.io/docs/protoc-installation/)

## Features

* Pure NodeJS wrapper script (works on all platforms supporting NodeJS and protoc)
* Searches source directory recursively for proto files
* Generates TypeScript code from Protobuf definitions

## Use case

This script is intended to be used in NPM run scripts.

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