Installation
This guide walks you through installing the Kratos CLI and all required dependencies for building microservices with Kratos.Prerequisites
Go Programming Language
Kratos requires Go 1.22 or higher.Install Protocol Buffers Compiler
Kratos uses Protocol Buffers for API definitions and code generation.Install Kratos CLI
The Kratos CLI provides commands for project scaffolding, code generation, and development workflows.Install the kratos command
Use This installs the
go install to install the latest version:kratos binary to your $GOPATH/bin directory.Install Protocol Buffer Plugins
Kratos requires severalprotoc plugins for generating Go code from .proto files.
Optional Development Tools
Wire (Dependency Injection)
Kratos projects use Wire for compile-time dependency injection:Air (Live Reload)
For automatic service restart during development:.air.toml configuration:
grpcurl (gRPC Testing)
Command-line tool for testing gRPC services:Using Docker (Alternative Setup)
If you prefer not to install dependencies locally, you can use Docker:Verify Your Installation
Create a test project to verify everything is working:Troubleshooting
Next Steps
Now that you have Kratos installed:Quick Start
Create your first Kratos service
CLI Reference
Learn about all Kratos CLI commands
Project Structure
Understand the generated project layout
Configuration
Configure your Kratos application
Keeping Up to Date
To stay current with Kratos:Getting Help
If you encounter issues:- Check the GitHub Issues
- Join the Discord Community
- Visit the Official Documentation
- Ask in the WeChat Group