CLI
Shell Pipelines
Compose md-utils safely with other command-line programs.
Shell pipelines connect the standard output of one command to the standard input of the next:
md-utils fm dump posts/ | jq '.frontMatter | length'
md-utils fm dump posts/ --format yaml | yq '.frontMatter[].title'
Prefer structured JSON or YAML while data is still being selected or transformed. Convert to raw text only at the edge of the pipeline, when the next program explicitly expects lines or scalar text.
Check the exit status of every important stage before using a pipeline for writes. Preview mutations, quote paths and query expressions, and pay special attention to filenames containing whitespace or newline characters. A compact pipeline is useful only when it preserves the input boundaries and failure signals that matter to the operation.