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 metrics is the single-file analysis command. It takes one path, auto-detects the language, and emits a complete metrics report.
mehen metrics [OPTIONS] <PATH>
ArgumentDescription
<PATH>Path to the file to analyze. mehen metrics never walks directories.
FlagDefaultDescription
--language <LANGUAGE>auto-detectedOverride language detection. Accepts canonical names or aliases (e.g. python, py, ts, tsx, markdown, md).
--format <FORMAT>jsonOne of json, markdown, yaml, toml.
--prettyoffPretty-print JSON output.
--profile <PROFILE>defaultOne of default, ci, strict.

Examples

mehen metrics src/main.py

Exit codes

CodeMeaning
0Success.
1IO error, unsupported language, or analyzer-fatal diagnostic on this file.
3Invalid serialization state — should not happen in production runs.

What gets reported

Source-code files yield the code metric family (cyclomatic, cognitive, Halstead, MI, ABC, LOC family, NOM, NPA, NPM, NARGS, NEXITS, WMC). Markdown files yield the Markdown metric suite — DMI, MRPC, MCC, Markdown Halstead, link debt, table burden, visual scaffold, artifact debt, repository grounding, evidence coverage, filler/lazy risk, review criticality, section balance, good scaffold. The opt-in prose layer ships behind Cargo features.

Profiles

--profile selects a built-in preset for what gets reported and how thresholds are interpreted:
ProfileUse case
defaultLocal developer output. No implicit failure policy.
ciGitHub Action-friendly defaults. Stable tables, standard metric selector set.
strictSame output as ci, with tighter built-in threshold suggestions.
Explicit CLI flags always override profile defaults.

See also