A terminal Markdown viewer and editor, built with Textual and Rich.
Open a .md file to a fully rendered view (headings, tables, code blocks,
lists, block quotes...) and press a single key to toggle into a
syntax-highlighted source editor for the same file — then toggle back to see
your changes rendered.
pip install git+https://github.com/matplo/mdeditmdedit path/to/file.md # open (or create) a file
mdedit # start with a prompt to open/create a file| Key | Action |
|---|---|
ctrl+t |
Toggle between view and edit mode |
ctrl+s |
Save |
ctrl+r |
Reload from disk |
ctrl+q |
Quit (prompts if unsaved changes) |
Note: if
ctrl+sdoesn't seem to do anything in your terminal, it may be intercepted by terminal flow control (XON/XOFF). Runstty -ixonin your shell first, or use the Save option from the command palette (ctrl+p).
pip install -e ".[dev]"
pytest
ruff check .
ruff format --check .Releases publish automatically via GitHub Actions using trusted publishing (no API token stored anywhere). To cut a release:
- Bump
__version__insrc/mdedit/__init__.py, commit it. - Tag and push:
git tag vX.Y.Z && git push origin vX.Y.Z - The
Publish to PyPIworkflow builds the sdist/wheel and uploads them.
v1 is intentionally scoped to a single-file, toggle-based view/edit experience. Not yet included (candidates for a future version):
- Always-rendered, true WYSIWYG editing (edit directly on rendered text, no separate source view)
- Split-pane side-by-side edit + preview
- Browser-style navigation history, bookmarks, remote/URL loading
- Multiple open files / tabs
MIT