EVERYTHING XIAOMI
Get listed

ts-proto

ts-proto is an open-source TypeScript code generator for Protocol Buffers.

Place
#15 of 33
Score
6.5
ts-proto's website

What ts-proto is

ts-proto is an open-source TypeScript code generator for Protocol Buffers. It turns .proto files into TypeScript interfaces and message methods for encoding, decoding, and conversion to and from JSON. Its output aims for an idiomatic TypeScript style and favors interfaces over classes where possible. It maps Protobuf well-known types, including wrapper and Struct types, to native TypeScript or JSON types. For services, it generates types and client implementations for Twirp, grpc-web, grpc-js, and NestJS. Twirp clients can batch matching individual RPC calls when using the documented batching convention. The project is RPC-framework agnostic: it generates code for use with RPC frameworks rather than providing one itself. Installation uses npm, and the tool runs as a protoc plugin. The README also documents Buf integration, including an official plugin in the Buf Registry, and use through the protobuf-gradle-plugin. ts-proto supports compile-time generation from .proto files, but not runtime reflection or loading dynamic .proto files. It does not support clients for Google Cloud APIs based on google.api.http. The repository identifies its license as Apache-2.0.

Good

  • Generates TypeScript interfaces and message conversion methods.
  • Supports service clients for Twirp, grpc-web, grpc-js, and NestJS.
  • Documents integration with protoc, Buf, and Gradle.
  • Apache-2.0 licensed open-source project.

Watch out

  • Does not support runtime reflection or dynamic .proto loading.
  • Does not support clients for google.api.http-based Google Cloud APIs.
  • It generates code but is not an RPC framework.

Who it suits

ts-proto suits TypeScript developers generating code from Protocol Buffers schemas. It may fit projects using Twirp, grpc-web, grpc-js, NestJS, Buf, or the protobuf Gradle plugin.

Verdict

ts-proto provides compile-time generation of TypeScript code from Protobuf schemas, with service client options and several documented integration paths. Check its runtime-reflection and Google Cloud API limitations against your project requirements.

Plans and prices

From ts-proto's own pricing page, checked 11 Oct 2026.

All about pricing
PlanPriceWhat it gives you
ts-protoFreeApache-2.0 licensed open-source repository

The facts

Each one read from ts-proto's own pages, with the date it was checked.

What it does

Batching
Twirp clients can automatically batch matching RPC calls to help prevent N+1 requests.checked 11 Oct 2026
Buf integration
The README documents configuring ts-proto with Buf and says an official plugin is published to the Buf Registry.checked 5 Oct 2026
Generated code
Generated message code includes encode, decode, toJSON, and fromJSON methods.checked 11 Oct 2026
Google APIs limit
The README says clients for google.api.http-based Google Cloud APIs are not supported.checked 11 Oct 2026
Gradle integration
The README documents invoking ts-proto through the protobuf-gradle-plugin.checked 5 Oct 2026
Install and use
The quick start installs ts-proto with npm and invokes it as a protoc plugin.checked 5 Oct 2026
Integrations
The README documents use with protoc, Buf, and the protobuf Gradle plugin.checked 11 Oct 2026
License
The repository is published under the Apache-2.0 license.checked 11 Oct 2026
Purpose
ts-proto transforms .proto files into strongly typed, idiomatic TypeScript files.checked 11 Oct 2026
RPC scope
The README says ts-proto is not an out-of-the-box RPC framework.checked 11 Oct 2026
Runtime reflection
The project supports compile-time .proto-to-.ts code generation and does not support runtime reflection or loading of dynamic .proto files.checked 11 Oct 2026
Serialization
Version 2.x migrated low-level protobuf serialization from protobufjs to @bufbuild/protobuf.checked 11 Oct 2026
Service clients
It generates service types and client implementations for Twirp, grpc-web, grpc-js, and NestJS.checked 5 Oct 2026
Service support
It generates service types and client implementations for Twirp, grpc-web, grpc-js, and NestJS.checked 11 Oct 2026
Support
The maintainer offers customizations or priority support for companies by email.checked 11 Oct 2026
TypeScript style
The project aims for TypeScript-first, idiomatic output and uses interfaces instead of classes where possible.checked 5 Oct 2026
Unsupported clients
The README says it does not support clients for google.api.http-based Google Cloud APIs.checked 5 Oct 2026
Unsupported workflow
It supports code generation from .proto files but does not support runtime reflection or loading of dynamic .proto files.checked 5 Oct 2026
Well-known types
It converts Protobuf well-known types, including wrapper and Struct types, to corresponding native TypeScript or JSON types.checked 5 Oct 2026

Where it runs

Type mappings
It maps protobuf timestamps to Date by default and supports configurable representations including strings and Temporal.Instant.checked 11 Oct 2026

Alternatives to ts-proto

All alternatives
  1. 1

    SQLDelight

    Free planOpen sourceAndroidiOSWebAPI
    7.9Free plan
  2. 2

    Fern

    Free planOpen sourceWebAPILinuxmacOS
    7.8Free plan
  3. 3

    Swagger Codegen

    Free planOpen sourceWebAPILinuxmacOS
    7.6Free plan
  4. 4

    APIMatic

    Free planWebAPIExtensionLinux
    7.4From $99 a month
  5. 5

    Symfony MakerBundle

    Free planOpen sourceAPILinuxmacOSSelf-hosted
    7.4Free plan
  6. 6quicktype logo

    quicktype

    Free planWebAPILinuxmacOS
    7.3From $19 a month