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:
npx @markup-carve/carve input.crv > output.htmlSee the Cheat Sheet for syntax and Coming from Markdown for the main differences.
Choose a workflow
| What you want to do | Start here | Boundary to check |
|---|---|---|
| Write a documentation site | MkDocs plugin: pip install mkdocs-carve | Add carve under plugins in mkdocs.yml and list .crv source paths in nav. |
| Edit content in WordPress | Carve Markup on WordPress.org | Test the editor and theme on your site before migrating existing posts. |
| Extract a PDF to editable Carve | PDF to Carve: pip install pdf-to-carve | Review extracted text, tables, and reading order against the PDF. |
| Export a report to DOCX, EPUB, or Typst | Pandoc bridge: npm install @markup-carve/pandoc-carve, then npx pandoc-carve | Install Pandoc 3.x separately. Use --diagnostics report.json to inspect conversion losses. |
| Add Carve tools to an MCP client | Carve MCP: npx -y @markup-carve/carve-mcp | Node.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
npm install @markup-carve/carveimport { 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
cargo install carve-lang# CLI: convert a .crv file to HTML
carve input.crvBrowser / 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
composer require markup-carve/carve-phpuse 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:
| Language | Project | Install |
|---|---|---|
| Python | carve-py | pip install carve-lang (PyPI) |
| Ruby | carve-rb | gem install carve-lang |
| Go | carve-go | go get github.com/markup-carve/carve-go |
Editor and framework integrations are listed in the Ecosystem.
Read the reference
- Cheat Sheet: syntax reference.
- Examples: Carve source and HTML output.
- Formal Grammar: the rules that define valid block and inline syntax.
- Migration from Markdown: incompatible syntax and conversion.
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 collapsibledetailswidget,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)