ArchLint 0.1.1
Prefix Reserveddotnet tool install --global ArchLint --version 0.1.1
dotnet new tool-manifest
dotnet tool install --local ArchLint --version 0.1.1
#tool dotnet:?package=ArchLint&version=0.1.1
nuke :add-package ArchLint --version 0.1.1
ArchLint
Zero-config Clean Architecture guardrails for .NET. One command, free.
ArchLint scans your repository, classifies every project into its architectural layer by naming convention, checks project references against Clean Architecture dependency rules, and reports violations. No configuration required. No tests to write.
How it works
Projects are classified by naming convention: MyApp.Domain, Contoso.Infrastructure.Data, etc. Every project reference is then checked against the Clean Architecture dependency matrix:
| Layer | May reference |
|---|---|
| Domain | (nothing) |
| Application | Domain |
| Infrastructure | Domain, Application |
| Presentation | Domain, Application |
References within the same layer are always allowed. Projects whose names don't match any layer are reported as warnings and never fail the scan.
Quick start
# Install
dotnet tool install --global ArchLint
# Run against a directory
archlint .
archlint /path/to/MyApp
Example output
MyApp.Presentation → MyApp.Infrastructure.Data
Presentation may not reference Infrastructure
MyApp.Domain → MyApp.Application
Domain may not reference Application
2 violation(s) found across 4 project(s).
Exit codes
| Code | Meaning |
|---|---|
| 0 | No violations |
| 1 | Violations found |
| 2 | Error (for example, the path doesn't exist) |
In CI
- name: Check architecture
run: archlint .
The step fails the workflow when violations are found (exit code 1).
Why ArchLint?
ArchLint is the fast first pass. It deliberately works at the project-reference level, not the type level: it won't catch "controllers shouldn't touch repositories directly", but it will catch "Presentation references Infrastructure" before it reaches main. Install it, run it, get results.
Who it's for
.NET teams using Clean Architecture (or similar layered architectures) who want project-level dependency guardrails without writing and maintaining architecture tests. Also: teams whose AI coding assistants keep introducing references to the wrong layer.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.