You can use the remark CLI to inspect the AST, run plugins, or lint your markdown documents. It can be used in your build scripts to generate HTML or ensure your markdown style guide is adhered to.
remark document.md --inspect
remark document.md --use toc
remark document.md --use toc -o
remark document.md --frail --use preset-lint-markdown-style-guide