@rafa-thayto/md
v1.1.0
Published
A CLI tool for browsing markdown files in a beautiful web interface with real-time updates
Readme
MDViewer
A CLI tool for browsing markdown files in a beautiful web interface with real-time updates.
Features
- 📁 Recursive markdown file discovery
- 🔍 Fuzzy search to quickly find files
- 🎨 Beautiful markdown rendering with GitHub-flavored markdown
- 📊 Mermaid diagram support
- 💻 Syntax highlighting for code blocks
- 📋 Copy buttons for code blocks
- 🔄 Real-time file watching and updates
- 🖼️ Image and asset support
Installation
bun install -g @thayto/mdUsage
Navigate to any directory with markdown files and run:
mdOr use with bunx:
bunx @thayto/mdThe app will:
- Start a local web server
- Scan for all markdown files
- Open your browser automatically
- Watch for file changes in real-time
Development
Prerequisites
- Bun 1.0+
Setup
git clone <repository>
cd @thayto/md
bun install
cd src/client
bun install
cd ../..Link for Local Development
After building, link the package globally so you can use it anywhere:
# Build the project
bun run build
# Link globally (similar to npm link)
bun link
# Add bun bin to PATH (if not already added)
echo 'export PATH="$HOME/.bun/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
# Now you can use it anywhere:
cd ~/some-directory-with-markdown
mdRun Development Server
bun run devBuild
bun run buildTest
bun testArchitecture
- Backend: Bun HTTP server with REST API and WebSocket
- Frontend: React + Vite with TypeScript
- File Watching: Chokidar for real-time updates
- Markdown: react-markdown with remark-gfm
- Search: Fuse.js for fuzzy search
- Diagrams: Mermaid for flowcharts and diagrams
License
MIT
