# Share a dependency-cruiser Report — Module Graphs on a Link

Canonical: https://commareports.com/share-dependency-cruiser-report
Published: 2026-09-01

> dependency-cruiser writes an HTML report of your module graph and rule violations. Publish it to Comma so architecture arguments happen on the graph, with a revision per run.

# Share a dependency-cruiser report

Architecture rules fail quietly. Someone adds an import from the domain
layer to the HTTP layer, the rule fires in CI, the build goes red, and
the fastest path to green is to add an exception to
`.dependency-cruiser.js`. Nobody argues, because there is nowhere to
argue: the violation is a line in a log.

The graph is the argument. Put it somewhere people can point at it.

## Publish it

```bash
npx depcruise src \
  --output-type err-html --output-to depcruise.html || true

curl -fsS -X PATCH \
  "https://commareports.com/api/v1/reports/$COMMA_REPORT_ID" \
  -H "Authorization: Bearer $COMMA_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d "$(jq -n --rawfile html depcruise.html \
        --arg title "Module graph — $REPO — $(date +%F)" \
        '{title: $title, html: $html}')"
```

For the visual version, render the graph to SVG and publish that instead:

```bash
npx depcruise src --include-only "^src" --output-type dot \
  | dot -T svg > graph.svg
```

Wrap the SVG in a minimal HTML page and publish. It stays vector at the
link — zoomable, selectable, and readable on a laptop — unlike the PNG
screenshot of a graph that usually gets pasted into a design doc.

## What the URL changes

- **Exceptions get a reason attached.** "Allowed until the adapter lands,
  ARCH-12" pinned to the violation instead of buried in a config comment.
  See [commenting on HTML](/comment-on-html).
- **Cycle count over time.** Revision per run at one URL. See
  [revisions and diffs](/share-html-report).
- **Onboarding material that is current.** A graph regenerated on a
  [routine](/docs/routines) beats a hand-drawn diagram from 2023.
- **Private by default** — see the [sharing model](/docs/sharing).

## Limits

- **Entry HTML: 5 MB.** A dot-rendered SVG of a large monorepo can pass
  it; narrow with `--include-only` or `--collapse` to a package depth
  that is actually readable.
- **Scripts run, sandboxed**: `allow-scripts`, no `allow-same-origin`.
- **60 requests/minute per token.**

## Try it

Comma is free — unlimited reports, unlimited commenters, unlimited
revision history.

**[Create your first report →](https://commareports.com/)**

### Related

- [jscpd duplication](/share-jscpd-report) — the other structural view
- [Bundle analyzer](/share-bundle-analyzer-report) · [Source map explorer](/share-source-map-explorer-report)
- [ESLint reports](/share-eslint-report) · [Publish from CI](/docs/ci)
