DEV Community

Vladislav
Vladislav

Posted on

Fully customizable client side (TypeScript) code generation tool for gRPC

Hello everyone. I want to present experimental project which helps you to use gRPC-web on client side.

Catfish is first fully customizable client side (TypeScript) code generation tool for gRPC.

With Catfish you can:

  • Extend every code generation plugin using very friendly, simple and powerful syntax
  • Write your own code generation plugins without pain
  • Use library without dependencies like protoc, buf or java
  • Use with protoc or buf (in progress)

Catfish packages:

  • Parser - Based on ANTL4 .proto files parser (currently works only with protobuf V3)
  • Generator - Basic classes & types for code generation and many ready to use plugins
  • Runtime - Some logic that you might need in generated fiels

Catfish plugins:

  • protobuf - generates protobuf messages
  • grpc-web - generates grpc-web compatible clients
  • grpc-web-rxjs - generates grpc-web compatible clients based on rxjs library
  • grpc-web-catfish - generates extensions for grpc-web clients that you can use to reduce boilerplate (currently implemented only paginators)
  • grpc-web-tanstack - generates extensions for grpc-web clients that you can use with reqct-query library

I will be really happy if you leave feedback here https://github.com/iamguid/catfish/discussions/1 Thank You!

GitHub logo iamguid / catfish

Easy to use gRPC client code generation tool

Catfish

⚠️ Experimental ️⚠️

What is Catfish ?

Catfish is first fully customizable client side (TypeScript) code generation tool for gRPC.

With Catfish you can:

  • Extend every code generation plugin using very friendly, simple and powerfull syntax
  • Write your own code generation plugins without pain
  • Use library without dependencies like protoc, buf or java
  • Use with protoc or buf (in progress)

Catfish packages:

  • Parser - Based on ANTL4 .proto files parser (currently works only with protobuf V3)
  • Generator - Basic classes & types for code generation and many ready to use plugins
  • Runtime - Some logic that you might need in generated fiels

Catfish plugins:

  • protobuf - generates protobuf messages
  • grpc-web - generates grpc-web compatible clients
  • grpc-web-rxjs - generates grpc-web compatible clients based on rxjs library
  • grpc-web-catfish - generates extensions for grpc-web clients that you can use to reduce boilerplate (currently implemented only paginators)
  • grpc-web-tanstack - generates extensions…

Top comments (0)