MCPcopy Index your code
hub / github.com/anypost/emailmd

github.com/anypost/emailmd @v0.7.3

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.7.3 ↗ · + Follow
423 symbols 1,182 edges 143 files 26 documented · 6%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

emailmd

Write markdown. Ship emails. No HTMHELL.

emailmd converts markdown into responsive, email-safe HTML that works across Gmail, Outlook, Apple Mail, Yahoo, and every other client.

emailmd

Install

npm install emailmd

Quick Start

import { render } from "emailmd";

const { html, text } = await render(`
# Welcome!

Thanks for signing up.

[Get Started](https://example.com){button}
`);

// html → complete email-safe HTML
// text → plain text version for text/plain MIME part

v0.3.0 migration: render() is now async. Update calls from render(md) to await render(md). Requires Node 20+ (MJML 5).

CLI

emailmd also ships with a command-line interface.

# Render to HTML
emailmd input.md

# Write to file
emailmd input.md -o output.html

# Plain text output
emailmd input.md --text

# Pipe from another command
echo "# Hello" | emailmd

Run emailmd --help for all options.

React

@emailmd/react provides a live-preview hook (useEmailmd), an <EmailPreview /> iframe component, and <EmailmdBuilder /> — the full builder as a drop-in component for your own app.

npm install @emailmd/react emailmd

Learn More

  • Docs — full syntax reference, theming, frontmatter, directives, and API
  • Templates — ready-made email templates you can copy and customize
  • Builder — live editor to write and preview emails in your browser

AI

emailmd is just markdown, so AI is great at writing templates. Feed the full docs to your AI tool:

https://www.emailmd.dev/llms-full.txt

Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request.

emailmd is under active development. The API may change between minor versions until we hit 1.0 — breaking changes are always called out in the changelog. See Stability & Versioning for what the semver contract covers.

Acknowledgements

License

MIT

Extension points exported contracts — how you extend this code

CodePalette (Interface)
* Syntax-highlighting token colors (GitHub-flavored palettes). Fenced code * blocks carry `hljs-*` classed spans (see h
packages/emailmd/src/mjml.ts
UseEmailmdOptions (Interface)
(no doc)
packages/react/src/use-emailmd.ts
Template (Interface)
(no doc)
apps/web/lib/templates.ts
RenderOptions (Interface)
(no doc)
packages/emailmd/src/index.ts
UseEmailmdResult (Interface)
(no doc)
packages/react/src/use-emailmd.ts
RenderResult (Interface)
(no doc)
packages/emailmd/src/index.ts
RenderedState (Interface)
(no doc)
packages/react/src/use-emailmd.ts
Theme (Interface)
(no doc)
packages/emailmd/src/theme.ts

Core symbols most depended-on inside this repo

render
called by 482
packages/emailmd/src/index.ts
cn
called by 81
apps/web/lib/utils.ts
icon
called by 40
packages/react/src/builder/icons.tsx
withView
called by 38
packages/react/src/builder/toolbar.tsx
insertBlock
called by 30
packages/react/src/builder/editor-commands.ts
parseDirectiveParams
called by 28
packages/emailmd/src/params.ts
lint
called by 25
packages/emailmd/src/lint.ts
cx
called by 22
packages/react/src/builder/ui.tsx

Shape

Function 380
Interface 37
Method 6

Languages

TypeScript100%

Modules by API surface

packages/emailmd/src/mjml.ts56 symbols
packages/emailmd/src/segmenter.ts18 symbols
packages/react/src/builder/ui.tsx17 symbols
apps/web/components/ui/combobox.tsx16 symbols
apps/web/components/ui/dropdown-menu.tsx15 symbols
packages/react/src/builder/theme-dialog.tsx13 symbols
apps/web/components/ui/alert-dialog.tsx12 symbols
packages/react/src/builder/output-pane.tsx10 symbols
apps/web/components/ui/select.tsx10 symbols
apps/web/components/ui/field.tsx10 symbols
apps/web/components/ui/dialog.tsx10 symbols
packages/react/src/builder/frontmatter-utils.ts9 symbols

For agents

$ claude mcp add emailmd \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact