myform: Universal Docs-Format Translation#

myform reads MyST Markdown, GitHub Flavored Markdown, Obsidian-Flavored Markdown, Sphinx reStructuredText, Typst, and the Plane dialect into one typed document tree, then writes that tree as any of those formats or as a bounded MediaWiki wikitext subset. Formatting is the identity case of the same conversion pipeline. The original opinionated MyST mdformat plugin remains available as a compatible facade.

Install or develop#

Install the current public release from PyPI:

pip install myform

From a checkout, install the development environment and inspect the CLI with:

uv sync --all-extras
uv run myform --help

Translate and format#

uv run myform convert guide.md --from myst --to rst -o guide.rst
printf '# Hello\n' | uv run myform convert - --from gfm --to typst
uv run myform convert guide.md --from myst --to wikitext -o guide.wiki
uv run myform format README.md --format myst

Input - means stdin. Document output uses stdout unless -o/--output names a file, while --report summary|json|none controls conversion reporting on stderr.

Wikitext is currently a write-only bounded target: unsupported source constructs are carried or approximated with a conversion report, never silently called native. Its reader remains gated on the separate public Wikiparse release.

Configuration is discovered upward from the target path. Use myform.yaml, .myform.yaml, or [tool.myform] in pyproject.toml to select degradation policy, opt into assist, configure target writers, or load trusted extensions. The committed myform.schema.json describes this surface; assist is degradation-only, disabled by default, and has a deterministic fallback. Without a myform config, a myst format identity takes the mdformat facade and honors a discovered .mdformat.toml (nearest file wins) the way the mdformat CLI does: core facade options, plugin tables, and exclude pass-through.

Carrier-aware extensions call myform.convert_artifact(...). The returned artifact keeps target text, its degradation report, and deterministic typed enclave records together; legacy conversion shapes raise rather than discard a carrier.

Documentation#