mdok
A small CLI tool for reading Markdown files in the terminal.
Most terminal renderers either stretch text across the entire display width or force it into a rigid, narrow column on the left edge. Tables often fuse rows together, eat technical tags like <Type>, or ignore <br> line breaks.
mdok formats Markdown like a clean document:
- Proportional width & centering: Centers text on wide displays with gentle margins and scales comfortably (~75% of terminal width up to ~120 columns).
- Readable tables: LaTeX booktabs style—horizontal rules, no heavy ASCII borders, soft cell wrapping, alignment support, and row dividers so multiline rows don't run together.
- Tag & line break handling: Preserves technical tags (like
<Tag>or<Property>) and respects<br>breaks inside cells. - Muted colors: Inline code uses a warm amber (
#e0af68) on a subtle dark badge instead of bright yellow. Code blocks default to the Nord syntax theme. - Automatic pager: Pipes into
less(with colors preserved) when the document is longer than your terminal screen. - GitHub-style callouts: Renders
> [!NOTE],> [!TIP],> [!WARNING], etc.
Installation
pip install mdok
Or from source:
git clone https://github.com/anton/mdok.git
cd mdok
pip install .
For development:
pip install -e .
Usage
Read a file:
mdok README.md
Pipe from standard input:
cat doc.md | mdok
Options
mdok doc.md -w 100 # Explicit document width in columns
mdok doc.md -m 4 # Explicit left margin
mdok doc.md --no-center # Align to left edge
mdok doc.md -b rounded # Table style (booktabs, rounded, simple, minimal, none)
mdok doc.md --code-theme gruvbox-dark # Syntax highlighting theme
mdok doc.md --no-pager # Print directly without pager
Metadata
Release files for mdok 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mdok-0.1.0.tar.gz | 19.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mdok-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 33.5 kB
Release files / mdok-0.1.0.tar.gz
| Download URL | mdok-0.1.0.tar.gz |
|---|---|
| Size | 19.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b55807d0a758934ba794da856880f7cf96745490134adf545d503b1e9c4525f2
|
|
BLAKE2b-256 checksum How to use checksums |
4b1420e16e2b15f33a795d5a755a4924df0fe79a1eea0dcbadb78d890ca67280
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|
Release files / mdok-0.1.0-py3-none-any.whl
| Download URL | mdok-0.1.0-py3-none-any.whl |
|---|---|
| Size | 13.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0f5ee8dbf39b0f5343692514086012c66d8a985052122366a91ca3383def5863
|
|
BLAKE2b-256 checksum How to use checksums |
9ae21fe187f68f62bcea0e6c8b0224ccc9ad7a65a4d9e819182d45244f001d76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|