https://github.com/unhappychoice/mdts
A local markdown preview server. npx mdts — and you're done.
https://github.com/unhappychoice/mdts
cli filesystem frontmatter live-reload markdown markdown-renderer mermaid preview server webui zero-setup zero-setup-tools
Last synced: 24 days ago
JSON representation
A local markdown preview server. npx mdts — and you're done.
- Host: GitHub
- URL: https://github.com/unhappychoice/mdts
- Owner: unhappychoice
- License: mit
- Created: 2025-07-13T09:59:58.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2026-05-06T15:48:44.000Z (24 days ago)
- Last Synced: 2026-05-06T16:40:57.438Z (24 days ago)
- Topics: cli, filesystem, frontmatter, live-reload, markdown, markdown-renderer, mermaid, preview, server, webui, zero-setup, zero-setup-tools
- Language: TypeScript
- Homepage: https://mdts.unhappychoice.com
- Size: 9.13 MB
- Stars: 180
- Watchers: 0
- Forks: 14
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
(M)ark(d)own (T)ree (S)erver
A zero-config CLI tool to preview your local Markdown files in a browser.
npx mdts — and you're done.
## 🔧 Features
- ⚡ **Instant Markdown Preview** – Run and view in seconds
- 🌐 **Web UI** – Clean, tree-based browser interface with three-panel layout
- 🔄 **Live Reload** – Automatically refreshes on file changes
- 🧘 **Zero Setup** – No config, no install, no nonsense
- 🎨 **Custom Themes** – 20+ beautiful application themes and syntax highlighting options
## 🚀 Quick Start
```bash
npx mdts
```
This starts a local server at http://localhost:8521 and opens your browser.
Your current directory becomes a browsable Markdown tree.
## 💡 Use Cases
- Reviewing AI-generated docs
- Quickly checking README or note folders
- Lightweight local Markdown wiki
See [detailed use cases](docs/usecases.md) for more examples and workflows.
## 📦 Requirements
- Node.js
- No installation needed – uses `npx`
## 🛠 Options
```bash
npx mdts [directory] [options]
```
| Option | Description | Example |
| ------------------- | ---------------------------------------------------- | ------------------------------ |
| `[directory]` | Directory to serve (default `.`) | `./docs` |
| `--glob`, `-g` | Glob patterns to filter markdown files | `-g 'docs/*.md' 'specs/*.md'` |
| `--host`, `-H` | Host to listen on (default `localhost`) | `0.0.0.0` |
| `--port`, `-p` | Port to serve on (default `8521`) | `8000` |
| `--silent`, `-s` | Suppress server logs (default `false`) | |
| `--no-open` | Do not open the browser automatically | |
| `--version`, `-V` | Output version number | |
| `--help`, `-h` | Display help for command | |
### Examples
```bash
# Serve current directory (all markdown files)
npx mdts
# Serve a specific directory
npx mdts ./docs
# Filter with glob patterns (only matching files are shown)
npx mdts ./project -g 'docs/**/*.md' 'README.md'
# Combine options
npx mdts ./monorepo -g 'packages/*/README.md' --port 3000 --no-open
```
## 📚 Documentation
### 🔗 [Live Demo](https://mdts-unhappychoice.netlify.app)
Experience mdts in action with real examples and interactive features.
### 📖 Documentation
- [Use Cases](docs/usecases.md)
- [Markdown Features](docs/markdown_features.md)
- [Frontend Features](docs/frontend_features.md)
- [Advanced Configuration](docs/configuration.md)
- [API Reference](docs/api.md)
- [Troubleshooting](docs/troubleshooting.md)
- [Comparison with other tools](docs/comparison.md)
- [FAQ](docs/faq.md)
## Contributing
Found a bug? Have an idea? Want to send a PR?
See [CONTRIBUTING.md](./CONTRIBUTING.md) for details — we'd love to have your help!
## Author
[@unhappychoice](https://unhappychoice.com)