FREEDOM251

Freedom251 › Code Generators

ts-proto

Free plan APILinuxMacWindows

Visit ts-proto Alternatives Pricing

ts-proto's own site

What ts-proto is

ts-proto converts Protocol Buffers .proto files into strongly typed TypeScript. Generated message code includes TypeScript interfaces and methods for encoding, decoding, and converting to and from JSON. Its output aims for an idiomatic TypeScript style, using interfaces instead of classes where possible. Protobuf well-known types, including wrapper and Struct types, map to corresponding native TypeScript or JSON types. Timestamps map to Date by default, with configurable representations including strings and Temporal.Instant.

For services, ts-proto generates types and client implementations for Twirp, grpc-web, grpc-js, and NestJS. Twirp clients can automatically batch matching individual RPC calls when they follow the documented batching convention. The project is RPC-framework agnostic: it generates code for use with frameworks rather than supplying an RPC framework. Installation uses npm, and ts-proto runs as a protoc plugin. The README also documents Buf integration, with an official plugin in the Buf Registry, and invocation through the protobuf-gradle-plugin. The project supports compile-time code generation, 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.

Who it suits

ts-proto suits TypeScript developers who need to generate typed message code from Protocol Buffers schemas. It also fits teams using Twirp, grpc-web, grpc-js, or NestJS clients, and projects that invoke generation through protoc, Buf, or the protobuf-gradle-plugin.

What it does well

  • Generates TypeScript interfaces and message serialization methods.
  • Converts messages to and from JSON.
  • Supports Twirp, grpc-web, grpc-js, and NestJS clients.
  • Maps Protobuf well-known types to native TypeScript or JSON types.
  • Apache-2.0 licensed open-source repository.

What to know first

  • Does not support runtime reflection or dynamic .proto files.
  • Does not generate clients for google.api.http-based Google Cloud APIs.
  • Generates code for RPC frameworks but is not an RPC framework itself.

Plans

PlanBilled and limitsPrice
ts-protoApache-2.0 licensed open-source repositoryFree

As github.com lists them, read 11 Oct 2026. The maker's own page has the final word.

Getting started

  1. Visit the ts-proto GitHub repository.
  2. Install ts-proto with npm.
  3. Invoke it as a protoc plugin to generate TypeScript from .proto files.
  4. Alternatively, configure the documented Buf integration or invoke it through the protobuf-gradle-plugin.

Verdict

Choose ts-proto if your project needs TypeScript code generated from .proto files, including service clients for its supported frameworks. Look elsewhere if you need runtime reflection, dynamic schema loading, or clients for Google Cloud APIs based on google.api.http.

Questions

What does ts-proto generate?

It turns .proto files into strongly typed TypeScript, including message interfaces and encode, decode, toJSON, and fromJSON methods.

Which service clients does it support?

It generates service types and client implementations for Twirp, grpc-web, grpc-js, and NestJS.

Is ts-proto an RPC framework?

No. It describes itself as RPC-framework agnostic and generates code for use with frameworks.

Does it support runtime reflection or dynamic .proto files?

No. It supports compile-time code generation from .proto files, not runtime reflection or loading dynamic .proto files.

Is ts-proto free and open source?

Yes. The repository identifies the project as Apache-2.0 licensed, and its listed plan is free.

How can it be integrated into a build?

The quick start installs it with npm and invokes it as a protoc plugin. The README also documents Buf and protobuf-gradle-plugin integrations.

Facts from ts-proto's own pages

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

Where ts-proto stands on Freedom251

Look at these too