GoForge — Build | Test | Ship | Collaborate GoForge — Build | Test | Ship | Collaborate

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.

$ go install goforge.dev/goforge@latest

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 info

Worker types, enforced

Every component is classified along two orthogonal axes. check propagates them through the dependency closure and rejects illegal dependencies.

deterministic
pure
deterministic
[input_effect]
deterministic
[output_effect]
deterministic
[input, output]
non_deterministic
pure
non_deterministic
[input_effect]
non_deterministic
[output_effect]
non_deterministic
[input, output]

2 × 4 = 8 worker types. Full explanation →

A command for every step

CommandPurpose
createScaffold a workspace, component, base, or project
infoBrick × project matrix, with changed bricks/projects marked (:loc for line counts)
checkValidate structure, the interface boundary, worker-type rules, and project deps
classifyDeclared vs. effective worker type per brick
depsBrick dependencies, forward and reverse (brick: / project:)
diffFiles, bricks, and projects changed since the stable point (since:)
testRun tests for changed bricks/projects (:all, :dev, brick:, project:)
libsThird-party libraries and which bricks use them
wsWorkspace as YAML data (get:KEY.PATH, out:FILE)
migrateBootstrap goforge config for an existing Go module
shellInteractive command shell
version / helpTool version / usage

Full command reference

Documentation