Kratos
A lightweight Go framework for building cloud-native microservices, with a CLI that generates HTTP and gRPC code from Protobuf definitions.
Kratos is a lightweight Go framework for building cloud-native microservices, providing small, explicit APIs for transport, middleware, service registry, configuration, logging, encoding and code generation, so that application code can focus on business logic. It supports API-first development, generating HTTP and gRPC code from Protobuf definitions, and offers a unified transport layer across both protocols.
Composable middleware covers recovery, logging, validation, tracing, metrics and auth, and the framework uses the standard library's log/slog for logging, with OpenTelemetry extensions available through contrib packages. Registry, configuration and encoding components are pluggable, and a wider contrib ecosystem adds optional integrations for registries, config stores, middleware, encodings and observability.
A kratos CLI installed through go install scaffolds a new service, and further commands can add a Protobuf API definition and generate its client and server code. Kratos requires Go 1.25 or later and the protoc and protoc-gen-go tools, and is released under the MIT license.