kratos
Your ultimate Go microservices framework for the cloud-native era.
What is kratos?
Your ultimate Go microservices framework for the cloud-native era.
Overview of kratos
What it is
Kratos is a lightweight Go framework for building cloud-native microservices. It provides small, explicit APIs for transport, middleware, registry, configuration, logging, encoding, and code generation so applications can focus on business logic.
Key features
- API-first development with Protobuf and generated HTTP/gRPC code.
- Unified transport layer for HTTP and gRPC.
- Composable middleware for recovery, logging, validation, tracing, metrics, auth, and more.
- Pluggable registry, configuration, and encoding components.
- Standard-library
log/slogbased logging with OpenTelemetry extensions in contrib packages. - Consistent metadata, errors, validation, OpenAPI, and code-generation workflows.
- A contrib ecosystem for optional integrations such as registries, config stores, middleware, encodings, and observability.
Use cases
Building cloud-native microservices in Go, especially those requiring HTTP and gRPC transport, middleware composition, and pluggable infrastructure components.
Getting started
Requirements: Go 1.25 or later, protoc, protoc-gen-go. Install the CLI: shell go install github.com/go-kratos/kratos/cmd/kratos/v3@latest kratos upgrade Create a service: shell kratos new helloworld cd helloworld go mod tidy kratos run Visit http://localhost:8000/helloworld/kratos after the service starts. For a fuller generated service flow: shell kratos proto add api/helloworld/helloworld.proto kratos proto client api/helloworld/helloworld.proto kratos proto server api/helloworld/helloworld.proto -t internal/service go generate ./... kratos run
License and pricing
Kratos is open-sourced software licensed under the MIT license.
Based on the project's public README and repository metadata.