pro CLI
MD View CLI — open files, folders, and stdin from your shell
Skip the file dialog. mdview opens any file, folder, or piped text from your shell — auto-detects stdin, reuses the running window every time.
- docs/
- plan.md
- architecture.md
- notes.md
- src/
- README.md
#Project Plan
##Phase 1
- Audit current state
- Identify bottlenecks
- Draft proposal
##Phase 2
- Implement caching
- Refactor data layer
- Write tests
##Owner
R. Jain · review weekly
Run it — mdview lives in your shellFiles. Folders. Stdin. Headless export from CI.
What it does
The MSI ships a second binary called mdview and adds it to your per-user PATH. From any new PowerShell, cmd, or Git Bash session you can:
mdview README.md— open a single file.mdview .— open the current folder as a workspace, file tree in the sidebar.mdview C:\projects\notes— open any folder the same way.git diff | mdview— render whatever’s on stdin as an ephemeral markdown document.cat NOTES.md | mdview— same idea, anything you can pipe.mdview -— explicit stdin form, useful in scripts.
If MD View is already running, every invocation routes to the existing window via single-instance handoff — you don’t end up with five windows on your taskbar. If it isn’t running, the first command boots it.
Why it exists
The file dialog is friction. A markdown CLI tool on Windows lets you stay in your shell — cd, git, grep, ls — instead of alt-tabbing to a file dialog every time you want to read what your agent just wrote. The CLI lets you stay in flow: review what your agent wrote, pipe a diff, scan a folder, all without leaving the terminal context you were already in.
The piping form especially exists because so much AI output ends up in the shell now: logs from claude code, descriptions from gh pr view, generated specs from build scripts. Letting any of that pipe into MD View as a rendered document — without writing a temp file — is the difference between “I’ll read this later” and “I’ll read this now.”
How to use it
After installing MD View from the MSI, open a new shell. The mdview command is on PATH globally. The basic form is mdview <file|folder|.>. Stdin works automatically when MD View detects piped input; you can also force it with --stdin or -.
Under the hood
mdview.exe is a console-subsystem binary, separate from the GUI binary md-view.exe. Console subsystem matters because GUI binaries can’t read stdin or write to a parent shell — Windows splits them at the OS loader level. So MD View ships both: GUI for the window, console for the CLI shim.
Single-instance routing uses tauri-plugin-single-instance. The first invocation acquires a named lock; later invocations detect the lock, send their arguments over a local socket to the running primary, and exit immediately. The primary handles whatever was sent — open the file, switch to workspace mode, render the stdin payload. The lock is per-user, so multiple users on the same machine each get their own primary.
Stdin documents use the internal sentinel DocumentPayload.path === "<stdin>". The watcher and recents subsystems both check for this sentinel and skip stdin docs — they’re ephemeral by design.
Use cases
- Review AI agent output without alt-tabbing:
claude code generate-spec | mdview— the spec opens in MD View while your terminal stays focused. - Scan a workspace from a project root:
cd repo && mdview .— file tree, click around, no GUI navigation. - Render
git difffor context-heavy review:git diff main...HEAD | mdview— get diff coloring as actual rendered markdown, not 4-space-indented terminal output. - Pipe HTTP responses:
curl https://example.com/spec.md | mdview— any URL that returns markdown becomes a temporary doc, no file written. - Re-route an open file by piping a fresh copy:
cat updated-spec.md | mdview— the active window swaps to the new content without you reopening the file dialog.
Frequently asked questions
- Does the command block my shell?
- No. mdview returns immediately after the file is opened in the (new or existing) window. You're back at your prompt instantly.
- Does piped stdin show up in recents?
- No. Stdin documents are ephemeral — they have an internal sentinel path of `<stdin>`, no watcher, and don't enter the recents list. Open files do.
- What if MD View is already running?
- The CLI hands the file off to the existing window via single-instance routing. Whether you typed `mdview foo.md` for the first time today or the tenth, the same MD View window receives it and brings itself to the front.
- Where does the mdview command come from?
- It's a tiny console-subsystem binary (`mdview.exe`) that ships alongside the GUI binary (`md-view.exe`). The MSI installer adds the install directory to your per-user PATH, so it's available in any new shell after install.
MD View — free, lifetime $24
14-day Pro trial. Then keep every Free feature forever.