Development
QuickStart
Install the lazy CLI, create a GoLazy app, inspect the layout, and start local development.
Why GoLazy
GoLazy gives Go web apps a conventional shape for controllers, routes, views, assets, services, local tooling, and deployment. The goal is to keep the app as ordinary Go while removing the repeated setup work that otherwise appears in every server-rendered project.
Install the lazy command
Install the CLI:
curl -fsSL https://golazy.dev/install.sh | sh
The installer checks for Go, installs mise when needed, installs the latest
lazy command from golazy.dev/lazy, and prints next steps. The public
lazy manual lists the command surface and the Go vanity metadata for
the CLI module.
Confirm the command is available:
lazy --version
If the installer prints a PATH note, apply the printed export PATH=...
line or open a new shell before continuing.
Create an app
Generate a conventional app from the version-matched template:
lazy new github.com/user/my_first_lazy_app
cd my_first_lazy_app
lazy new checks whether a newer CLI is available, clones the matching sample
app, trusts the generated mise.toml, runs mise install, validates the app,
initializes Git, and commits the generated checkout with a local GoLazy Git
identity. Use lazy new --version v0.1.16 ... only when you intentionally
need a specific sample app tag.
Read the main directories
The generated app is small enough to inspect directly:
cmd/my_first_lazy_app/
executable entry point
init/ app wiring, dependencies, routes, and optional SEO
app/controllers/ request-local controllers
app/views/ layouts, controller views, mailer views, and partials
app/public/ embedded public files and generated browser assets
app/js/ browser source modules for lazy js
app/styles/ Tailwind and stylesheet source
services/ application services and typed context helpers
.mise/tasks/ project scripts, service actions, and secrets helpers
.secrets/ development secret examples and SOPS recipient data
datasets/ optional local data snapshots created by lazy dump
test/ full application integration tests
Read Application Structure for the
full ownership model, Application Startup for
init, Controllers for request handling,
Views And Layouts for templates, and
Dependencies And Services for
application service wiring.
Understand mise
Generated apps use mise for local development tooling. It installs pinned
helper tools, exposes project environment variables to commands run through
mise, loads local overrides, and discovers task files under .mise/tasks.
Go itself is not installed through the generated app's mise.toml. Go already
has module-level version and toolchain support, and go install writes to a
user bin directory rather than installing a system-wide Go for the project.
Read Mise for dependencies, env variables, local overrides, SOPS secrets, and task conventions.
Start the app
Run the development loop from the app root:
lazy
lazy selects the app command, prepares configured services when present,
generates JavaScript assets for apps with js.toml, builds a temporary
lazydev binary, starts the app on an internal loopback address, proxies the
public address, serves the development panel at /_golazy/, watches files,
and reloads or restarts when source changes.
By default the public address is 127.0.0.1:3000:
ADDR=127.0.0.1:4000 lazy
Read Lazy for the full lifecycle, including service startup, generated assets, reload behavior, the development panel, and Ctrl-C shutdown.
Go next
- Mise for tools, env, secrets, and project tasks.
- Lazy for the development command and CLI subcommands.
- Services for local database and object-storage task conventions.
- Datasets for
lazy dumpandlazy load. - Full App for the generated app layout.
- First Route, Controller, And View for the first application change.