A fast and extensible Markdown renderer and editor built in Rust, designed for client-side use with CLI and TUI support. No dependencies on servers or networks.
- Markdown Rendering - Convert Markdown files to HTML with syntax highlighting for code blocks
- CLI Interface - Simple command-line tools for rendering and watching files
- TUI Editor - Terminal user interface editor for creating and editing Markdown
- File Watching - Auto-rerender Markdown when files change
- Syntax Highlighting - Code blocks are highlighted using
syntect - Extended Markdown - Support for tables, task lists, strikethrough, and footnotes
- PDF Export - Support for exporting rendered Markdown to PDF (in development)
- No External Dependencies - Fully client-side, works offline
Build using Cargo:
git clone https://github.com/DhanushNehru/markdown-scribe.git
cd markdown-scribe
cargo build --releaseThe binary will be available at target/release/markdown-scribe.
cargo run -- render --input example.md --output output.htmlOptions:
--input, -i- Path to input Markdown file (required)--output, -o- Path to output HTML file (default:output.html)--pdf- Optional path to render as PDF
Auto-rerender HTML whenever the Markdown file changes:
cargo run -- watch --file example.mdOpens a live preview in your default browser that updates automatically on file changes.
Launch the interactive terminal editor:
cargo run -- editOr open and edit an existing file:
cargo run -- edit --file example.mdEditor Controls:
Esc- Exit editorEnter- New line- Arrow Keys - Navigate cursor
Backspace- Delete character
src/
├── main.rs - CLI interface and core rendering logic
└── tui.rs - Terminal user interface implementation
- Uses
pulldown-cmarkfor robust Markdown parsing - Supports CommonMark with GitHub Flavored Markdown extensions
- Custom syntax highlighting for code blocks via
syntect
- Built with
ratatuifor rendering - Uses
crosstermfor cross-platform terminal control - Split-pane editor with live preview
notifycrate for file system monitoring- Instant feedback on file changes
- clap (4.5.53) - Command-line argument parsing
- pulldown-cmark (0.13.0) - Markdown parsing
- syntect (5.3.0) - Syntax highlighting
- ratatui (0.30.0) - TUI framework
- crossterm (0.29.0) - Terminal manipulation
- notify (8.2.0) - File watching
- webbrowser (1.0.6) - Open browser preview
- printpdf (0.8.2) - PDF generation
- anyhow (1.0.82) - Error handling
- Rust 1.70+ (Edition 2021)
- Cargo
# Development build
cargo build
# Release build (optimized)
cargo build --release
# Check without building
cargo check
# Run tests
cargo test- Full PDF rendering with proper styling
- Markdown validation and linting
- Export to additional formats (DOCX, LaTeX, EPUB)
- Theme customization for syntax highlighting
- Advanced editor features (find/replace, undo/redo)
- Configuration file support
- Plugin system for extensions
Contributions are welcome! Please feel free to:
- Report bugs by opening issues
- Suggest features
- Submit pull requests with improvements
This project is licensed under the MIT License - see LICENSE file for details.