{"id":45572549,"url":"https://github.com/paulhkang94/markview","last_synced_at":"2026-03-01T08:06:12.715Z","repository":{"id":338768539,"uuid":"1159066033","full_name":"paulhkang94/markview","owner":"paulhkang94","description":"Native macOS markdown preview app. Swift/SwiftUI, GitHub Flavored Markdown, syntax highlighting, linting, plugins. No Electron.","archived":false,"fork":false,"pushed_at":"2026-02-25T08:13:27.000Z","size":9363,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-25T13:21:43.850Z","etag":null,"topics":["gfm","macos","markdown","markdown-preview","native-app","swift","swiftui"],"latest_commit_sha":null,"homepage":"https://paulkang.dev","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paulhkang94.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-16T09:19:08.000Z","updated_at":"2026-02-25T08:13:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/paulhkang94/markview","commit_stats":null,"previous_names":["paulhkang94/markview"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/paulhkang94/markview","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulhkang94%2Fmarkview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulhkang94%2Fmarkview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulhkang94%2Fmarkview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulhkang94%2Fmarkview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paulhkang94","download_url":"https://codeload.github.com/paulhkang94/markview/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulhkang94%2Fmarkview/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29964203,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T06:55:38.174Z","status":"ssl_error","status_checked_at":"2026-03-01T06:53:04.810Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gfm","macos","markdown","markdown-preview","native-app","swift","swiftui"],"created_at":"2026-02-23T08:24:50.274Z","updated_at":"2026-03-01T08:06:12.691Z","avatar_url":"https://github.com/paulhkang94.png","language":"Swift","funding_links":["https://github.com/sponsors/paulhkang94"],"categories":["Development Tools Mcp Servers"],"sub_categories":[],"readme":"# MarkView\n\nA native macOS markdown preview app built with Swift and SwiftUI. No Electron, no web server — just a fast, lightweight previewer that renders GitHub Flavored Markdown.\n\n## Demo\n\n![MarkView demo](docs/markview_demo.gif)\n\n## Screenshots\n\n| Preview only | Editor + Preview |\n|:---:|:---:|\n| ![Preview](docs/screenshots/preview-only.png) | ![Editor + Preview](docs/screenshots/editor-preview.png) |\n\n## Features\n\n- **Live preview** with split-pane editor and WKWebView rendering\n- **GitHub Flavored Markdown** via Apple's swift-cmark (tables, strikethrough, autolinks, task lists)\n- **Syntax highlighting** for 18 languages via Prism.js\n- **Markdown linting** with 9 built-in rules and status bar diagnostics\n- **File watching** with DispatchSource (works with VS Code, Vim, and other editors)\n- **Multi-format support** via plugin architecture (Markdown, CSV, HTML)\n- **HTML sanitizer** that strips scripts, event handlers, and XSS vectors\n- **Auto-suggestions** for code fence languages, emoji, headings, and links\n- **Export** to HTML and PDF\n- **Dark mode** support with system/light/dark theme options\n- **17 configurable settings** including font, preview width, tab behavior, and more\n\n## Installation\n\n### Homebrew (recommended)\n\n```bash\n# Full .app with Quick Look extension\nbrew install --cask paulhkang94/markview/markview\n\n# CLI only (builds from source)\nbrew tap paulhkang94/markview\nbrew install markview\n```\n\nThe app is Apple notarized and Gatekeeper approved — no quarantine warnings on install.\n\n### Build from source\n\n**Prerequisites:** macOS 14+, Swift 6.0+ (included with Xcode Command Line Tools)\n\n```bash\ngit clone https://github.com/paulhkang94/markview.git\ncd markview\nswift build -c release\n```\n\n### Install as app (Open With support)\n\n```bash\nbash scripts/bundle.sh --install\n```\n\nThis creates `MarkView.app` in `/Applications` and registers it with Launch Services. You can then right-click any `.md` file in Finder and choose **Open With \u003e MarkView**.\n\n### Install CLI commands\n\n```bash\nbash scripts/install-cli.sh\n```\n\nThis creates `mdpreview` and `md` symlinks in `~/.local/bin/`. Note: if `md` is aliased in your shell (e.g., to `mkdir`), use `mdpreview` instead.\n\n## Usage\n\n### CLI\n\n```bash\nmdpreview README.md       # Open a file\nmdpreview                 # Open empty editor\n```\n\n### Finder\n\nRight-click any `.md`, `.markdown`, `.mdown`, `.mkd` file \u003e **Open With** \u003e **MarkView**\n\n### Programmatic\n\n```bash\nopen -a MarkView README.md\n```\n\n## MCP Server (AI Integration)\n\nMarkView includes an [MCP](https://modelcontextprotocol.io) server that lets AI assistants preview markdown directly in MarkView.\n\n### Tools\n\n| Tool | Description |\n|------|-------------|\n| `preview_markdown` | Write content to a temp file and open it in MarkView with live reload |\n| `open_file` | Open an existing `.md` file in MarkView |\n\n### Quick Start (npx)\n\n```bash\nnpx mcp-server-markview\n```\n\n### Claude Code Setup\n\nAdd to `~/.claude/settings.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"markview\": {\n      \"command\": \"npx\",\n      \"args\": [\"mcp-server-markview\"],\n      \"type\": \"stdio\"\n    }\n  }\n}\n```\n\nOr use the built binary directly (faster startup, no Node.js required):\n\n```json\n{\n  \"mcpServers\": {\n    \"markview\": {\n      \"command\": \"/path/to/markview/.build/release/MarkViewMCPServer\",\n      \"type\": \"stdio\"\n    }\n  }\n}\n```\n\n### Claude Desktop Setup\n\nAdd to `~/Library/Application Support/Claude/claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"markview\": {\n      \"command\": \"npx\",\n      \"args\": [\"mcp-server-markview\"]\n    }\n  }\n}\n```\n\n### Test the MCP server\n\n```bash\nbash scripts/test-mcp.sh\n```\n\n## Architecture\n\n```\nSources/MarkViewCore/           # Library (no UI, fully testable)\n  MarkdownRenderer.swift        # cmark-gfm C API wrapper\n  FileWatcher.swift             # DispatchSource file monitoring\n  MarkdownLinter.swift          # 9-rule pure Swift linting engine\n  MarkdownSuggestions.swift     # Auto-suggest engine\n  LanguagePlugin.swift          # Plugin protocol + registry\n  HTMLSanitizer.swift           # XSS prevention\n  Plugins/                      # CSV, HTML, Markdown plugins\n\nSources/MarkView/               # SwiftUI app (macOS 13+)\n  ContentView.swift             # Split-pane editor + preview\n  WebPreviewView.swift          # WKWebView with Prism.js\n  Settings.swift                # 17 settings with theme/width/font enums\n  ExportManager.swift           # HTML/PDF export\n\nSources/MarkViewMCPServer/      # MCP server for AI tool integration\n  main.swift                    # stdio JSON-RPC server (preview_markdown, open_file)\n\nTests/TestRunner/               # 341 standalone tests (no XCTest)\nTests/VisualTester/             # 19 visual regression tests + WCAG contrast\nTests/FuzzTester/               # 10K random input crash testing\nTests/DiffTester/               # Differential testing vs cmark-gfm CLI\nscripts/test-mcp.sh             # 5 MCP protocol + integration tests\n```\n\nSee [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) for full details.\n\n## Testing\n\n```bash\n# Run all tests (341 tests)\nswift run MarkViewTestRunner\n\n# Full verification (build + tests)\nbash verify.sh\n\n# Extended (fuzz + differential)\nbash verify.sh --extended\n```\n\n## Development\n\n```bash\nswift build                          # Build all targets\nswift run MarkView                   # Launch app\nswift run MarkView /path/to/file.md  # Launch with file\nswift run MarkViewTestRunner         # Run tests\n```\n\n## Support\n\nIf MarkView is useful to you, consider supporting development:\n\n- [GitHub Sponsors](https://github.com/sponsors/paulhkang94)\n- Star this repo to help others find it\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulhkang94%2Fmarkview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaulhkang94%2Fmarkview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulhkang94%2Fmarkview/lists"}