Command-line interface for processing markdown with the remark ecosystem. Current stable version is 12.0.1, released as part of the remark monorepo. The CLI allows inspecting, linting, and transforming markdown files using over 150 plugins. It is the primary way to integrate remark into CI/CD pipelines or npm scripts. Key differentiators: full access to the unified ecosystem, supports configuration files (JSON, YAML, JS), and can output formatted syntax trees. Requires Node.js 16+. ESM-only package, does not support CommonJS require().
npm install remark-cliVerified import paths — ran on the pinned version, not inferred.
Configure a lint script for markdown files in package.json using remark-cli with a preset.
Update Node.js to 16+ and use import syntax in config files.
Upgrade Node.js to version 16 or higher.
Ensure you have a backup or use version control before running with --output.
Use only built-in reporters ('json', 'vfile-reporter-json') or verify plugin ESM compatibility.Specify full extension for local plugins (e.g., --use ./plugin.mjs).
Review .remarkrc or .remarkignore files for YAML 1.2 compatibility (e.g., boolean values, octal numbers).
Use import { remark } from 'remark' for programmatic use, or run CLI via npx or npm scripts.Run npm install --save-dev remark-preset-lint-markdown-style-guide
Change module.exports to export default. Ensure package.json has type: module or use .mjs extension.
Use --use ./local-plugin.mjs (or .js/.cjs with type: module) instead of just ./local-plugin.