Skip to content
hafenrPublic

About

Native macOS viewer for Markdown files with Mermaid diagrams, rendered like GitHub

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Ogle logo: a round eye with a lime iris glancing down at a page reading md

Ogle

Ogle at your Markdown files... with vim.

  • Markdown with Mermaid diagrams, syntax highlighting, alerts and front matter
  • Neovim built in, with your own config, beside the preview, or a plain Mac text editor, chosen in Settings
  • Linked panes: the editor and the preview scroll and zoom together, or apart
  • Reloads on save and highlights what changed
  • Find with match counts, an outline sidebar, and Open Quickly for recent files
  • Native macOS, light and dark

Ogle with Neovim on the left and the rendered preview on the right, scrolled together

Ogle showing a Markdown file with an image, a callout and a Mermaid flowchart Ogle's start page: a drop area under the Ogle eye, beside the Open Quickly list of recent files

Installation

Download

Download Ogle.zip from the latest release (Apple Silicon, macOS 15 or later), unzip it, and move Ogle.app to ~/Applications. Releases are signed and notarized by Apple.

Build from source

Requirements: macOS 15 or later, the Swift toolchain (Xcode, or the Command Line Tools via xcode-select --install), Node.js with npm, and curl (build.sh downloads the Neovim release it bundles).

  1. Build the app from the project directory:

    ./build.sh          # produces build/Ogle.app
  2. Install it and open it once, so macOS registers it for Finder's "Open With" and the command-line launcher:

    cp -R build/Ogle.app ~/Applications/
    open ~/Applications/Ogle.app

    Use /Applications instead to install it for all users.

  3. Optionally, install the ogle command:

    mkdir -p ~/.local/bin
    ln -s "$PWD/bin/ogle" ~/.local/bin/ogle

    ~/.local/bin must be on your PATH (e.g. add export PATH="$HOME/.local/bin:$PATH" to ~/.zshrc). The command is a link into this checkout, so keep the checkout where it is.

  4. Optionally, make Ogle the default app for Markdown files: select a .md file in Finder, choose File › Get Info (⌘I), pick Ogle under "Open with", and click Change All….

Updating

Ogle checks for updates once a day and offers to install them; Ogle › Check for Updates… checks right away. Builds from source check too, and are offered the release that follows the commit they were built from.

To update a build from source by hand, quit Ogle, then rebuild and replace the installed app:

./build.sh && rm -rf ~/Applications/Ogle.app && cp -R build/Ogle.app ~/Applications/

Uninstalling

rm -rf ~/Applications/Ogle.app ~/.local/bin/ogle
defaults delete dev.ogle    # recent files and window layout

Testing

The tests drive the app build.sh built, in a window they keep invisible: its page, the text editor, and Neovim with a home directory of its own, so without your configuration.

./build.sh && swift test

Releasing

Releases are built, signed and notarized on a Mac with the Developer ID certificate, and published with the GitHub CLI. Once, save notary credentials with xcrun notarytool store-credentials ogle-notary and log in with gh auth login. The key that signs updates is in the login keychain of the Mac that made it; to release from another Mac, export it with .build/artifacts/sparkle/Sparkle/bin/generate_keys -x ogle-update-key and import it there with -f ogle-update-key. Then, on an up-to-date main with everything committed:

scripts/release.sh          # shows the latest release and the next version
scripts/release.sh 0.3.3    # builds, signs, notarizes, then asks before tagging and publishing

Usage

ogle README.md

Or use File › Open… (⌘O), drop a file on the Dock icon, or pick Ogle from Finder's "Open With". Zoom with ⌘+ / ⌘- / ⌘0 or pinch; pinching magnifies the preview only, and never changes the editor's text size, which follows ⌘+ / ⌘- / ⌘0 alone. Links to other Markdown files open in Ogle; other links open in the default app. A diagram's Open full window button shows it on its own: scroll or drag to move around it, and pinch, ⌘-scroll or ⌘+ / ⌘- / ⌘0 to zoom; Esc closes it.

Keyboard shortcuts

Shortcut Action
⌘O / ⇧⌘O Open… / Open Quickly…
⇧⌘W Close the file and go back to the start page
⌘F, ⌘G / ⇧⌘G Find, next / previous match
⌃⌘E Show or hide the editor
⌘S Save, in the text editor (Neovim saves with :w)
⌃⌘S Show or hide the sidebar
⌘+ / ⌘− / ⌘0 Zoom in / out / actual size
⌥⌘O Open in the default editor
⇧⌘E / ⌘P Export as PDF / Print

About

Native macOS viewer for Markdown files with Mermaid diagrams, rendered like GitHub

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages