Terminal UI for reviewing markdown documents with inline comments
Project description
mdreview
Terminal UI for reviewing markdown documents with inline comments. Built with Python and Textual.
Features
- Inline comments — select line ranges and add comments, stored in sidecar
.review.jsonfiles - Review workflow — approve or request changes on each file, with exit codes for CI integration
- Diff between rounds — see what changed since your last review decision
- Mermaid diagrams — ASCII rendering in the terminal, or open in mermaid.live
- Anchor drift — comments follow content when lines are added, removed, or moved
- Live reload — files reload automatically when modified externally
- Multi-file — review multiple files or an entire directory in one session
Installation
# From PyPI
pip install mdreview
# Or with uv
uv tool install mdreview
# Or with pipx
pipx install mdreview
# From source
uv tool install git+https://github.com/lazyoft/mdreview.git
Usage
# Review a single file
mdreview document.md
# Review multiple files
mdreview chapter1.md chapter2.md chapter3.md
# Review all markdown files in a directory
mdreview --dir docs/
Keybindings
| Key | Action |
|---|---|
Up/Down |
Move cursor between blocks |
Left/Right |
Previous/next file |
c |
Start/confirm line selection for comment |
Shift+Up/Down |
Extend selection |
Ctrl+S |
Submit comment (in modal) |
Esc |
Cancel selection or input |
d |
Delete comment (when popover visible) |
D |
Delete all comments on file |
e |
Edit comment |
A |
Approve file |
R |
Request changes |
v |
Toggle diff view |
f |
Open file selector |
m |
Toggle Mermaid ASCII/raw |
o |
Open Mermaid diagram in browser |
? |
Show help |
q |
Quit |
Customizing Keybindings
All keybindings can be customized via a TOML config file. Run:
mdreview --config
This creates ~/.config/mdreview/keys.toml (pre-populated with all defaults) and opens it in your $EDITOR. Edit any key and save — changes take effect next time you launch mdreview.
Example customization:
[keys]
quit = "x"
approve = "a"
cursor_up = "k"
cursor_down = "j"
Exit Codes
| Code | Meaning |
|---|---|
0 |
All files approved |
1 |
Changes requested on one or more files |
2 |
Incomplete — unreviewed files remain |
Development
# Clone and install in dev mode
git clone https://github.com/lazyoft/mdreview.git
cd mdreview
uv venv && uv pip install -e ".[test]"
# Run tests
uv run pytest
# Lint
uv run ruff check src/
See CONTRIBUTING.md for more details.
License
Project details
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 mdreview-0.3.1.tar.gz.
File metadata
- Download URL: mdreview-0.3.1.tar.gz
- Upload date:
- Size: 103.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1cf5d458b28623359fecb6a4d3503015a351c9f4d2ca2f6035df175b4cf265d3
|
|
| MD5 |
1ff7a646ae5ae6953825569b76921320
|
|
| BLAKE2b-256 |
1ab545bca63ed30db14ce0310263fdb77d331203154e363aaf7b9e00e9db62f3
|
Provenance
The following attestation bundles were made for mdreview-0.3.1.tar.gz:
Publisher:
publish.yml on lazyoft/mdreview
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mdreview-0.3.1.tar.gz -
Subject digest:
1cf5d458b28623359fecb6a4d3503015a351c9f4d2ca2f6035df175b4cf265d3 - Sigstore transparency entry: 989465925
- Sigstore integration time:
-
Permalink:
lazyoft/mdreview@1715717a2a61dfa43da9c70b63c842e2e1e3a944 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/lazyoft
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1715717a2a61dfa43da9c70b63c842e2e1e3a944 -
Trigger Event:
release
-
Statement type:
File details
Details for the file mdreview-0.3.1-py3-none-any.whl.
File metadata
- Download URL: mdreview-0.3.1-py3-none-any.whl
- Upload date:
- Size: 32.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77e94c32e61bed009c5c854a3aade44dde67becc2b380dda51c729a5709b8995
|
|
| MD5 |
7b20d439f9a76d16dcf942ef5001d23a
|
|
| BLAKE2b-256 |
421ad7533b7efad34e785d1c5ec5c2719195f8e9725f765539e564a411fad0fc
|
Provenance
The following attestation bundles were made for mdreview-0.3.1-py3-none-any.whl:
Publisher:
publish.yml on lazyoft/mdreview
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mdreview-0.3.1-py3-none-any.whl -
Subject digest:
77e94c32e61bed009c5c854a3aade44dde67becc2b380dda51c729a5709b8995 - Sigstore transparency entry: 989466257
- Sigstore integration time:
-
Permalink:
lazyoft/mdreview@1715717a2a61dfa43da9c70b63c842e2e1e3a944 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/lazyoft
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1715717a2a61dfa43da9c70b63c842e2e1e3a944 -
Trigger Event:
release
-
Statement type: