mq-open is a desktop-native Markdown previewer and mq-lang query processor. it provides a highly responsive interface for developers to slice, filter, and visualize Markdown content in real-time.
It can be used as a standalone application or as a subcommand of mq (e.g., mq-open executable in path).
- Rich Markdown Preview: High-fidelity rendering of Markdown elements including Headings, Tables, Lists, Blockquotes, Links, and Images.
- Interactive Table of Contents: A hierarchical sidebar that automatically generates a tree-view of your document for fast navigation (click-to-scroll).
- Live mq-lang Integration: Execute complex queries against your Markdown file and see the filtered results rendered instantly.
- Hot Reloading: Automatically reloads and re-executes queries when the source file is modified in an external editor.
- Desktop-Native Experience:
- Drag and Drop: Open files by dropping them onto the application window.
- Native File Dialogs: Seamless OS integration for opening files.
- Keyboard Shortcuts: Efficient workflow with shortcuts like
Cmd/Ctrl + Oto open andCmd/Ctrl + Tto toggle themes.
- Theming: Supports both Light and Dark modes with styling inspired by mqlang.org.
- Document Statistics: Live status bar showing node counts, word counts, and query performance metrics.
- Window State Persistence: Window size and position are automatically saved and restored on next launch.
curl -fsSL https://raw.githubusercontent.com/harehare/mq-open/main/bin/install.sh | bashThe installer will:
- Detect your OS and architecture automatically
- Download the latest release binary from GitHub
- Verify the SHA256 checksum
- Install to
~/.mq/bin/mq-open - Add
~/.mq/binto yourPATHin your shell profile
After installation, restart your terminal or source your shell profile, then run:
mq-open --versionEnsure you have the Rust toolchain installed.
cargo build --release -p mq-openOr run directly:
cargo run -p mq-open -- [file.md]- Launch: Open the app via the command line or by running the binary.
- Open File: Click the "Open" button, press
Ctrl+O, or drag a.mdfile into the window. - Query: Enter an
mq-langquery (e.g.,.h2ornodes | filter(.type == "Code")) in the top bar to filter the view. - Navigate: Use the Table of Contents on the left to jump between sections.
MIT
