Markitai
Opinionated Markdown converter with native LLM enhancement support.
- Multi-format: DOCX, PPTX, XLSX, PDF, EPUB, EML, TXT, MD, images (JPG/PNG/WebP), and URLs → clean Markdown; legacy
.doc/.pptvia thelegacyextra - LLM enhancement: format cleaning, frontmatter metadata, and vision analysis of embedded images, all through litellm, so any provider works (OpenAI, Anthropic, Gemini, local CLIs, and more)
- Batch processing: concurrent conversion with progress display and
--resumefor interrupted jobs - OCR: scanned PDFs and images via local RapidOCR (optional extra, see below), or
--ocr --llmto have the vision model read the page images directly (VLM-OCR) - Web fetching: static HTTP with cache revalidation, or Playwright rendering for JS-heavy pages
- Local web workspace: upload files or folders, submit URLs, configure LLM providers, compare results, retry failures, and revisit conversion history. CLI runs can opt in to that history too, with
--record-history
Docs: https://markitai.dev
Install
Guided installer (recommended). It installs Python and uv if they are missing, lets you pick extras and the Playwright browser, and offers a mirror when the default index is unreachable. Bilingual (EN/中文).
# Linux/macOS
curl -fsSL https://markitai.dev/setup.sh | sh
# Windows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://markitai.dev/setup.ps1 | iex"
Already have Python 3.11–3.13? Install the package on its own and run the two setup steps yourself:
uv tool install markitai # or: pipx install markitai
markitai doctor # check core and optional capabilities
markitai init # config and LLM provider
Browser rendering needs the browser extra, then Chromium:
uv tool install "markitai[browser]" --force
markitai doctor --fix
Both routes install markitai and the shorter mkai alias.
Extras
| Extra | Enables |
|---|---|
browser | Playwright rendering for JS-heavy pages |
claude-agent | Claude Agent SDK as an LLM provider |
copilot | GitHub Copilot SDK as an LLM provider |
extra-fetch | curl-cffi HTTP client (better anti-bot compatibility) |
heif | HEIC/HEIF/AVIF image input |
legacy | Legacy Office conversion (.doc/.ppt) via the anydoc Rust backend |
mcp | Bundled markitai-mcp server for AI agents (Model Context Protocol) |
ocr | Local OCR for scanned PDFs and images (--ocr) |
serve | Local web workspace and REST API |
svg | SVG rasterization via cairosvg |
all | Everything above |
ocr is opt-in because it pulls in ~160MB of models. The guided installer
asks whether you want it, and markitai doctor prints the install command
when it is missing:
uv tool install "markitai[ocr]" --force
Launch the local web workspace with:
uv tool install "markitai[serve]" --force
markitai serve
Quick start
markitai document.pdf -o out/ # convert a file
markitai https://example.com -o out/ # convert a URL
markitai ./docs -o out/ # batch convert a directory
markitai ./docs -o out/ --json # machine-readable results for automation
markitai https://example.com --no-remote-fetch -o out/ # local URL extraction only
markitai doctor # check dependencies and configuration
For LLM enhancement, export any supported provider key. markitai picks the model up from the environment; you don't need a config file:
export GEMINI_API_KEY=... # or OPENAI_/ANTHROPIC_/DEEPSEEK_/OPENROUTER_API_KEY
markitai document.pdf -o out/ --llm # clean formatting + generated frontmatter
markitai document.pdf --preset rich # LLM + alt text + descriptions + screenshots
markitai init # or configure it interactively, once
MCP server
markitai-mcp exposes conversion to AI agents over the Model Context Protocol
with four tools: convert_document, convert_url, batch_convert,
job_status. There is nothing to install, since uvx runs it on demand, and
large outputs land on disk instead of in the model context. For Claude Code:
claude mcp add markitai -- uvx --from "markitai[mcp]" markitai-mcp
The MCP guide covers other clients, LLM
enhancement and batch jobs. markitai mcp starts the same server through the
CLI itself, which is how the
MCP Registry lists it.
Documentation
- Getting started: install, first conversion, output layout, supported formats
- CLI reference: every command and flag
- Configuration: config file, environment variables, LLM providers, every setting
- Fetch policy: the URL strategy cascade, domain profiles, what stays local
- Output profiles:
rag,obsidianandokfoutput shaping - Web workspace:
markitai serve, its history and REST API - Python API:
convert()andaconvert()as a library - Conversion performance: measured local-conversion results and how to reproduce them
- Why Markitai: how it compares with markitdown, docling and anydoc
Contributors start at CONTRIBUTING.md.
How markitai compares
Two of the tools we compare markitai with are also its dependencies:
markitdown converts the Office formats, and anydoc handles legacy .doc/.ppt
behind markitai[legacy]. Against them and docling, markitai gives up
ecosystem reach, ML document-structure models and dependency-free speed, and
gets a built-in LLM pipeline, live web fetching and a local workspace in
return. The feature-by-feature table lives in
Why Markitai.
License
markitai's own source code is MIT.
The default installation is not uniformly MIT, because the PDF engine is not.
The PyMuPDF packages pymupdf, pymupdf-layout and pymupdf4llm come from
Artifex Software and are dual-licensed under AGPL-3.0 or a commercial licence
from Artifex. They are required dependencies: PDF conversion does not work
without them. Running the CLI on your own machine, or a markitai serve
instance only you talk to, carries no AGPL obligation. Redistributing the
combined work, or offering it to other people over a network, does.
NOTICE carries the full terms, the rest of the dependency licensing, and the attribution for the code markitai ports from defuddle (MIT) and marker (Apache-2.0).