Skip to content

Quick Start

Terminal window
go install github.com/slice-soft/keel@latest
keel --version

Interactive mode (recommended):

Terminal window
keel new my-api

Automatic mode (no prompts):

Terminal window
keel new my-api --yes
Terminal window
cd my-api
keel run dev

In 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"
Terminal window
keel generate module users

This 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:

Terminal window
keel generate module users --gorm

Expected output (main paths) for a persistence-backed module:

  • internal/modules/users/users_module.go
  • internal/modules/users/users_module_test.go
  • internal/modules/users/users_dto.go
  • internal/modules/users/users_entity.go
  • internal/modules/users/users_service.go
  • internal/modules/users/users_service_test.go
  • internal/modules/users/users_controller.go
  • internal/modules/users/users_controller_test.go
  • internal/modules/users/users_repository.go
  • internal/modules/users/users_repository_test.go
  • update of cmd/main.go with app.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.

With the app running in development:

  • GET /health
  • GET /docs
  • GET /docs/openapi.json
  • GET /hello (if you kept starter)

ss-keel-core does not mount docs when Env == "production".

Terminal window
keel run test
keel run build

If you already have a Go project and want to adopt keel run:

Terminal window
cd existing-project
keel init
keel run test

keel init creates keel.toml and, depending on your response, also .air.toml.