mdpact

Getting started

Install

pnpm add -D @mdpact/cli @mdpact/config

npm and yarn work equivalently. Node 20 or 22 required.

Scaffold a config

npx mdpact init

This detects existing CLAUDE.md / AGENTS.md / .cursorrules / copilot-instructions, writes an mdpact.config.ts at repo root, and adds .mdpact/ to .gitignore.

First lint

npx mdpact lint

With no paths, the command lints every file declared under config.specs. Expect real diagnostics the first time — most specs have at least one clarity/* or structure/* issue waiting to be found.

Score it

npx mdpact score

One number between 0 and 100 you can gate PRs against. Use --threshold 80 for a floor; the same number lives in config.score.failBelow.

What's next

  • CLI reference — every command and flag
  • Configuration — full mdpact.config schema
  • Rules — the 18 built-in checks, each with rationale and fix guidance
  • GitHub Action — PR comments, inline annotations, score-based gates