Modes of Operation

Modes of Operation

mbr offers four distinct modes, each optimized for different workflows.

Mode Overview

flowchart LR
    subgraph Input
        MD[Markdown Files]
    end

    subgraph Modes
        GUI["GUI Mode<br/>(default)"]
        SRV["Server Mode<br/>-s"]
        CLI["CLI Mode<br/>-o"]
        BLD["Build Mode<br/>-b"]
    end

    subgraph Output
        HTML[HTML to stdout]
        WEB[Web Browser]
        APP[Native Window]
        STATIC[Static Site]
    end

    MD --> GUI --> APP
    MD --> SRV --> WEB
    MD --> CLI --> HTML
    MD --> BLD --> STATIC

Mode Comparison

ModeFlagUse CaseLive ReloadSearch
GUI(none) or -gDesktop app experienceYesYes (Live grep)
Server-sDevelopment, browsingYesYes (Live grep)
CLI-oPipe to tools, scriptsNoNo
Build-bDeploy to static hostsN/AYes (Pagefind)

Choosing a Mode

Use CLI Mode When…

mbr -o document.md > output.html
mbr -o document.md | pbcopy  # Copy to clipboard (macOS)

Use Server Mode When…

mbr -s ~/notes
# Open http://127.0.0.1:5200/

Use GUI Mode When…

mbr ~/notes         # Default mode (launches GUI)
mbr -g ~/notes      # Explicit flag (same result)

Use Build Mode When…

mbr -b --output ./public ~/notes

Detailed Guides