Search

Install and set up dd_emailforge

This guide gets dd_emailforge installed and opens your first template. It takes about five minutes.

What you need
  • A Mac or Linux computer. Ready-made builds exist for macOS and Linux, on both Intel/AMD (x86_64) and ARM (aarch64, including Apple silicon) processors. There's no Windows build in v0.9.2.

  • A terminal with curl and tar. Both come with macOS and most Linux systems.

  • Node.js 20 or newer. You need it to preview and export. The app opens and edits templates without it, but preview and export won't work. Check your version with:

    node --version
    

    If it's missing or older than v20, install the current LTS version from nodejs.org.

Step 1: Install the app

Copy this into your terminal and press Enter:

curl -fsSL https://raw.githubusercontent.com/ldnddev/dd_emailforge/main/install.sh | bash

To install exactly the version these guides were written for, pin it:

curl -fsSL https://raw.githubusercontent.com/ldnddev/dd_emailforge/main/install.sh | VERSION=v0.9.2 bash

The installer:

  • puts the app at ~/.local/bin/dd_emailforge,
  • writes the app's color theme to ~/.config/ldnddev/dd_emailforge_theme.yml, and
  • creates a ~/.config/ldnddev/dd_emailforge/templates/ folder. (This folder isn't used yet in v0.9.2, so you can ignore it.)

Check that it worked:

dd_emailforge --version

You should see dd_emailforge 0.9.2. To see every command, run dd_emailforge --help.

A terminal showing dd_emailforge help output with its list of commands

If you see "command not found", ~/.local/bin isn't on your PATH yet. See FAQ and troubleshooting.

Step 2: Create a template folder

Each email template lives in its own folder. The quickest start is a starter: a ready-made template you can change. There are four: welcome, newsletter, promo, and transactional.

This creates a folder called ldnddev-monthly from the newsletter starter. It's the one we use in Build your first email. (If you leave out --from, you get the welcome starter.)

dd_emailforge init ./ldnddev-monthly --from newsletter
Step 3: Install MJML in the folder

dd_emailforge uses a free tool called MJML to turn your template into email-ready HTML. Install it inside the template folder:

cd ldnddev-monthly
npm install

You'll do this once for each new template folder. init doesn't do it for you; it just reminds you with a cd <folder> && npm install line. (You can skip it if mjml is already installed on your computer and on your PATH.)

A terminal showing a new template folder created from the newsletter starter, with template.json, images, package.json and node_modules
Step 4: Open the template

From inside the folder, run:

dd_emailforge .
dd_emailforge open on a new template made from the newsletter starter

Next time, just run dd_emailforge with no folder. It reopens the last template you had open.

To quit, press Ctrl+Q. (Pressing q on its own does nothing, so you won't quit by accident.)

What's in a template folder
File or folderWhat it is
template.jsonYour template. This is the file dd_emailforge edits and saves.
images/A place for local images.
package.jsonTells npm install which MJML version to install.
node_modules/, package-lock.jsonCreated by npm install.
.gitignoreKeeps temporary files out of version control.
template.mjml, template.htmlCreated when you export. template.html is the file you send.
For developers: install options
  • Build from a clone (needs Rust/cargo): ./install.sh. To use a prebuilt release from a clone instead: ./install.sh --from-release.

  • Uninstall from a clone: ./install.sh uninstall. Without a clone:

    curl -fsSL https://raw.githubusercontent.com/ldnddev/dd_emailforge/main/install.sh | bash -s -- uninstall
    
  • Updating: re-run the install command. It replaces the binary in place and leaves an existing theme file alone. Downloads are checked against the release's .sha256.

  • Environment overrides for the installer: PREFIX, BIN_DIR, CONFIG_DIR, XDG_CONFIG_HOME, plus VERSION to pin a release.

  • npm install installs the MJML version pinned in the folder's package.json (mjml ^5.4.0). dd_emailforge always calls the Node mjml compiler. It doesn't fall back to npx or another MJML engine.