Graph from source
Reads imports, workspace manifests and lockfiles. No build required, so it runs in a two-minute CI job.
Northline walks a repository, builds a graph of modules and packages, and compares it against rules you keep in version control. One static binary, no agents, no runtime to install.
# beta build, preinstalled in the pilot runner image
northline --version
# check the graph against .northline.yaml
northline check --config .northline.yaml --fail-on new
# 12 edges checked, 1 violation (payments -> billing/internal)
Reads imports, workspace manifests and lockfiles. No build required, so it runs in a two-minute CI job.
Allow and deny lists per layer, per package, per team. Rules live next to the code and are reviewed like everything else.
--fail-on new fails only on edges introduced by the branch, so legacy debt
does not block the team.
Reports strongly connected components and packages nobody imports — usually dead code waiting to be deleted.
Upload findings to GitHub code scanning or any SARIF viewer; each violation points at the exact import line.
No telemetry, no registry lookups. The binary reads the checkout and writes a report.
# .northline.yaml
layers:
- name: domain
paths: ["src/domain/**"]
- name: infra
paths: ["src/infra/**"]
rules:
- from: domain
deny: [infra] # domain must not import infra
- from: "pkg/payments/**"
deny: ["pkg/billing/internal/**"]
Exit codes: 0 clean, 1 violations, 2 config error.
Install, write the first rule, wire it into CI — about ten minutes.
Layers, rules, ignore lists and how paths are resolved in monorepos.
Every flag, exit code and output format, including SARIF and JSON.