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>
| Argument | Description |
|---|
<PATH> | Path to the file to analyze. mehen metrics never walks directories. |
| Flag | Default | Description |
|---|
--language <LANGUAGE> | auto-detected | Override language detection. Accepts canonical names or aliases (e.g. python, py, ts, tsx, markdown, md). |
--format <FORMAT> | json | One of json, markdown, yaml, toml. |
--pretty | off | Pretty-print JSON output. |
--profile <PROFILE> | default | One of default, ci, strict. |
Examples
JSON (default)
Pretty JSON
Markdown report
Forced language
CI profile
mehen metrics src/main.py
mehen metrics src/main.py --pretty
mehen metrics docs/architecture.md --format markdown
mehen metrics app.tsx --language tsx --format json --pretty
mehen metrics src/main.py --profile ci --pretty
Exit codes
| Code | Meaning |
|---|
| 0 | Success. |
| 1 | IO error, unsupported language, or analyzer-fatal diagnostic on this file. |
| 3 | Invalid 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:
| Profile | Use case |
|---|
default | Local developer output. No implicit failure policy. |
ci | GitHub Action-friendly defaults. Stable tables, standard metric selector set. |
strict | Same output as ci, with tighter built-in threshold suggestions. |
Explicit CLI flags always override profile defaults.
See also