kitex
generates Go code from Thrift or Protobuf IDL files
TLDR
SYNOPSIS
kitex [options] idlfile_
DESCRIPTION
kitex is a code generation tool for the Kitex high-performance RPC framework, part of ByteDance's open-source CloudWeGo ecosystem. It reads Thrift or Protocol Buffers interface definition language (IDL) files and generates Go scaffolding code for both servers and clients, including service interfaces, request/response types, serialization logic, and a runnable project skeleton.The generated code is designed for building Go microservices with features like connection pooling, load balancing, and circuit breaking built into the Kitex framework. By default, kitex produces both server and client code, but the `-client` flag restricts output to client stubs only. Custom code templates can be provided via the `-template` option to control the structure and style of the generated project.
PARAMETERS
IDLFILE_
Thrift or Protobuf IDL file.-module NAME
Go module name.-service NAME
Service name.-I PATH
Add search path for IDL includes. Can be specified multiple times.-use PATH
Skip generating kitex_gen and use the specified import path instead.-v, -verbose
Output more logs during generation.-type TYPE
Specify IDL type when it cannot be detected from the file extension.-combine-service
Combine all services in the IDL into a single service (Thrift only).-gen-path DIR
Specify output directory for generated code (default: kitex_gen).-thrift VALUE
Pass an argument to the thriftgo compiler.-protobuf VALUE
Pass an argument to the protoc compiler.
CAVEATS
Part of CloudWeGo. Go-specific. Thrift or Protobuf IDL required.
HISTORY
kitex is the code generator for Kitex, a high-performance RPC framework created by ByteDance.
