mend

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2026 License: MIT Imports: 12 Imported by: 0

README

mend

Markdown → HTML, one static binary, zero dependencies.

CI Release Go Report Card Go

$ mend -theme monokai README.md > readme.html

mend is a tiny, fast markdown-to-HTML converter written in Go. It produces self-contained HTML files with embedded CSS and inline-styled syntax highlighting — no JavaScript, no web fonts, no external requests.

  • ✅ CommonMark + GFM (tables, task lists, strikethrough, autolinks)
  • ✅ Footnotes, definition lists, smart typography
  • ✅ Syntax highlighting via chroma — 200+ languages
  • ✅ 4 built-in themes: github, github-dark, monokai, nord
  • ✅ Watch mode + HTTP live reload for previewing docs locally
  • ✅ Single static binary — ships via Homebrew, Scoop, go install, or just curl

Demo

mend rendered output

Screenshot of mend -theme github README.md rendered in the browser.

Install

Homebrew
brew install BWS1900/tap/mend
Scoop
scoop bucket add BWS1900 https://github.com/BWS1900/scoop-bucket
scoop install mend
go install
go install github.com/BWS1900/mend@latest
Binary download

Grab a release for your platform from the releases page.

Build from source
git clone https://github.com/BWS1900/mend
cd mend
go build -o mend .
sudo mv mend /usr/local/bin/    # optional

Usage

mend file.md                    # render to stdout
mend -o out.html file.md        # write to file
cat file.md | mend              # render stdin to stdout
mend -fragment file.md          # emit just the <body> content
mend -theme monokai file.md     # pick a theme
mend -no-highlight file.md      # disable syntax highlighting
mend -no-css file.md            # don't embed the page CSS
mend -w -o out.html file.md     # watch & re-render on change
mend -w -serve :8080 file.md    # watch & serve with live reload
mend --version
Themes
name description
github Light, default. GitHub-flavoured.
github-dark Dark counterpart.
monokai Vibrant dark theme.
nord Cool blue-grey nord palette.
none Disable chroma code styling.

Watch + live reload

mend -w -serve :8080 README.md

Open http://localhost:8080 and edit README.md in your editor. The browser reloads on save.

Library use

import "github.com/BWS1900/mend/internal/render"

html, err := render.Markdown([]byte("# hi"), render.Options{
    Highlight: true,
    Chroma:    "github",
})

Why mend?

mend (v.) to repair; to make whole; to finish.

mend finishes your markdown — turns a half-written .md file into a ready-to-ship .html file. The name is short, low-colision, and verb-shaped: it does a thing to a file.

Contributing

PRs welcome. Run the tests:

go test ./...

For releases, push a tag:

git tag v0.1.0
git push origin v0.1.0

.github/workflows/release.yml will build and publish binaries for linux/darwin/windows on amd64 and arm64.

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL