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
An explorer for reference trees, a linter for your architecture, and a long-lived server for editor integrations.
Interactive TUI or structured output showing full reference trees for any package or symbol.
Batch dependency violation check against TOML [[deny]] rules.
Long-lived JSON-RPC server consumed by the first-party Neovim plugin.
Text, JSON, Markdown, or Vim quickfix — pipe into jq, less, or your editor.
Install
Pick the install path that matches your setup.
brew tap flaticols/apps brew install flaticols/apps/gorefact
go install:go install go.flaticols.dev/gorefactor/cmd/gorefact@latest
go get -tool go.flaticols.dev/gorefactor/cmd/gorefact@latest go tool gorefact inspect ./...
nix profile install github:flaticols/gorefactor
inputs.gorefactor.url = "github:flaticols/gorefactor";
amd64, arm64):
Download the latest .tar.gz from the
releases page,
extract, and drop gorefact onto your $PATH.
Rules
A gorefact.rules.toml at the repo root is all you need.
Rules match against the short package name — no regex, no AST.
[[deny]] from = "tasks" to = "adapters" reason = "tasks must not depend on adapters" [[deny]] from = "handler" to = "repository" reason = "handlers must go through service layer"
# 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 ./...