One renderer · every surface

The same renderer, reachable from the terminal and your agents

twain-md check lints a file or a whole folder with line-anchored findings and real exit codes; render and export produce the app's exact output; a read-only MCP server gives agents safe access.

The short version

Everything Twain renders and checks runs the identical offline pipeline outside the window too. Point twain-md check at a file or a folder for line-anchored findings, JSON output, strict mode and exit codes CI can act on. Give an agent the read-only MCP server so it can check, render, outline and report on a document without being able to write to it. All of it ships inside the app today; the separate npm packages are not published yet.

The terminal surface

Line-anchored, machine-readable, and read-only where an agent is on the other end.

lint

twain-md check Free

Broken links, missing images, unknown components, imports and expressions, each with its source line. --json for machines, --strict and real exit codes for CI.

opt-in remote

Remote link checking Free

check --remote verifies external URLs with a timeout and bounded concurrency. It never runs unless you ask, so checking stays offline-safe by default.

render · export

The app's exact output Free

twain-md render and export produce the same HTML the app shows, with JSON export profiles covering theme, font, width and asset embedding.

read-only

MCP server for agents Free

Five tools: check, render, outline, stats and report. Read-only by construction: roots are checked after resolving symlinks, only Markdown files are readable, and remote probing is deliberately absent.

deep link

twain-md:// URL scheme Free

Two strictly validated verbs: open a document at a line, or open it with Show Changes on. A URL can open a file; it can never write one.

editor

VS Code and Cursor Free

Open the current file in Twain or trigger Show Changes without leaving your editor.

terminal — real output
$ twain-md check release-notes.mdx

release-notes.mdx: 2 finding(s)
  line 51  unknown component  <RoadmapWidget quarter="Q3" status="planned">
  line 55  broken link        ./configuration.md

$ twain-md check docs/ --strict --json
  → line-anchored findings · exit 1 for CI

Line-anchored and machine-readable

Every finding carries a file, a line and a category, in text for you and JSON for tooling, and check --strict exits non-zero so CI can hold the line. The report tool folds in your anchored review notes as well, re-anchored against the current source, so an agent receives the same brief you would have pasted by hand. Notes are made in the app, which needs Pro; the CLI and the MCP server are free.

Read-only on purpose

The MCP server cannot write files, cannot follow a symlink out of its roots, and cannot reach the network: remote link probing is deliberately absent from the agent surface, because an agent-supplied document must not be able to turn a review tool into a proxy. The CLI and the MCP server share one core, held identical by a parity test.

Where to get it

The CLI, the MCP server and the editor helpers ship inside the app bundle and run today; they are not yet separately published to npm or the extension marketplaces. When the packages publish, this page will carry the install commands.

Questions

How do I install the CLI?

It ships inside the app bundle today. Separate npm publication is coming; until then there is no npm install command, and this page will not pretend there is.

Can the MCP server modify my files?

No. It is read-only by construction: five read-only tools, roots enforced after symlink resolution, Markdown extensions only, and no network access at all.

Does check work in CI?

Yes. `twain-md check` takes files or folders, emits text or `--json`, and `--strict` turns findings into a non-zero exit code your pipeline can act on.

Does the CLI render exactly what the app shows?

Yes. The app, Quick Look, the CLI and the MCP server run the identical renderer, and the CLI and MCP server share their findings core, pinned by a parity test.

This page describes what the app does today; when a capability is partial or pending, it says so. See how Twain compares to other Mac Markdown apps.

Try Twain

The free viewer, with a 7-day Pro trial built in.