Go · Static analysis · TOML rules

See every caller.
Enforce every rule.

gorefact is a Go call-graph and dependency explorer. Show full reference trees for any package or symbol, and enforce architectural rules defined in a simple TOML file.

What it does

One binary. Three jobs.

An explorer for reference trees, a linter for your architecture, and a long-lived server for editor integrations.

gorefact inspect

Interactive TUI or structured output showing full reference trees for any package or symbol.

gorefact check

Batch dependency violation check against TOML [[deny]] rules.

gorefact serve

Long-lived JSON-RPC server consumed by the first-party Neovim plugin.

Pick your format

Text, JSON, Markdown, or Vim quickfix — pipe into jq, less, or your editor.

Install

Get gorefact in 30 seconds

Pick the install path that matches your setup.

Tap the repo and install:

brew tap flaticols/apps
brew install flaticols/apps/gorefact

Install globally with go install:

go install go.flaticols.dev/gorefactor/cmd/gorefact@latest

Or pin it per-module as a Go tool dependency (Go 1.24+):

go get -tool go.flaticols.dev/gorefactor/cmd/gorefact@latest
go tool gorefact inspect ./...

Install into your profile:

nix profile install github:flaticols/gorefactor

Or wire it up as a flake input:

inputs.gorefactor.url = "github:flaticols/gorefactor";

macOS archives (amd64, arm64):

Download the latest .tar.gz from the releases page, extract, and drop gorefact onto your $PATH.

Rules

Describe your architecture in TOML

A gorefact.rules.toml at the repo root is all you need. Rules match against the short package name — no regex, no AST.

gorefact.rules.toml

[[deny]]
from   = "tasks"
to     = "adapters"
reason = "tasks must not depend on adapters"

[[deny]]
from   = "handler"
to     = "repository"
reason = "handlers must go through service layer"

Run it

# validate the rules file itself
gorefact validate-rules \
  --rules gorefact.rules.toml

# check the whole module
gorefact check \
  --rules gorefact.rules.toml ./...

# editor-friendly quickfix
gorefact check --format qf ./...