The setup command
In the app's welcome screen (and here) you'll see this one line:
curl -fsSL https://macmdviewer.com/setup | bashIt downloads a Bash script from macmdviewer.com/setup and runs it. Piping a script to bash is a fair thing to be cautious about, so everything it does is documented below, and you can read the exact script before running anything.
What it actually does
The script looks for the AI coding tools you use (by checking for their config) and, for the ones it can set up automatically — Claude Code, Cursor, and Windsurf— adds a small hook. The hook does one thing: when your assistant writes or edits a .md file, it runs open -a 'MacMD Viewer'on that file. Nothing else — it never changes your Markdown content, because MacMD is a read-only viewer. For VS Code and JetBrainsit doesn't edit anything automatically; it prints the manual steps for you instead (see below).
Exactly which files it changes
- Claude Code — adds a
PostToolUsehook to~/.claude/settings.json, and installs a/macmdskill at~/.claude/skills/macmd/(see below) - Cursor — adds an
afterFileEdithook to~/.cursor/hooks.json - Windsurf — adds a
post_cascade_responsehook to~/Library/Application Support/Windsurf/hooks.json - VS Code / GitHub Copilot and JetBrains— the script does not edit anything automatically; it prints the manual steps for you to copy (Run on Save extension / File Watchers plugin)
It never uses sudo and never touches system files. Everything it changes lives in your home folder: your tool config files, plus a timestamped backup of each one it saves before editing (filename.bak.YYYYMMDD_HHMMSS). It skips any tool that's already set up, so re-running is safe.
Claude Code: the /macmd command
On Claude Code the script also drops a small skill so you can drive the viewer by hand:
/macmd— open the file your assistant just wrote/macmd path/to/file.md— open a specific file/macmd offand/macmd on— pause or resume auto-open/macmd status— check whether auto-open is on
Auto-open is on by default after setup; the toggle just creates or removes a marker file at ~/.claude/.macmd-autoopen. The other tools get the auto-open hook but not the /macmd command, which is Claude Code specific.
Preview it first (no changes)
Run it in dry-run mode to see what it would do without modifying anything:
curl -fsSL https://macmdviewer.com/setup | bash -s -- --dry-runOne thing to know: piped straight to bashit's non-interactive, so it configures every tool it can set up automatically without pausing to ask. Use --dry-run first if you want to see the list before committing.
Remove it anytime
The same script cleanly removes everything it added — the hooks, the /macmd skill, and the auto-open marker:
curl -fsSL https://macmdviewer.com/setup | bash -s -- --uninstallPrefer not to run a script?
You don't need any of this to use MacMD Viewer. Just double-click a .mdfile, or set MacMD as your default Markdown viewer (Finder → right-click a .md → Get Info → Open With → Change All). The AI auto-open is purely a convenience for people whose assistant generates a lot of Markdown.
Still have questions?
Email support@macmdviewer.com and I'll help.