CLI command
analyze
Collect a current snapshot of a solution without writing files so teams can learn the shape before they automate anything.
Command contract
Use analyze for the first read. It prints the current solution shape, complexity, and primary-path signal without creating artifacts.
First-run learning, local spot checks, and CI jobs that only need the current picture.
No. It prints a summary to stdout only.
Returns 0 on success. Returns 1 for usage errors or analysis failures.
Usage
Start with the exact command shape the CLI supports today.
dotnet simplicity analyze path/to/YourSolution.sln Healthy first pass
Run it on a compact sample before pointing the tool at a production solution.
dotnet simplicity analyze samples/Sample.Simplified/Sample.Simplified.sln Baseline-free CI read
Use analyze on every branch even before you decide whether diff should block merges.
dotnet simplicity analyze YourSolution.sln What it prints or produces
The summary is intentionally compact, but it still covers the core structural, code, and onboarding signals.
- Total projects and countable source files.
- Primary-path file count plus abstraction layer count.
- Single-implementation interfaces, external dependencies, and unused dependencies.
- Average method complexity and estimated onboarding time.
- A warning instead of a hard failure when simplicity.json is missing.
Warning: simplicity.json was not found in '/path/to/solution'. Using built-in defaults for TCA inputs and filter thresholds.
Simplicity Snapshot (2026-05-01)
----------------------------------------
Projects: 2
Total files: 23
Primary path files: 5
Abstraction layers: 1
Single-impl interfaces: 0
External deps: 0 (0 unused)
Avg complexity: 1.4
Est. onboarding: 0h Operational notes
These behaviors matter when you move from a local run to team automation.
- The structural project count includes all C# projects, but semantic and primary-path passes skip test projects for abstraction, dependency, and primary-path heuristics.
- Primary-path detection prefers explicit [PrimaryPath] annotations and falls back to Controllers, Endpoints, Handlers, and Pages folders plus reference-based heuristics.
- analyze is the safest command to run everywhere because it does not depend on a baseline or write output folders.
Related pages
Use the surrounding docs when you need setup, filter interpretation, or CI context.