binary := "lethe" version := `git describe --tags 2>/dev/null || echo dev` default: @just --list build: web-build CGO_ENABLED=0 go build -ldflags "-X main.version={{version}}" -o {{binary}} ./cmd/lethe web-install: cd web && npm ci web-dev: cd web && npm run dev web-build: cd web && npm run build web-test: cd web && npm test web-lint: cd web && npm run lint && npm run typecheck web-clean: rm -rf web/node_modules internal/server/web/dist/assets rm -f internal/server/web/dist/index.html @printf 'letheSPA not built — run just web-build\n' > internal/server/web/dist/index.html run: go run ./cmd/lethe -config config.yaml dev: go tool air test: go test -race ./... lint: golangci-lint run --fix ./... fmt: gofmt -w . goimports -w . go fix ./... tidy: go mod tidy # Migration helpers. `go tool migrate` resolves through the `tool` directive in # go.mod (Go 1.24+) — no separate install needed. Bootstrap once with: # go get -tool github.com/golang-migrate/migrate/v4/cmd/migrate@latest migrate-up: go tool migrate -path internal/platform/database/migrations -database "sqlite://./lethe.db" up migrate-down: go tool migrate -path internal/platform/database/migrations -database "sqlite://./lethe.db" down 1 migrate-create NAME: go tool migrate create -ext sql -dir internal/platform/database/migrations -seq {{NAME}} docker-build: docker build -t {{binary}}:{{version}} . docker-up: docker compose up -d docker-down: docker compose down