Getting Started

Installation

Get the CLI installed and start a project without guessing at the local setup.

Prerequisites

HAMR assumes a fairly normal Go development machine:

Why Docker?
The default dev path uses Docker Compose for Postgres. If you already run Postgres another way, point DATABASE_URL at it and ignore Docker entirely.

Install the CLI

If Go is already set up on your machine, install hamr like any other Go CLI:

terminal
go install github.com/FyrmForge/hamr/cmd/hamr@latest

Verify the install:

terminal
hamr version
Add Go bin to your PATH
If hamr isn't found, make sure $(go env GOPATH)/bin is in your $PATH.

Create a new project

Run hamr new to scaffold a project. You can answer prompts interactively, or pass the options up front:

terminal
hamr new myapp \
  --module github.com/yourname/myapp \
  --css tailwind \
  --storage local \
  --websocket \
  --e2e

The available scaffolding flags are:

FlagDescription
--moduleGo module path
--cssplain (design system) or tailwind
--storagenone, local, or s3
--websocketInclude WebSocket hub support
--e2eInclude E2E test scaffolding
--stripeInclude Stripe webhook handler
--pgadminInclude pgAdmin in Docker Compose

First run

Once your project is scaffolded:

terminal
cd myapp
make install        # Install templ and other dev tools
hamr dev            # Start file watching, hot reload, and the app

The dev server starts a reverse proxy on :3000 that injects live-reload SSE into your pages. Your app listens on :8080 behind it. Visit http://localhost:3000.

Behind the scenes
hamr dev is intentionally boring: one command for templ codegen, rebuilds, reloads, migrations, and Docker services.