Get started · v0.10.0

From cold machine to a running app in four minutes.

Install the CLI, scaffold an app, declare an entity, run it. Every command in this guide is real — paste it into a terminal and it works.

Prereqs
Go 1.26+, git
OS
macOS, Linux, Windows (WSL)
Storage
SQLite by default, Postgres opt-in
Time
~4 minutes
01

Install

~30s

One binary covers scaffold, migrate, dev, build, test, and the doc browser. Get it from GitHub:

$ install
$ go install github.com/DonaldMurillo/gofastr/cmd/gofastr@latest → installed gofastr v0.10.0 to ~/go/bin

Verify it's on your PATH with gofastr --version.

02

Scaffold

~45s

Scaffold a new project — it writes a working main.go, theme.go, and an empty entities directory.

$ scaffold
$ gofastr init blog → wrote blog/main.go, blog/theme.go, blog/entities/ → go.mod created with module "blog" → next: cd blog && go run .

Open the scaffolded main.go — it's about 30 lines. Read it.

03

First entity

~60s

Declare your first entity in Go. One call generates SQL, REST, MCP, OpenAPI, and a typed query builder.

blog/main.go
7 lines
  app.Entity("posts", framework.Entity{    Fields: framework.Fields{      "title": f.String().Required(),      "body":  f.Markdown(),    },    Timestamps: true,  })

That's the whole declaration. No migrations file. No schema yaml. Just Go.

04

Run it

~15s

Start the app. The framework auto-migrates the SQLite schema, mounts /posts, /openapi.json, /mcp, and a livereload SSE stream.

$ run
$ go run . → HTTP on http://localhost:8080 → migrated posts (1 table) → /openapi.json + /mcp ready

In a second terminal, hit the API to prove it works:

$ probe
$ curl -s -X POST http://localhost:8080/posts \ -H 'content-type: application/json' \ -d '{"title":"Hello","body":"world"}' {"id":"01J7…","title":"Hello","body":"world",…}
05

First page

~60s

Add a server-rendered page. Screens are normal Go structs: Load(ctx) fetches, Render() returns the markup. They live alongside main.go.

blog/screen_posts.go
8 lines
func (s *PostsScreen) Load(ctx context.Context) {  s.posts, _ = posts.Query(ctx).List(20)  // fetch in Load}func (s *PostsScreen) Render() render.HTML {  return html.Div(html.DivConfig{},    /* render each post in s.posts */  )}
06

What you have

now

In four minutes you've stood up an app with full HTTP + agent surface area:

Running, on disk, queryable, agent-driven

  • Versioned SQL migrations
  • REST CRUD + cursor pagination
  • OpenAPI 3 + Swagger UI
  • MCP tools at /mcp
  • Typed Go query builder
  • Hot-reload dev SSE