Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mehen.ophi.dev/llms.txt

Use this file to discover all available pages before exploring further.

mehen is a fast, deterministic CLI for code and documentation metrics. It analyzes nine source languages plus Markdown, runs in seconds even on large monorepos, and ships a GitHub Action that publishes per-PR metric trends out of the box.
mehen metrics src/main.py --pretty
mehen top-offenders src --metric cognitive
mehen diff --from main --to HEAD --paths src

Get started

Run mehen against your project in under a minute.

GitHub Action

Add the action and start posting metric trends on PRs.

Code metrics

Cyclomatic, cognitive, Halstead, MI, ABC, LOC family, NOM, NPA, NPM, WMC.

Markdown metrics

DMI, MRPC, MCC, link debt, filler/lazy risk, English/Japanese prose layer.

Why mehen?

Real language parsers

Ruff for Python, Oxc for TS/JS/JSX/TSX, Mago for PHP, Prism for Ruby, ra_ap_syntax for Rust, pulldown-cmark for Markdown, tree-sitter for Go, C, Kotlin, PowerShell.

Code and documentation

A single tool covers source-code complexity and Markdown documentation health.

Deterministic, no network

Pure static analysis. Same input → same output. Safe for air-gapped CI.

PR-native reporting

Built-in mehen diff with sticky GitHub comment via the official action.

What mehen computes

For source code: For Markdown documentation:

What is Mehen?

In Ophidiarium projects, names matter. Mehen is a mythical ancient Egyptian serpent associated with guarding Ra. In the same spirit, the mehen CLI helps guard your codebase and documentation from slowly collapsing under complexity.