mdpreview
mdpreview — Markdown Preview & Annotate
Catppuccin Mocha/Latte live-reloading Markdown viewer with multi-tab support and Google Docs-style margin annotations.
Canonical repo: github.com/tdimino/dabarat. Clone it or ensure
md_preview_and_annotateis on your PYTHONPATH.
Quick Start
# Preview one or more files
python3 -m md_preview_and_annotate file.md [file2.md ...] --port 3031
# If not installed globally, run from the cloned repo:
python3 ~/Desktop/Programming/md-preview-and-annotate/md_preview_and_annotate/__main__.py file.md
Add a file to a running server
python3 -m md_preview_and_annotate --add another.md --port 3031
Add an annotation from CLI (no server needed)
python3 -m md_preview_and_annotate --annotate file.md \
--text "RPL §235-b" --author "Claude" --comment "Cite the specific subsection"
This writes directly to the sidecar JSON (file.md.annotations.json). The live viewer picks it up on the next 500ms poll cycle.
Features
| Feature | Details |
|---|---|
| Live reload | 500ms polling, auto-refreshes on file save |
| Multi-tab | Open multiple .md files, switch tabs, add/close at runtime |
| Tab reuse | Launching a new file while the server is running adds it as a tab |
| Annotations | Right-margin comment bubbles with author badges (human/AI) |
| Threaded replies | Reply to any annotation inline |
| Bookmarks | Global persistence to ~/.claude/bookmarks/ with INDEX.md |
| Sidecar JSON | Annotations persisted in file.md.annotations.json alongside source |
| File tagging | 7 predefined + custom tags via command palette # prefix |
| Command palette | Cmd+K / Ctrl+K for quick access to commands, tabs, and recent files |
| Catppuccin | Full Mocha (dark) / Latte (light) theme with 26 CSS variables |
| Typography | Cormorant Garamond headings, DM Sans body, Victor Mono code |
| Sidebar TOC | Resizable table of contents with scroll-spy |
| Code highlighting | highlight.js with Catppuccin syntax theme |
| Chrome --app | Opens in frameless Chrome window for native feel |
| Cross-file links | Local .md links open in new tabs instead of navigating away |
Annotation System
To create annotations interactively, select text in the viewer — a floating button appears, then fill in the comment form in the right gutter.
To create annotations programmatically (e.g., from Claude Code), use the --annotate CLI flag. This requires no running server — it writes directly to the sidecar JSON.
- Human authors — blue name badge
- AI authors — mauve name badge with robot icon
- Actions — resolve (toggle strikethrough) or delete (trash icon), revealed on hover
- Persistence — sidecar JSON file, auto-loaded on viewer refresh or file poll
Sidecar JSON Schema
{
"version": 1,
"tags": ["draft", "research"],
"annotations": [
{
"id": "a1b2c3",
"anchor": { "text": "selected phrase", "heading": "", "offset": 0 },
"author": { "name": "Claude", "type": "ai" },
"created": "2026-02-12T15:30:00+00:00",
"body": "Comment text here",
"resolved": false,
"replies": []
}
]
}
API Endpoints
| Endpoint | Method | Purpose |
|---|---|---|
/api/content?tab=<id> |
GET | Markdown content for a tab |
/api/tabs |
GET | List open tabs |
/api/annotations?tab=<id> |
GET | Annotations for a tab |
/api/tags?tab=<id> |
GET | Tags for a tab |
/api/add |
POST | Open a new file tab |
/api/close |
POST | Close a tab |
/api/annotate |
POST | Create an annotation |
/api/resolve |
POST | Toggle annotation resolved state |
/api/reply |
POST | Add a threaded reply |
/api/delete-annotation |
POST | Delete an annotation |
/api/tags |
POST | Add/remove a tag |
More from tdimino/claude-code-minoan
academic-research
Search academic papers, build literature reviews, and synthesize research findings — combines Exa MCP (research_paper category, arxiv filtering) with arxiv-mcp-server for paper discovery, download, and deep analysis. Triggers on academic paper, literature review, research synthesis, arxiv, find papers, scholarly search.
70travel-requirements-expert
Plan a trip, create an itinerary, or research a destination through a structured 5-phase workflow---discovery questions, Exa/Firecrawl research, expert detail gathering, and a day-by-day requirements spec. This skill should be used when a user says "plan a trip," "create an itinerary," "help me visit [place]," or needs travel research with specific venues, safety protocols, and dietary accommodations.
67twilio-api
Use this skill when working with Twilio communication APIs for SMS/MMS messaging, voice calls, phone number management, TwiML, webhook integration, two-way SMS conversations, bulk sending, or production deployment of telephony features. Includes official Twilio patterns, production code examples from Twilio-Aldea (provider-agnostic webhooks, signature validation, TwiML responses), and comprehensive TypeScript examples.
65figma-mcp
Convert Figma designs into production-ready code using MCP server tools. Use this skill when users provide Figma URLs, request design-to-code conversion, ask to implement Figma mockups, or need to extract design tokens and system values from Figma files. Works with frames, components, and entire design files to generate HTML, CSS, React, or other frontend code.
61firecrawl
Scrape web pages to clean markdown using Firecrawl v2 — handles JS-heavy pages, site crawls, URL mapping, document parsing (PDF/DOCX/XLSX), LLM-powered extraction, autonomous agent scraping, and post-scrape browser interaction (Interact API). Prefer over WebFetch for quality and completeness. Triggers on scrape URL, fetch page, crawl site, extract content, parse document, web to markdown, DeepWiki, Firecrawl.
51scrapling
Scrape pages locally with anti-bot bypass, TLS impersonation, and adaptive element tracking — no API keys, no cloud. Handles Cloudflare protection, CSS/XPath element extraction, and survives site redesigns. Complements firecrawl (cloud) with 100% local execution. Triggers on Cloudflare bypass, anti-bot scraping, stealth fetch, local scraping, Scrapling.
47