Quick Start
1) Install the CLI
Section titled “1) Install the CLI”go install github.com/slice-soft/keel@latestkeel --version2) Create a new project
Section titled “2) Create a new project”Interactive mode (recommended):
keel new my-apiAutomatic mode (no prompts):
keel new my-api --yes3) Enter the project and run development
Section titled “3) Enter the project and run development”cd my-apikeel run devIn new projects, keel.toml typically includes:
[scripts]dev = "air -c .air.toml"build = "go build -o bin/my-api ./cmd/main.go"test = "go test ./..."lint = "golangci-lint run"4) Generate your first module
Section titled “4) Generate your first module”keel generate module usersThis creates the base module scaffold, updates cmd/main.go with app.Use(users.NewModule(appLogger)), and runs go mod tidy.
To also generate a repository, pass --gorm or --mongo:
keel generate module users --gormExpected output (main paths) for a persistence-backed module:
internal/modules/users/users_module.gointernal/modules/users/users_module_test.gointernal/modules/users/users_dto.gointernal/modules/users/users_entity.gointernal/modules/users/users_service.gointernal/modules/users/users_service_test.gointernal/modules/users/users_controller.gointernal/modules/users/users_controller_test.gointernal/modules/users/users_repository.gointernal/modules/users/users_repository_test.go- update of
cmd/main.gowithapp.Use(users.NewModule(appLogger, db))
If you use --mongo, the repository template is generated with the Mongo implementation and cmd/main.go is wired with mongoClient instead of db.
5) Verify base endpoints
Section titled “5) Verify base endpoints”With the app running in development:
GET /healthGET /docsGET /docs/openapi.jsonGET /hello(if you keptstarter)
ss-keel-coredoes not mount docs whenEnv == "production".
6) Run more project scripts
Section titled “6) Run more project scripts”keel run testkeel run buildAlternate flow: existing project
Section titled “Alternate flow: existing project”If you already have a Go project and want to adopt keel run:
cd existing-projectkeel initkeel run testkeel init creates keel.toml and, depending on your response, also .air.toml.