A beautiful Markdown viewer for terminal with code execution support
Project description
MDX - Markdown Viewer for Terminal
A beautiful Markdown viewer for terminal with code execution support.
Features
- 🎨 Beautiful syntax highlighting with multiple themes
- 📑 Table of contents navigation
- ⚡ Execute code blocks directly (bash, python)
- 🔍 Search within documents (supports Chinese)
- 📖 Multiple rendering modes
- 🛠️ Development mode for debugging
Installation
pip install mdx-viewer
Usage
# View a markdown file
mdx README.md
# Show table of contents
mdx README.md --toc
# Execute code blocks
mdx README.md --execute
# Jump to specific line
mdx README.md --line 100
# Use different theme
mdx README.md --theme dracula
# Enable development mode
mdx README.md --dev
Options
| Option | Description |
|---|---|
-e, --execute |
Execute code blocks |
-t, --toc |
Show table of contents |
-l, --line |
Jump to specific line |
-m, --theme |
Syntax highlighting theme |
-d, --dev |
Enable development mode |
Keyboard Shortcuts
j/kor arrow keys: Scroll up/downg: Go to topG: Go to bottomspace/f: Page downb: Page up/: Searchn/N: Next/previous search resultt: Show table of contentsM: Switch themeq: Quit
Search Functionality
- Press
/to enter search mode - Type your search term (supports Chinese)
- Press Enter to search
- Press
nto find next result - Press
Nto find previous result - Press ESC to cancel search
Development Mode
Use --dev flag to enable development mode, which shows debug information in a floating window:
mdx --dev filename.md
Themes
Available syntax highlighting themes:
- monokai (default)
- dracula
- github-dark
- nord
- solarized-dark
Example
# Read documentation
mdx docs/linux-0.11-filesystem-analysis.md --toc
# Execute tutorial code blocks
mdx docs/tutorial.md --execute
# Debug search functionality
mdx docs/linux-0.11-filesystem-analysis.md --dev
License
MIT License
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
mdx_viewer-0.1.1.tar.gz
(21.8 kB
view details)
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 mdx_viewer-0.1.1.tar.gz.
File metadata
- Download URL: mdx_viewer-0.1.1.tar.gz
- Upload date:
- Size: 21.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75119b0867ce95cbe4b4911e0b6d2a122d6923e563f4186ac642c26aa9c9932d
|
|
| MD5 |
7fdc2c46ce06a92b3d584aaa78f232eb
|
|
| BLAKE2b-256 |
bc99431615f6f78c4410b327c49192784a15a18902b73c5642a0b5c353667836
|
File details
Details for the file mdx_viewer-0.1.1-py3-none-any.whl.
File metadata
- Download URL: mdx_viewer-0.1.1-py3-none-any.whl
- Upload date:
- Size: 24.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91eb8d47fc4bda472eada75cdc12433002b183a45815f5953c376a92d9262546
|
|
| MD5 |
bb364615a077a191f28ed734bf7cdcb3
|
|
| BLAKE2b-256 |
92f69ec518a81044af1e755c54aa71a4df8ebfe485c2a99df1a6fbbafd2343b9
|