Getting Started
Forge is a Go web framework built around content modules. Define a struct, embed forge.Node, and Forge wires routing, storage, feeds, and AI indexing automatically.
This guide assumes Go 1.26.2 or later. Run
go version to check your toolchain before proceeding.Install
Add Forge to your Go module:
terminal
go get forge-cms.dev/forgeDefine a content type
Content types are plain Go structs embedding forge.Node:
post.go
type Post struct {
forge.Node
Title string `forge:"required,min=3"`
Body string `forge:"required"`
Tags []string
}Wire a module
Pass the struct to forge.NewModule inside app.Content:
main.go
app.Content(forge.NewModule((*Post)(nil),
forge.Repo(forge.NewSQLRepo[*Post](db)),
forge.At("/blog"),
forge.Templates("templates/blog"),
))Run
terminal
go run .Your list page is at /blog, individual posts at /blog/{slug}. The REST API and MCP tools are available immediately — no extra configuration needed.