Your Markdown is
a filesystem.

mq-mount mounts Markdown files as a virtual filesystem. Headings become directories and section bodies become files, so ls, cat, grep and any editor just work.

Get started Read the docs View on GitHub
curl -fsSL https://raw.githubusercontent.com/harehare/mq-mount/main/bin/install.sh | bash
mq-mount demo: mounting a Markdown file in the background, then ls and cat on a section, and editing it

Headings become directories

Each heading is a directory, and the text under it is its content.md. Nesting follows heading depth, so cd and ls walk the document like a tree.

guide.md                  mounted at /tmp/mnt/guide/

# Getting Started    ->   getting-started/content.md
# Usage              ->   usage/content.md
## Tips              ->   usage/tips/content.md

Features

Everything you need to treat a document as files, without leaving the shell.

Read-only by default

Nothing touches your files until you pass --write. --filter always mounts read-only.

Section-scoped edits

Rewrite one section's content.md. Only that part of the source changes; every other byte stays put.

Your formatting stays

Edits are saved as you wrote them. List markers, table padding and blank lines are not re-rendered.

Cheap for agents

grep -r for a heading, then cat one section. --toc gives the outline and --full a whole chapter in one read.

Filters & globs

--filter takes an mq query. --include and --exclude pick the files in a directory mount.

Shell-friendly names

--slug kebab turns Getting Started into getting-started. Easier to type, easier to script.

Plays well with editors

Atomic saves from vim and VS Code work. A conflicting change on disk is kept in .conflict-<time>, never dropped.

Big documents

A 34 MB file with 200,000 sections opens in about a second on an Apple silicon Mac, and a save takes milliseconds.

Background mounts

-d, --list --json and --stop, plus defaults in .mq-mount.toml.

See it work

Mount a file, read a section, append to it and add a subsection. The source file changes, and nothing else does.

$ cat guide.md
# Getting Started

Install the binary and mount a file.

# Usage

Browse it with ls and cat.

$ mq-mount guide.md /tmp/mnt --write --slug kebab -d
$ ls /tmp/mnt/guide
content.md  getting-started  usage
$ cat /tmp/mnt/guide/getting-started/content.md
Install the binary and mount a file.
$ echo "Run mq-mount --help for options." >> /tmp/mnt/guide/getting-started/content.md
$ mkdir /tmp/mnt/guide/usage/tips
$ cat guide.md
# Getting Started

Install the binary and mount a file.
Run mq-mount --help for options.

# Usage

Browse it with ls and cat.

## tips
$ mq-mount --stop /tmp/mnt

Install

One binary. Pick whichever way you like.

Install script

curl -fsSL https://raw.githubusercontent.com/harehare/mq-mount/main/bin/install.sh | bash

cargo-binstall

cargo binstall mq-mount

From source

git clone https://github.com/harehare/mq-mount
cd mq-mount
cargo build --release

macOS

Uses the built-in NFS client. No packages to install.

Linux

Needs the mount.nfs helper (nfs-common or nfs-utils) and sudo.

Windows

Needs WinFSP. Experimental: not yet verified on a real Windows machine.