Skip to content

Getting started

Open in

carta reads a document in one markup format and writes it back out in another. It ships as a single binary.

Download the archive for your platform from the latest release. Builds are provided for Linux (x86-64 gnu, static musl, and arm64), macOS (Intel and Apple Silicon), and Windows (x86-64).

  1. Convert a Markdown file to HTML:

    Terminal window
    carta -f commonmark -t html input.md -o output.html
  2. Or pipe through stdin and stdout, which is what carta does when no path is given:

    Terminal window
    echo '# Hello' | carta -f commonmark -t html
  3. Ask the build what it can do:

    Terminal window
    carta --list-input-formats
    carta --list-output-formats
    carta --list-extensions=gfm

-f/--from and -t/--to name the source and target formats. Both accept extension toggles, so -f markdown+hard_line_breaks-raw_html reads Pandoc Markdown with hard line breaks on and raw HTML off.

By default carta emits a document fragment. -s/--standalone wraps it in the target format's scaffold, and the usual document switches work alongside it:

Terminal window
carta -f commonmark -t html -s --toc --number-sections input.md -o output.html

Each reader and writer sits behind its own Cargo feature (read-* and write-*). A build that names only the ones you need carries neither the code nor the dependencies of the rest:

Terminal window
cargo install carta --no-default-features --features cli,read-commonmark,write-html

The full feature, on by default, turns on every format.

  • Formats: what carta reads and writes, and the gaps that remain.
  • CLI: every flag, grouped by task.
  • Library: using carta as a Rust dependency.