markdownlint-cli
$ markdownlint Community Low RiskClassic Node.js CLI wrapper for the markdownlint engine that validates Markdown headings, lists, links, and fenced code blocks. Supports machine-readable --json diagnostics and deterministic --fix formatting.
brew install markdownlint-cli Lints and auto-fixes workspace Markdown files locally with zero network overhead.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Supports --json structured output, stdin -s, --config, and deterministic exit codes.
markdownlint --jsonwrites structured JSON arrays to stderr/stdout
Read-only by default; mutates files only when --fix is explicitly provided.
- Non-destructive default lint mode; explicit
--fixopt-in
Cross-platform via Homebrew, npm, and npx, requiring Node.js.
- Easy installation via
brewornpx markdownlint-cli
Widely adopted in pre-commit and CI docs checks, though markdownlint-cli2 is faster on huge repos.
- Covers 40+ standard Markdown rules with auto-fix support
Well-known community CLI (igorshubovych/markdownlint-cli) under MIT license.
- Actively used MIT project at
igorshubovych/markdownlint-cli
Clear README CLI flag table and upstream markdownlint rule references.
- Documented flags in GitHub README and
--help
Security, Auth & Guardrails
Offline local Markdown linter; no credentials stored or required.
MIT open-source npm package; completely free.
# markdownlint-cli (markdownlint) Agent Rules - Run `markdownlint --json` first to inspect violations before calling `--fix`. - Quote glob patterns and pass `--ignore node_modules` if needed.
Agent-Ready Command Recipes
Safe Read-Only Queries
markdownlint --json "docs/**/*.md"
Emits JSON violation arrays with rule names, line numbers, and error details without editing files.
Controlled Writes & Previews
markdownlint --fix "docs/**/*.md"
Applies safe rule fixes in place across matched Markdown files.
Strengths for Agents
- + Native
--jsondiagnostics include rule IDs, line numbers, and fixable error ranges. - +
--fixcleanly resolves whitespace, list marker, and heading spacing issues.
Caveats & Pitfalls
- ! Note that
--jsonwrites JSON to stderr in some versions; redirect2>&1when parsing. - ! Slower and less flexible on complex glob configs than newer
markdownlint-cli2.