Installation
Quick start
Choose the output you need and render your first Markdown document in minutes.
Agent skill
To give coding agents the Comark skill (syntax, AST, renderers, and streaming), install it from comark.dev:
npx skills add https://comark.devIDE extension
Install the Comark extension in VS Code or Cursor for syntax highlighting, bracket matching, document folding, and autocomplete in .md files using Comark syntax.
Or within your editor, open Quick Open (Ctrl+P / Cmd+P) and run:
ext install Nuxt.mdcBrowser extension
Install Comark for GitHub to render Comark component and attribute syntax when viewing Markdown files on GitHub.
Packages
Comark packages share one pipeline. The core parser produces a serializable MarkdownDocument, while string and UI renderers consume that document. Install the package that matches your output:
UI frameworks
Use these when you need to render Markdown as an interactive document in Vue, React, Nuxt, Svelte, or Angular.
pnpm add @comark/vuenpm install @comark/vueyarn add @comark/vuebun add @comark/vuepnpm add @comark/reactnpm install @comark/reactyarn add @comark/reactbun add @comark/reactpnpm add @comark/vuenpm install @comark/vueyarn add @comark/vuebun add @comark/vueThen add the module to your nuxt.config:
export default defineNuxtConfig({
modules: ['@comark/vue']
})pnpm add @comark/sveltenpm install @comark/svelteyarn add @comark/sveltebun add @comark/sveltepnpm add @comark/angularnpm install @comark/angularyarn add @comark/angularbun add @comark/angularString renderers
Use these when you need string output without a UI framework, such as server-side HTML generation, static site builds, or CLI tools.
pnpm add @comark/htmlnpm install @comark/htmlyarn add @comark/htmlbun add @comark/htmlpnpm add @comark/ansinpm install @comark/ansiyarn add @comark/ansibun add @comark/ansiCore
comark is the parser and document foundation used by every renderer. Use it directly to parse Markdown, inspect or transform the AST, cache or serialize documents, and render them back to Markdown.
comark separately if you're not using a framework renderer.pnpm add comarknpm install comarkyarn add comarkbun add comarkimport { parseMarkdown, createMarkdownParser } from 'comark'
import { renderMarkdown } from 'comark/render'
// Parse to AST
const document = await parseMarkdown(source)
// Transform nodes, then serialize back to Markdown
const output = await renderMarkdown(document)
// Reusable parser: initializes plugins once, faster for batch processing
const parseDoc = createMarkdownParser({ plugins: [shiki(), toc()] })See the Parse API and Render API for full options.
Learn more
Explore Comark syntax and plugins:
Introduction
Comark is an open-source Markdown parser and renderer with components, attributes, and plugins. It streams AI output to React, Vue, Svelte, Angular, HTML, and the terminal.
Document
Understand the serializable Markdown document returned by Comark, including its nodes, frontmatter, metadata, and rendering workflow.