Install and set up dd_emailforge
This guide gets dd_emailforge installed and opens your first template. It takes about five minutes.
Keys, screens, and commands may differ in other versions.
-
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
curlandtar. 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 --versionIf it's missing or older than v20, install the current LTS version from nodejs.org.
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
Image not captured yet. Terminal showing the install command finishing successfully
Planned file: source/images/emailforge/install-and-setup/install-and-setup-01-install-complete.png
Alt text: A terminal window showing the dd_emailforge install script finishing
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.
If you see "command not found", ~/.local/bin isn't on your PATH yet. See FAQ and troubleshooting.
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
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.)
If you skip npm install, the app still opens and edits your template, but preview and export fail. dd_emailforge doesn't download MJML on its own.
From inside the folder, run:
dd_emailforge .
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.)
Make your terminal window at least 48 columns wide, and ideally much wider. In very narrow windows the app shows only the Structure panel, and the shortcut bar at the bottom drops some keys.
| File or folder | What it is |
|---|---|
template.json | Your template. This is the file dd_emailforge edits and saves. |
images/ | A place for local images. |
package.json | Tells npm install which MJML version to install. |
node_modules/, package-lock.json | Created by npm install. |
.gitignore | Keeps temporary files out of version control. |
template.mjml, template.html | Created when you export. template.html is the file you send. |
-
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, plusVERSIONto pin a release. -
npm installinstalls the MJML version pinned in the folder'spackage.json(mjml ^5.4.0). dd_emailforge always calls the Nodemjmlcompiler. It doesn't fall back tonpxor another MJML engine.
Previous: dd_emailforge overview · Next: A tour of the app