CLI — mdwire

Reads Markdown on stdin, writes the channel’s output on stdout. Any agent in any language can pipe through it with no bindings.

cargo install mdwire-cli                                   # Rust
go install github.com/minjun0219/mdwire/go/cmd/mdwire@latest  # Go — same flags, no -V/--version

Every release also carries a binary for macOS (Apple silicon) and Linux (x86_64), with a SHA-256 for each in the notes.

cat agent-output.md | mdwire --channel telegram-html            # parts separated by NUL
cat agent-output.md | mdwire --channel slack-markdown --stream  # emit as it arrives
cat agent-output.md | mdwire --channel plain --limit 4096       # plain fallback into Telegram
cat agent-output.md | mdwire --channel slack-markdown --from slack-mrkdwn --report

Flags

Flag
--channel <name> Required. telegram-html · slack-markdown · github-markdown · notion-markdown next release · plain · html
--from <dialect> Input dialect: markdown (default) · slack-mrkdwn
--limit <chars> Part limit. Defaults to the channel’s.
--html-line-breaks <br|space> html only. Default br.
--html-images <link|load> html only. Default link.
--html-schemes <list> html only. Comma-separated; default http,https,mailto.
--stream Emit as stdin is read. Does not split by the limit.
--report Print the repair report on stderr as one JSON line.
--batch jsonl Read many documents as JSON lines; print one report per document.
-h, --help · -V, --version Help · version (Rust CLI).

A flag that takes a value also takes --name=value (--channel=slack-markdown). next release

Channels, dialects and options are explained on Concepts.

Output

--report

One JSON line on stderr:

{"closedEmphasis":1,"closedFence":0,"revertedCodeSpan":0,"droppedMarker":0,"escapedChar":0,"tagEmphasis":0,"strippedHtml":0,"rewrittenBullet":0,"rewrittenTable":0,"convertedMarker":0}

The first four keys are repairs; the other six next release are channel rewrites. What each counts: the repair report.

--batch jsonl

Many documents through one process — for checking how often hundreds of answers break. Prints the report per document, not the rendered output.

in   {"id": "a1", "text": "**markdown"}         id is a string or a number, and optional
out  {"line":1,"id":"a1","closedEmphasis":1,…}
bad  {"line":2,"error":"…"}                     reading continues; any bad line makes the exit code non-zero