Skip to main content

arch_guard 1.19.0 copy "arch_guard: ^1.19.0" to clipboard
arch_guard: ^1.19.0 copied to clipboard

A CLI tool and Dart library for static architecture analysis, Clean Architecture layer governance, circular dependency metrics, and graph visualization.

1.19.0 #

  • New: --group-by layer|module|package|folder, the architecture at a glance. The Mermaid, DOT and HTML exports draw one node per layer, module, workspace package or folder (the first folder under lib/) instead of one per file. Each node shows its file count, each edge the number of imports between the two groups, and an edge with layer, module or workspace rule violations is red with their count. Files in no group are collected under (none). The HTML report opens on the grouped graph; a button switches to the file graph, and clicking a group lists its files and its imports in and out. --group-by implies --scope all; pass --scope cycles to group only the files in cycles. A warning says when no -f dot, html or mermaid export was requested, or when no layers or modules are configured. Recipe for a diagram in your README that CI keeps current: Architecture diagram. Library: GroupedGraph, GroupEdge, groupByValues, MermaidExporter.exportGrouped, DotExporter.exportGrouped, HtmlExporter.export(grouped:).

1.18.0 #

  • New: arch_guard mcp, an MCP server for AI coding agents. Claude Code, Cursor, Codex and other Model Context Protocol clients can ask arch_guard before writing code instead of after: claude mcp add arch_guard -- dart run arch_guard mcp. Tools: check (every rule, like the CLI: failures, report-only problems and warnings, optional since), check_import (may this file import this URI? each broken layer, module, workspace or forbidden-package rule with its fix; the file need not exist yet), layer_of (a file's layer, module, workspace package and what it may import), why, affected (same data as affected --json) and explain. Each call scans again, so answers stay correct while the agent edits files. Stdout carries only JSON-RPC; warnings go into the results. Takes [project_path], --scan-dir, --exclude and --[no-]workspace. Setup for each client is on the AI agents page.

1.17.0 #

  • // ignore: arch_guard_lint/workspace_violation now hides a workspace rule violation from the CLI, CI and expectArchitecture(), as the new workspace_violation warning in arch_guard_lint 0.4.0 does in the IDE. That plugin release also adds module_violation. Library: WorkspaceValidator.checker, WorkspaceValidator.memberResolver, IgnoreComments.workspaceViolation.

1.16.0 #

  • New: module boundaries. A modules: section keeps feature folders apart on top of your layer rules. Each folder matched by roots (for example lib/features/*) is a module, named after the folder. Other modules may import it only through its public files: by default the files directly in the module folder, such as a cart.dart barrel, or the globs under public. allowed: {checkout: [cart]} also limits which modules a module may import at all. Imports inside a module, and to or from files outside every module, are never checked. A module's own barrel may re-export its private files. Each offending import fails the run (exit 1) and is reported in the terminal, JSON (moduleViolations), SARIF (rule module-violation) and Markdown. The rule works with the baseline, --since, expectArchitecture() and // ignore: arch_guard_lint/module_violation. In a workspace, roots also match from each member's lib/. You get a warning for a root that matches no folder and an allowed name that is not a module. arch_guard init writes a commented-out modules: block when it picks a layer preset and finds feature folders. The JSON Schema covers the new key. Example: example/cases/modules. The IDE plugin does not show module violations yet. Library: ModuleValidator, ModuleViolation, Module, ModuleRules, ArchGuardConfig.modules, modulesKeys, ArchAnalysis.moduleViolations, newModuleViolations, Baseline.moduleViolations, moduleViolationKey, BaselineComparison.newModuleViolations, knownModuleViolations, fixedModuleViolationCount, isNewModuleViolation, SarifExporter.moduleViolationRule, IgnoreComments.moduleViolation.

1.15.0 #

  • New: install without Dart. curl -fsSL https://creatorpiyush.github.io/arch_guard/install.sh | sh installs the release binary for Linux (x64, arm64), macOS (Apple Silicon) or Windows (Git Bash) into ~/.local/bin, after checking it against the release's SHA256SUMS.txt. ARCH_GUARD_VERSION pins a release and ARCH_GUARD_INSTALL_DIR changes the folder. Running it again upgrades. On a platform with no binary it says so and points to dart pub global activate arch_guard. The GitHub Action now installs through the same script.
  • Docs: the getting-started page and the README offer two install paths, with Dart and without Dart (the install.sh binary installer). The Dart SDK requirement now applies only to the first.
  • New pre-commit hook arch_guard-system. It runs the arch_guard on your PATH (language: system), so teams that installed the binary don't need the Dart SDK. The existing arch_guard hook still compiles from source.
  • New: JSON Schema for arch_guard.yaml. VS Code (YAML extension) and IntelliJ now complete config keys, list the presets and flag a wrong key or type as you type. arch_guard init writes # yaml-language-server: $schema=https://creatorpiyush.github.io/arch_guard/arch_guard.schema.json as the first line; add it by hand to an existing file. The schema does not cover the arch_guard: section in pubspec.yaml. Library: ArchGuardConfig.schemaUrl, metricsKeys, unusedFilesKeys.
  • New: --json. arch_guard --json prints the JSON report (the same as -f json) to stdout and nothing else, so a script or AI agent can read it without knowing the output folder: arch_guard --json | jq '.layerViolations'. The usual report and warnings go to stderr, other -f formats are still written, and the exit code is unchanged. It cannot be combined with --watch or --explain (exit 64).

1.14.1 #

  • Fix: links that arch_guard writes now open a page section that exists. The # Reference: line in an arch_guard.yaml generated by arch_guard init, and the help link of each SARIF rule, pointed at a README heading that was renamed. They now open the matching section of the docs site: layer, forbidden-package, metric, workspace and cycle-size rules link to their part of the configuration page, and circular-dependency links to Fix a cycle in the CLI reference. Configs generated earlier keep the old comment; nothing else changes.

1.14.0 #

  • New: arch_guard affected. arch_guard affected --since origin/main prints the test files that the branch's changes can affect, one per line, so you can run only those: t=$(arch_guard affected --since origin/main); [ -n "$t" ] && dart test $t. It scans lib/, test/ and integration_test/ of the root and each workspace member, and walks imports, exports and part directives backwards from each changed file, including ignored and conditional imports. A deleted, renamed or generated file (*.g.dart, *.mocks.dart) affects the files that import it. Tests in a workspace root without lib/ are scanned too. A changed pubspec.yaml or pubspec.lock affects its whole package (the root one affects everything). --print files and --print packages list affected files or package names instead (melos exec --scope=...). --json prints all lists. Changed non-Dart files are listed in a note on stderr. With nothing affected, stdout is empty and stderr says No affected tests. Exits 0, or 2 when git fails, or 64 without --since.
  • New: arch_guard why. arch_guard why lib/domain flutter prints the shortest import path from a file or folder to a file, folder or package, one file:line import target line per step. Arguments can be a file, a folder, a file name that matches one file, package:x, a bare package name or dart:io. A package: URI into the project's own packages (package:app/data/api.dart) names those files. With no path it prints No import path from ... to .... and exits 1, so CI can assert that a path never appears. An unknown or ambiguous argument exits 64.
  • --since sees renames. A file renamed on the branch now counts as changed under its old path too.
  • --watch now rejects every subcommand (init, affected, why) with exit 64.

Library: ProjectScanner.memberScanDirs, AffectedFiles, AffectedResult, ImportPath, ImportStep, PathTarget, FileTarget, PackageTarget.

1.13.0 #

  • New: --watch. arch_guard --watch runs the check, then runs it again whenever a scanned .dart file, arch_guard.yaml, a pubspec.yaml or the baseline changes, until Ctrl+C. Adding, moving, renaming or deleting a folder of Dart files counts too. Changes under build/ and dot folders (.dart_tool, .git) are ignored, so reports written into the project don't trigger a loop. Rapid saves are merged into one run (300 ms debounce), and a change during a run causes one more run after it. All other flags work as usual. It cannot be combined with --update-baseline, --explain or init (exit 64). Ctrl+C exits 0.

1.12.0 #

  • Faster runs on large projects. A full run is 10–40% faster: 5,000 files went from 0.66 s to 0.40 s, and a 200-package workspace with 20,000 files from 2.1 s to 1.6 s. Cycle hints no longer scan every import once per cycle group, the hint search uses integer indexes, and the default excludes skip glob matching. Reports are byte-for-byte the same. Library: ProjectScanner.excludeMatcher.
  • New: unused files. Add unused_files: to the config to list scanned files that no entry point reaches through imports, exports or part directives, directly or indirectly. A group of files that only import each other is reported too. Entry points are lib/main.dart and lib/main_*.dart, bin/, test/, integration_test/, tool/, example/, *_test.dart and each package's lib/<name>.dart, in the root and in each workspace member, plus any globs under entry_points:. With fail: true unused files fail the run, otherwise they are only listed. A baseline records them, so only new unused files fail. With --since, only changed files are reported. When no file is an entry point, you get a warning instead of a list of every file. Reported in the terminal, JSON (unusedFiles), SARIF (rule unused-file) and Markdown. Off by default. It adds about 2 ms per 1,000 files. Library: UnusedFiles, ArchAnalysis.unusedFiles, newUnusedFiles, ArchGuardConfig.unusedFilesEnabled, unusedFileEntryPoints, failOnUnusedFiles, Baseline.unusedFiles, BaselineComparison.newUnusedFiles, knownUnusedFiles, fixedUnusedFileCount, SarifExporter.unusedFileRule.

1.11.0 #

  • The CLI honours // ignore: arch_guard_lint/<code>. An import silenced in the IDE with // ignore: arch_guard_lint/layer_violation, forbidden_package or circular_dependency (or // ignore_for_file:) is now also left out by the CLI, CI and expectArchitecture(). Before, the IDE stayed quiet while CI still failed. The comment works as in the analyzer: alone on its line it applies to the next line, after code it applies to its own line. An ignore on an import of a barrel also hides the violation reported through it. In a conditional import, a comment above an if (...) 'uri' line applies to that URI, matching where the IDE reports it. An ignored circular_dependency import is left out of cycle detection, the Suggested fix: hint and --explain, but still appears in the JSON and graph exports. Library: IgnoreComments, GraphEdge.ignored, PackageImport.ignored, DependencyGraph.edges, ExtractedDirective.uriLine.

1.10.1 #

  • Workspace entries with ./ or a trailing slash now match. A root pubspec.yaml listing workspace: [./packages/a, packages/b/] skipped those members, so the scan found 0 files and reported no cycles. Entries are now normalized before matching.
  • Warning when nothing was scanned. A run that scans 0 Dart files now prints Warning: No Dart files were scanned. ... with the likely causes: run from the wrong folder, or members outside packages/ or apps/ that are not listed under workspace:. Before, it reported 0 cycles and passed silently.

1.10.0 #

  • Layer rules see through barrels. When a layered file imports a file in no layer that re-exports another layer (lib/exports.dart with export 'data/dto.dart';), the import is now checked against what the barrel re-exports. Chains of such barrels are followed. Before, the barrel was skipped, so domain -> exports.dart -> data passed. The violation reads ... -> [data] lib/data/dto.dart (via lib/exports.dart). With --since, a change to the barrel also reports it. Library: LayerViolation.via, viaSuffix; LayerValidator.checker takes via.
  • Platform-specific cycles. A cycle that exists only through conditional imports is now marked Platform-specific (only through conditional imports: if (dart.library.io)) in the terminal, Markdown, SARIF and JSON (platformConditions). It still counts as a cycle. Edges from conditional imports carry their condition in the JSON export. Library: GraphEdge.condition, ExtractedDirective.condition, Cycle.platformConditions, isPlatformSpecific, platformNote.

1.9.2 #

  • Baseline flags improvements to lock in. A known cycle group that lost files or split, or a known metric value that dropped, is now reported as N cycle group(s) shrank / N metric value(s) dropped since the baseline. Run with --update-baseline to lock this in. in the terminal and Markdown report. Before, only problems that disappeared entirely were reported, so a shrunk cycle could quietly grow back to its saved size. Library: BaselineComparison.shrunkCycleCount, improvedMetricCount, improvements.
  • Docs: updating the baseline is manual; "no regression" is measured against the saved baseline, not the last passing run.

1.9.1 #

  • Baseline says why a cycle is new. Each new cycle in the terminal and Markdown report now ends with a reason: grew from a known 3-file cycle, adding lib/d.dart, merges 2 known cycles, or none of its files is in a baseline cycle. Library: BaselineComparison.newCycleReasons.
  • Docs: the cycle rule is spelled out. The baseline compares cycle membership, not the imports inside a cycle. With a baseline cycle a -> b -> c -> a, adding a -> c still passes. A test pins this down.

1.9.0 #

  • init handles hybrid layouts. When it picks riverpod or clean_architecture and also finds bloc/ or cubit/ folders, the generated config adds a bloc layer that may import what presentation may, and lets presentation import it. A bloc that imports UI code is still a violation. Library: LayoutDetection.blocFolders.

1.8.0 #

  • New: ProjectScanner.scanSources(). Builds a ScanResult from in-memory file contents instead of the file system. The arch_guard_lint 0.2.0 plugin uses it for live cycle warnings that include unsaved editor changes.

1.7.1 #

  • --since output:
    • The "Only problems touching N file(s)…" note now comes before the report, so "No circular dependencies found!" reads as "none in the changed files".
    • N counts only scanned files (not pubspec.yaml, assets…). ArchAnalysis.changedFiles itself now holds only scanned files too, so deleted and non-Dart files are no longer in it. Filtering is unchanged.
  • JSON export: with --since, the export now records since and changedFiles.
  • Errors and warnings:
    • With git older than 2.30, --since now says it needs git 2.30+ instead of showing git's raw error.
    • --no-workspace with workspace_rules now says the rules are ignored because of the flag, not that the project isn't a workspace.
  • Cycle hints: when two files are joined by both an import and an export, the hint points at the first of those lines.
  • metrics: hotspots alone: a config with only hotspots (no limits) now lists the most coupled files in the terminal. New: ArchGuardConfig.metricsConfigured.
  • workspace_rules: a rule whose allowed entries are all invalid globs is now skipped with a warning, so that member is unrestricted until the globs are fixed. Before, it silently forbade every import. An explicit allowed: [] still means "no other members".
  • Unreadable files: warnings about files that couldn't be read are listed in a stable order.

1.7.0 #

  • New: cycle-breaking hints. Each circular-dependency group now names the one import whose removal breaks it (or shrinks it most), in the terminal, Markdown, SARIF and JSON (scc.suggestedBreak). Library: CycleBreaker, CycleBreak.
  • New: --since <git-ref>. Reports (and fails on) only problems touching files changed since the merge base with a ref, plus uncommitted and untracked files, while still analysing the whole project. Baseline "fixed" counts stay accurate. Also available as expectArchitecture(since:) and ArchAnalysis.run(since:). Needs full history in CI (fetch-depth: 0).
  • Docs: an example project for every feature. example/example.md (pub.dev's Example tab) links to small projects in example/cases/: cycles, layers, presets, forbidden packages, metrics, workspace rules, baselines, --since, architecture tests and reports. Each README has the config, the command and its real output. example/example.dart covers the library API. The CLI and testing docs gain --since and cycle-fix recipes.

1.6.0 #

  • New: metric limits. metrics: max_fan_out / max_fan_in fail the run when a file imports, or is imported by, too many project files. Baselines ratchet: a known file that gets worse fails again. Reports list the most coupled files (hotspots, default 10) in Markdown and JSON, and in the terminal when limits are set. SARIF rule metric-limit. Library: FileMetrics, MetricValidator.
  • New: workspace_rules. In a Dart workspace or packages//apps/ monorepo, declare which members may import which (apps/* → packages/*, never the reverse). Violations point at the import line, fail the run, and work with baselines, SARIF (workspace-dependency), Markdown and JSON. Library: WorkspaceValidator, WorkspaceViolation, ScanResult.packages.
  • Fixed: unstable cycle order. Files and edges are now sorted, so cycle numbering and every report are identical between runs.
  • Baseline files gain metricViolations and workspaceViolations lists. Older baselines still load.

1.5.0 #

  • New: forbidden_packages. Rule out packages and core libraries for the whole project (top-level key) or per layer (e.g. domain may not import flutter or dart:io). Entries are package names or globs (firebase_*). Violations fail the run, point at the import line, and work with baselines, SARIF (forbidden-package rule), Markdown and JSON reports.
  • Library: PackageValidator, PackageViolation, PackageImport and ScanResult.packageImports; LayerValidator.layerResolver() is now public.
  • Baseline files gain a packageViolations list. Older baselines still load.
  • Invalid globs in arch_guard.yaml (ignore, layer patterns, forbidden_packages) are reported as warnings and skipped instead of crashing the run. defaultExcludePatterns is now exported.
  • New: expectArchitecture() in package:arch_guard/testing.dart runs the same checks as the CLI inside dart test / flutter test and fails with a readable list of problems. Works with any test runner; no extra dependencies.
  • Library: ArchAnalysis.run() runs a full analysis (scan, cycles, layer and package rules, baseline) in one call; the CLI now uses it.
  • Library: ArchGuardConfig.loadWith() loads configuration through a custom file reader, and LayerValidator.checker() checks a single import. Both are used by the new arch_guard_lint analyzer plugin.

1.4.1 #

  • Fixed: empty graph in the HTML report. The page layout could let the graph canvas grow taller than the window, drawing the nodes out of view. The report header now says arch_guard instead of the old "Dependency Graph Visualizer" name.
  • New: documentation site at creatorpiyush.github.io/arch_guard, with a recipe per preset, the configuration reference, CI and git hook guides, and the CLI reference. The README is shorter, with screenshots and a comparison with similar tools.
  • Every public API member now has a doc comment, and pubspec.yaml links the documentation and issue tracker.
  • Contributor guide, security policy, and issue and pull request templates.

1.4.0 #

  • New: arch_guard init. Detects the project layout (Clean Architecture, Riverpod, Bloc or feature-first folders), writes a starter arch_guard.yaml, and previews the first scan: files per layer, violations, cycles, and the suggested next step. Options: --preset <name|auto|none>, --dry-run, --force.
  • New: Layer presets. preset: clean_architecture | feature_first | bloc | riverpod in the config expands to predefined layers. Entries under layers: override a preset layer key by key (for example only allowed_imports) or add new layers. feature_first discovers features from lib/features/* (or lib/modules/*) on every run, so each feature may import only itself and shared code.
  • Improved: Actionable layer violations. Each violation now shows the rule it broke (Rule: `presentation` may only import `core`, `domain`, `presentation`.) and the output ends with how to fix it. SARIF and Markdown reports include the rule too; LayerViolation gains allowedImports, rule and suggestion, and the JSON report includes allowedImports.
  • Preset layers that match no files no longer produce "matched no scanned files" warnings.
  • Library: ArchGuardConfig.parse() reads configuration from a string; LayerCoverage.layerFileCounts counts files per layer; LayerPresets and LayoutDetector are exported.
  • A bad option to arch_guard init now prints the init usage instead of the main one.

1.3.0 #

  • New: Baselines for legacy projects. --update-baseline records today's circular dependencies and layer violations in arch_guard_baseline.json. When that file exists, later runs fail only on new problems: a known cycle may shrink, but one that grows or merges with another counts as new. Fixed entries are reported so the baseline can be tightened. Use --baseline <path> for a different location. Library users get Baseline and BaselineComparison.
  • New: SARIF output (-f sarif) writes arch_guard.sarif (SARIF 2.1.0) for GitHub Code Scanning, Azure DevOps and SARIF viewers in IDEs. Results point at the offending import line, use paths relative to the git repository root, and carry baselineState when a baseline is in use.
  • New: Markdown summary (-f markdown) writes arch_guard_report.md: new problems first, then a collapsible Mermaid graph of the cycles. Ready for PR comments and CI job summaries.
  • New: GitHub Action. uses: creatorpiyush/arch_guard@v1.3.0 downloads the checksum-verified release binary, writes the Markdown summary to the job summary, keeps one up-to-date PR comment, and can upload SARIF to Code Scanning.
  • New: pre-commit hook. The repository ships a .pre-commit-hooks.yaml, and the README has recipes for pre-commit, lefthook and plain git hooks.
  • New: --version flag and the packageVersion constant.
  • Layer violations, graph edges and directives now record the source line (LayerViolation.line, GraphEdge.line, ExtractedDirective.line); the JSON report includes it.
  • -f all now also writes the SARIF and Markdown reports.
  • Local-only files (plan.md, IDE files, build/) are no longer included in the published package.

1.2.1 #

  • Wider compatibility: minimum Dart SDK lowered from 3.11 to 3.8 (Flutter 3.32+), so projects on older toolchains can add arch_guard as a dev dependency.
  • New: Standalone binaries: every GitHub Release now includes prebuilt executables for Linux (x64, arm64), macOS (Apple Silicon) and Windows (x64) plus a SHA256SUMS.txt, so CI pipelines can run arch_guard without installing the Dart SDK.
  • CI: Tests run on Linux, macOS and Windows against both the minimum supported SDK (3.8) and the latest stable SDK.
  • Fix: Publish workflow ran twice per release: publishing to pub.dev is now triggered by version tags only.
  • Removed the Flutter .metadata file from the repository.

1.2.0 #

  • Fix: --scan-dir was ignored whenever workspace discovery was on (the default). A single-package project is no longer treated as a workspace, and in workspace mode the root package honours --scan-dir.
  • Fix: Over-eager workspace auto-discovery: without a workspace: list, only packages/ and apps/ are searched, and example/, test/ and tool/ packages are skipped. Previously example/ apps and test fixtures were scanned and could report false cycles. Monorepos with other layouts should declare a workspace: list.
  • Fix: Phantom graph nodes: edges are only kept when their target file was actually scanned.
  • New: max_scc_size is enforced: any circular-dependency group larger than the limit fails the run (exit code 1), even with --no-fail-on-cycle.
  • New: Configuration warnings: unparseable YAML, unknown keys, wrongly typed values, allowed_imports naming unknown layers, layers that match no files, files that belong to no layer, and unreadable source files are now reported on stderr instead of being silently ignored. LayerValidator.coverage(), ArchGuardConfig.warnings and ScanResult.skippedFiles expose the same data to library users.
  • New: part directives produce library -> part edges (type part, drawn dotted in DOT/Mermaid/HTML); FileNode.parts lists them.
  • Improved: Directive parser now reads the directive section token by token, so // or /* inside URIs or comments, nested block comments, annotations and import-like text inside later string literals no longer cause wrong results.
  • Security: HTML report escapes file paths before inserting them into the page and escapes <, > and & in the embedded JSON.
  • Rename: DepGraphConfig is now ArchGuardConfig (the old name remains as a deprecated alias). The legacy dep_graph.yaml file and dep_graph_visualizer: pubspec key still work but emit a deprecation warning; the example now uses arch_guard.yaml.
  • Tests write CLI output to a temporary directory instead of example/sample_project/build/.

1.1.3 #

  • Fix: Layer validator now works correctly in workspace/monorepo mode (LayerValidator): Layer glob patterns such as lib/domain/** were silently never matching workspace-prefixed file paths (e.g. packages/auth_pkg/lib/domain/entity.dart). The validator now also tests the lib/… suffix of each path, making single-package and workspace arch_guard.yaml configs interchangeable with no user-side changes required.
  • Fix: Cross-package edge resolution path separator on Windows (ImportReader.resolveUri): p.normalize(p.join(…)) could produce backslash-separated paths on Windows, causing all resolved edge targets to silently miss the forward-slash-keyed filesMap and disappear from the graph. All three return paths now force / separators.
  • Fix: Missing space in workspace summary line (TextReporter): The Workspace Pkgs: line was missing a space before the count, producing misaligned output (e.g. Workspace Pkgs:3 instead of Workspace Pkgs: 3).

1.1.2 #

  • True --offline HTML Support: Inlined Base64-encoded vis-network.min.js (v10.1.0 UMD) asset and system font fallbacks when --offline flag is specified.
  • Physics Stabilization Freeze: Added stabilizationIterationsDone event listener to freeze Vis-Network force calculation after stabilization to eliminate CPU background spin.
  • Mermaid Exporter Disambiguation: Added shared ID map with numeric suffix disambiguation for colliding file paths (e.g. a-b.dart vs a_b.dart) and quote label sanitization (#quot;).
  • Attribution & Notices: Added THIRD_PARTY_NOTICES.md for bundled vis-network Apache-2.0/MIT software licensing.

1.1.1 #

  • Refined dep_graph.yaml configuration examples and updated example application layout.
  • Cleaned up maintainer CI documentation in README.md.

1.1.0 #

  • Strongly Connected Component (SCC) Severity Metrics: Calculate internal edges, average fan-in, average fan-out, instability metric ($I$), graph coupling density ($D$), and bottleneck dependency hub files (SccComponent).
  • Clean Architecture & Layer Boundary Checker: Configurable layer rules in dep_graph.yaml or pubspec.yaml with glob pattern matching (LayerValidator).
  • Targeted File Dependency Explainer: Detailed file-level dependency path and cycle analysis via --explain <file>.
  • New Export Formats: Machine-readable JSON report (JsonExporter) and GitHub/GitLab markdown flowchart diagram export (MermaidExporter).
  • High-Throughput Parallel Scanning: Bounded parallel file reader queue (batch size 64) in ProjectScanner.
  • Scope & Offline Control: Added --scope cycles|all graph scope trimming and --offline HTML asset inlining.

1.0.1 #

  • Updated License to MIT

1.0.0 #

  • Initial release of dep_graph_visualizer.
  • Monorepo & Dart 3.6+ Workspace auto-discovery (pubspec.yaml workspace: entries and Melos sub-package structures).
  • Cross-package import resolution (package:<member_pkg>/...) and inter-package circular dependency detection.
  • Project scanner with regex directive parser.
  • Circular dependency detector using Tarjan's SCC algorithm.
  • Terminal text reporter with ANSI colors.
  • Graphviz .dot exporter.
  • Interactive single-file centerpiece HTML graph visualizer.
  • Full CLI supporting repeatable -f, -o, --scan-dir, --exclude, and --[no-]workspace flags.
  • Added conditional import/export support by treating every quoted URI in a directive as a potential dependency edge.
  • Added a Flutter-style fixture and tests covering circular dependency detection through conditional imports.
3
likes
160
points
1.46k
downloads

Documentation

Documentation
API reference

Publisher

verified publisherpiyushanand.in

Weekly Downloads

A CLI tool and Dart library for static architecture analysis, Clean Architecture layer governance, circular dependency metrics, and graph visualization.

Repository (GitHub)
View/report issues
Contributing

Topics

#clean-architecture #static-analysis #developer-tools #dependency-graph #architecture-governance

License

MIT (license)

Dependencies

args, glob, path, yaml

More

Packages that depend on arch_guard