Skip to main content
This guide covers three things: analyzing one file, scanning a repository for the worst offenders, and producing a per-PR metric report from CI.
1

Install mehen

See the full installation guide. The shortest path:
2

Analyze a single file

mehen metrics is the one-file command. It auto-detects the language and emits a report in JSON (default), Markdown, YAML, or TOML.
Source-code files yield the code metric family; Markdown files yield the documentation suite.
3

Find the worst offenders in a tree

mehen top-offenders walks one or more paths and ranks the files by one or more metrics:
Polarity is automatic — mehen knows that lower cognitive complexity is better. Override with + or - prefixes when you want different ordering.
4

Diff metrics on a PR

mehen diff compares two git revisions. This is the workhorse behind the GitHub Action:
The same command renders the sticky GitHub comment when run from the action.
5

Add the GitHub Action

Drop a few lines into .github/workflows/mehen.yml to publish a metric trend on every PR:
See the GitHub Action guide for thresholds, monorepos, and the sticky comment template.

Where to next

Pick a metric

Read what each metric means, with formulas and references.

Markdown analysis

Documentation Maintainability Index, link debt, filler/lazy risk, prose layer.

GitHub Action

Inputs, outputs, thresholds, and PR comment design.

Concepts

How mehen organizes parsers, analyzers, and the metric pipeline.