GoForge
Polylith-style workspaces for Go
Build | Test | Ship | Collaborate. GoForge is a Polylith-style workspace discipline for Go and a suite of open-source tools forged with it — from spec-to-test generation and trunk guardrails to hex editors, hashing, and web runtimes.
GoForge organizes a single Go module into reusable bricks: components (with
a public interface package and a hidden internal/ implementation) and bases
(entry-point layers), composed into deployable projects. It scans the
workspace, derives the brick dependency graph from Go imports, detects what
changed since a stable git point, and validates and tests incrementally.
The current release is v1.4.1. GoForge’s worker-type vocabulary is now
authored in Go+ with exhaustive enum handling, generated Go is checked in, and
workspace discovery, classification, and CI understand .gp sources. Newly
created workspaces also include AGENTS.md/CLAUDE.md guidance for AI-assisted
development.
go install goforge.dev/goforge@latest resolves to its source repository via the
Go vanity import path served from this site.
One module. Many bricks.
Components & bases
Split each brick into a public interface package and a hidden internal/ implementation, then compose bricks into deployable projects.
Import-derived graph
No hand-maintained manifests. GoForge derives the brick dependency graph from your actual Go imports.
Incremental check & test
Detect what changed since a stable git point, then validate and test only the affected bricks and projects.
Worker-type enforcement
Classify bricks by determinism and effectfulness; check enforces effect propagation across the dependency closure.
Scaffold a workspace in seconds
goforge create workspace name:demo top-ns:com.demo module:goforge.dev/demo
cd demo
goforge create component name:user
goforge create base name:cli
goforge create project name:app
goforge check
goforge infoWorker types, enforced
Every component is classified along two orthogonal axes. check propagates them through the dependency closure and rejects illegal dependencies.
2 × 4 = 8 worker types. Full explanation →
A command for every step
| Command | Purpose |
|---|---|
| create | Scaffold a workspace, component, base, or project |
| info | Brick × project matrix, with changed bricks/projects marked (:loc for line counts) |
| check | Validate structure, the interface boundary, worker-type rules, and project deps |
| classify | Declared vs. effective worker type per brick |
| deps | Brick dependencies, forward and reverse (brick: / project:) |
| diff | Files, bricks, and projects changed since the stable point (since:) |
| test | Run tests for changed bricks/projects (:all, :dev, brick:, project:) |
| libs | Third-party libraries and which bricks use them |
| ws | Workspace as YAML data (get:KEY.PATH, out:FILE) |
| migrate | Bootstrap goforge config for an existing Go module |
| shell | Interactive command shell |
| version / help | Tool version / usage |