Print Markdown — terminal Markdown renderer with ANSI formatting. Zero dependencies.
Project description
pmd — Print Markdown
Terminal Markdown renderer. Zero dependencies. One command.
pmd renders Markdown files directly in your terminal with ANSI colors and Unicode box-drawing characters. No browser, no GUI, no npm install. Just Python 3.9+ and pip install pmd-cli.
Quick start
pip install pmd-cli # or: pipx install pmd-cli
pmd README.md
cat doc.md | pmd # stdin works too
Features
Headings — 6 levels with colors
| Level | Style | Marker |
|---|---|---|
| H1 | White on magenta | ■ |
| H2 | White on blue | ▸ |
| H3 | Black on cyan | ▸ |
| H4–H6 | Green / Yellow / Gray | ▸ |
No underlines, no # prefixes — just color and shape.
Inline formatting
- Bold
**text** - Italic
*text* - Bold-italic
***text*** Strikethrough~~text~~Code— bold green for visibility- Links — blue underlined
Code blocks — bordered, language-tagged
┌ python ──────────────────
│ def hello():
│ print("world")
└──────────────────────────
Clean box borders, language label in the top frame. No syntax highlighting — just readable code.
Tables — autofit, cell wrapping, inline formatting
┌──────────┬───────┬─────────────────┐
│ Name │ Age │ City │
├──────────┼───────┼─────────────────┤
│ Alice │ 30 │ Beijing │
│ Bob │ 25 │ Shanghai │
└──────────┴───────┴─────────────────┘
- Unicode box-drawing glyphs
- Columns autofit to content — compact by default
- Long cells wrap within their column
- Inline formatting (
`code`,**bold**) preserved inside cells
Task lists
● Completed task
○ Pending task
GFM-style - [x] / - [ ] rendered as green filled / gray empty circles. Mix with regular list items freely.
Blockquotes
▎ Cyan bar + dimmed text
▎ Clean and compact
CJK / Emoji support
Chinese, Japanese, Korean characters measured at correct display width (2 columns). Table alignment and text wrapping work properly for mixed-script documents.
Why pmd?
| Tool | Language | Dependencies |
|---|---|---|
| pmd | Python 3 | Zero |
glow |
Go | Requires Go toolchain or prebuilt binary |
rich-cli |
Python | rich + 10+ transitive deps |
mdcat |
Rust | Requires Rust or prebuilt binary |
mdr |
Ruby | Requires Ruby + gem install |
pmd is the lightest option when you need markdown rendering on a server, container, CI runner, or air-gapped machine where installing compilers or heavy packages isn't practical.
Alternatives vs. built-in less / cat
These show raw markdown source:
# Heading ← looks like a comment
**bold** *italic* ← noise characters everywhere
| table | columns | ← misaligned without rendering
pmd shows the rendered document — the way it was meant to be read.
Install
pip install pmd-cli # system-wide
pip install --user pmd-cli # user only
pipx install pmd-cli # isolated CLI (recommended)
Python 3.9 or later. No other dependencies.
Usage
# File
pmd README.md
# Stdin
curl -s https://example.com/doc.md | pmd
# From clipboard (macOS)
pbpaste | pmd
# From clipboard (Linux)
xclip -o | pmd
Project structure
src/pmd/
__init__.py # version
__main__.py # parser + renderer (~850 lines)
pyproject.toml # pip metadata
Single-file core — easy to vendor, fork, or embed.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pmd_cli-1.0.0.tar.gz.
File metadata
- Download URL: pmd_cli-1.0.0.tar.gz
- Upload date:
- Size: 12.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
934447ea77d9563ac275609d87fc2be57013992d312622f476c943a7e193ea09
|
|
| MD5 |
cbf44fab1ef6ee3a4de2726143ffaa14
|
|
| BLAKE2b-256 |
9defdc80bbe2528439d368fc23eaf4b405ebf17e4e89700ef3f7fc7f528f096b
|
File details
Details for the file pmd_cli-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pmd_cli-1.0.0-py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ea0ab150279f7e71a557bb806662f4d84e0fe1d171d43d740cdacdc45beb6ca
|
|
| MD5 |
7cab04cd61bbcdaa27c4a62947e595b6
|
|
| BLAKE2b-256 |
87ec92d5e59034c32858a48d83eeec420a3ae3c75c0e9cce2b3793a9fa59fc07
|