Metadata-Version: 2.4
Name: markitai
Version: 0.18.0
Summary: Opinionated Markdown converter with native LLM enhancement support
Project-URL: Homepage, https://markitai.dev
Project-URL: Documentation, https://markitai.dev/guide/getting-started
Project-URL: Repository, https://github.com/Ynewtime/markitai
Project-URL: Changelog, https://github.com/Ynewtime/markitai/blob/main/CHANGELOG.md
Author-email: Ynewtime <longqiliuye@gmail.com>
License-Expression: MIT
Keywords: converter,docx,llm,markdown,ocr,pdf
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Text Processing :: Markup :: Markdown
Classifier: Topic :: Utilities
Requires-Python: <3.15,>=3.11
Requires-Dist: aiofiles>=25.1.0
Requires-Dist: click>=8.3.0
Requires-Dist: instructor>=1.14.5
Requires-Dist: litellm>=1.83.0
Requires-Dist: loguru>=0.7.3
Requires-Dist: markitdown[all]>=0.1.5
Requires-Dist: opencv-python>=4.13.0
Requires-Dist: pillow>=12.1.0
Requires-Dist: pydantic>=2.12.0
Requires-Dist: pymupdf4llm>=1.27.2
Requires-Dist: python-dotenv>=1.2.2
Requires-Dist: pywin32>=310; sys_platform == 'win32'
Requires-Dist: questionary>=2.1.0
Requires-Dist: rapidocr>=3.7.0
Requires-Dist: rich-click>=1.9.4
Requires-Dist: rich>=14.3.0
Requires-Dist: tinycss2>=1.2
Provides-Extra: all
Requires-Dist: cairosvg>=2.9.0; extra == 'all'
Requires-Dist: claude-agent-sdk>=0.1.50; extra == 'all'
Requires-Dist: curl-cffi>=0.14.0; extra == 'all'
Requires-Dist: github-copilot-sdk>=0.2.0; extra == 'all'
Requires-Dist: kreuzberg>=4.9.6; extra == 'all'
Requires-Dist: pillow-heif>=1.0; extra == 'all'
Requires-Dist: playwright>=1.58.0; extra == 'all'
Provides-Extra: browser
Requires-Dist: playwright>=1.58.0; extra == 'browser'
Provides-Extra: claude-agent
Requires-Dist: claude-agent-sdk>=0.1.50; extra == 'claude-agent'
Provides-Extra: copilot
Requires-Dist: github-copilot-sdk>=0.2.0; extra == 'copilot'
Provides-Extra: extra-fetch
Requires-Dist: curl-cffi>=0.14.0; extra == 'extra-fetch'
Provides-Extra: heif
Requires-Dist: pillow-heif>=1.0; extra == 'heif'
Provides-Extra: kreuzberg
Requires-Dist: kreuzberg>=4.9.6; extra == 'kreuzberg'
Provides-Extra: svg
Requires-Dist: cairosvg>=2.9.0; extra == 'svg'
Description-Content-Type: text/markdown

# Markitai

[![PyPI](https://img.shields.io/pypi/v/markitai)](https://pypi.org/project/markitai/)
[![Python](https://img.shields.io/pypi/pyversions/markitai)](https://pypi.org/project/markitai/)
[![CI](https://github.com/Ynewtime/markitai/actions/workflows/ci.yml/badge.svg)](https://github.com/Ynewtime/markitai/actions/workflows/ci.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/Ynewtime/markitai/blob/main/LICENSE)

Opinionated Markdown converter with native LLM enhancement support.

- **Multi-format**: DOCX, PPTX, XLSX, PDF, TXT, MD, images (JPG/PNG/WebP), and URLs → clean Markdown
- **LLM enhancement**: AI-powered format cleaning, frontmatter metadata, and vision analysis of embedded images — via [litellm](https://github.com/BerriAI/litellm), so any provider works (OpenAI, Anthropic, Gemini, local CLIs, ...)
- **Batch processing**: concurrent conversion with progress display and `--resume` for interrupted jobs
- **OCR**: scanned PDFs and images via RapidOCR
- **Web fetching**: static HTTP with cache revalidation, or Playwright rendering for JS-heavy pages

Docs: <https://markitai.dev>

## Install

**Recommended — guided installer.** Checks/installs Python and uv, lets you
pick extras, installs optional components (Playwright browser, LibreOffice,
FFmpeg), offers China-mainland mirror acceleration, and is bilingual (EN/中文):

```bash
# Linux/macOS
curl -fsSL https://markitai.dev/setup.sh | sh
# Windows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://markitai.dev/setup.ps1 | iex"
```

**Minimal — uv / pip**, if you already have Python 3.11–3.14 and just want the package:

```bash
uv tool install "markitai[all]"     # isolated environment (recommended)
pipx install "markitai[all]"        # or pipx
```

After a uv/pip install, do the setup steps the guided installer would have done for you:

```bash
markitai doctor           # check what's installed / missing
markitai doctor --fix     # install the Playwright Chromium browser if you use --playwright
markitai init             # create a config and set up an LLM provider
```

Both installs provide the `markitai` command **and the shorter `mkai` alias** —
they are the same command (`mkai --help` == `markitai --help`). If you already
have a different `mkai` on your PATH, use the full `markitai` to avoid ambiguity.

### 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) |
| `kreuzberg` | Kreuzberg extraction backend |
| `svg` | SVG rasterization via cairosvg |
| `all` | Everything above |

## Quick start

```bash
markitai document.pdf -o out/            # convert a file
markitai https://example.com -o out/     # convert a URL
markitai ./docs -o out/ --llm            # batch convert with LLM enhancement
markitai document.pdf --preset rich      # LLM + alt text + descriptions + screenshots
markitai doctor                          # check dependencies and configuration
markitai init                            # interactive configuration setup
```

See the [Getting Started guide](https://markitai.dev/guide/getting-started) for LLM configuration, presets, caching, and batch options.

## License

[MIT](https://github.com/Ynewtime/markitai/blob/main/LICENSE)
