Skip to content

Get Started ​

Try Carve ​

Open the Playground to edit and preview Carve without installing anything. To keep your changes, save the source as a .crv file. If you have Node.js 20 or newer, you can render that file to HTML with:

bash
npx @markup-carve/carve input.crv > output.html

See the Cheat Sheet for syntax and Coming from Markdown for the main differences.

Choose a workflow ​

What you want to doStart hereBoundary to check
Write a documentation siteMkDocs plugin: pip install mkdocs-carveAdd carve under plugins in mkdocs.yml and list .crv source paths in nav.
Edit content in WordPressCarve Markup on WordPress.orgTest the editor and theme on your site before migrating existing posts.
Extract a PDF to editable CarvePDF to Carve: pip install pdf-to-carveReview extracted text, tables, and reading order against the PDF.
Export a report to DOCX, EPUB, or TypstPandoc bridge: npm install @markup-carve/pandoc-carve, then npx pandoc-carveInstall Pandoc 3.x separately. Use --diagnostics report.json to inspect conversion losses.
Add Carve tools to an MCP clientCarve MCP: npx -y @markup-carve/carve-mcpNode.js 20 or newer is required. Filesystem access needs an explicit workspace root.

See the Ecosystem for other editors, site generators, and output paths. The packages above solve different tasks; they do not need to be installed together.

Install a renderer ​

The JavaScript, PHP, and Rust implementations are tested with the same Carve documents and expected output.

JavaScript / TypeScript — carve-js ​

bash
npm install @markup-carve/carve
ts
import { carveToHtml } from '@markup-carve/carve'

const html = carveToHtml('/italic/, *bold*, and a heading')

The package also exposes parse and Markdown, plain-text, and ANSI renderers.

Rust — carve-rs ​

bash
cargo install carve-lang
bash
# CLI: convert a .crv file to HTML
carve input.crv

Browser / Node via WebAssembly — carve-wasm ​

carve-wasm wraps carve-rs. See its repository for the current browser and server-side JavaScript APIs.

PHP — carve-php ​

bash
composer require markup-carve/carve-php
php
use MarkupCarve\Carve\CarveConverter;

$html = (new CarveConverter())->convert('/italic/, *bold*, and a heading');

CarveConverter::convert() returns HTML. The package also provides parse, other output formats, and format converters.

Language bindings ​

These bindings use carve-rs:

LanguageProjectInstall
Pythoncarve-pypip install carve-lang (PyPI)
Rubycarve-rbgem install carve-lang
Gocarve-gogo get github.com/markup-carve/carve-go

Editor and framework integrations are listed in the Ecosystem.

Read the reference ​

Core and optional features ​

Headings, lists, tables, links, code, math, footnotes, callouts, and attributes are available without configuration.

A few features must be enabled separately:

  • Available everywhere, but opt-in — citations [@key], bare-URL autolinking, mention/tag → URL templates, a collapsible details widget, list-table. Enable them in your parser configuration.
  • Dependent on the implementation — for example Mermaid diagrams, a table of contents, and heading permalinks. Register the ones you want.

The :name[…] inline form and ::: name block form are always recognized. An application can register code that changes the output for a name. Without that code, the content renders as an ordinary span or div. See the optional features table.

Build your own parser ​

Start with Build Your Own Implementation and the Formal Grammar.

File extension: .crv

Media type: text/x-carve; charset=utf-8, on every transport (CARVE-P9-071)

Released under the MIT License.