# protobuf-to-runtypes

> Convert protobuf to runtypes

Latest version **1.0.2** (published 2021-05-13) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install protobuf-to-runtypes
pnpm add protobuf-to-runtypes
yarn add protobuf-to-runtypes
bun add protobuf-to-runtypes
```

Provides the command `protobuf-to-runtypes`.

## Health

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

Positive: no vulnerabilities; high maintenance score.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2021-05-13 |
| First published | 2021-05-13 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 21.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | cobraz |

## Links

- npm: https://www.npmjs.com/package/protobuf-to-runtypes
- Repository: git@github.com:cobraz/protoc-gen-runtypes
- npm.io page: https://npm.io/package/protobuf-to-runtypes

## Dependencies (6)

- [camelcase](https://npm.io/package/camelcase.md) ^6.2.0
- [commander](https://npm.io/package/commander.md) ^7.2.0
- [get-stdin](https://npm.io/package/get-stdin.md) ^8.0.0
- [generate-runtypes](https://npm.io/package/generate-runtypes.md) ^2.1.0
- [ts-proto-descriptors](https://npm.io/package/ts-proto-descriptors.md) ^1.2.1
- [protocol-buffers-schema](https://npm.io/package/protocol-buffers-schema.md) ^3.5.1

## Recent versions

- 1.0.2 (latest) — 2021-05-13
- 1.0.1 — 2021-05-13
- 1.0.0 — 2021-05-13

## README

# Generate Runtypes from Protobuf

[![lifecycle](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)
[![NPM version](https://img.shields.io/npm/v/protobuf-to-runtypes.svg)](https://www.npmjs.com/package/protobuf-to-runtypes)
[![codecov](https://codecov.io/gh/cobraz/protobuf-to-runtypes/branch/main/graph/badge.svg)](https://codecov.io/gh/cobraz/protobuf-to-runtypes)

</div>

This CLI and library aim to provide an easy way to convert Protobuf to Runtypes.

We are thankful for all help with adding new functionality, fixing issues, or
improve the package. Feel free to open issues and pull requests ❤️

## Quickstart

```shell
▶ npx protobuf-to-runtypes -i protobuf.proto -o protobuf.ts
```

or

```shell
▶ cat https://some-url.com/my-api.proto | npx protobuf-to-runtypes -o protobuf.ts
```

## Documentation

Apart from this README, you can find details and examples of using the SDK in
the following places:

- [API Documentation][docs]

## Example

```typescript
import { parseToGenerator } from 'protobuf-to-runtypes';
import { generateRuntypes } from 'generate-runtypes';

const protobuf = await readFile('my-protobuf.proto');
const toGenerator = await parseToGenerator(protobuf);
const sourceCode = await generateRuntypes(toGenerator);
```

[runtypes]: https://github.com/pelotom/runtypes
[docs]: ./docs

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