Download

Follow these steps to use MJML on your computer

1Install locally with npm



You can install MJML on OSX, Linux and Windows using npm.

$ npm init -y && npm install mjml

To run MJML, type

$ ./node_modules/.bin/mjml index.mjml

2Add it to your path



For a better experience, add MJML to your path

$ export PATH="$PATH:./node_modules/.bin"

Now, all it takes to run MJML is

$ mjml index.mjml

Note for Windows users: you may need to replace regular slashes ( / ) with backslashes ( \ ) in all the paths of the above commands.

After the installation

Some useful command lines to use MJML

Once installed, you can run the engine from the command-line:

$ mjml -r index.mjml

This will output the compiled HTML to stdout.

You can also watch a file to automatically update the output file (index.html) on any changes:

$ mjml --watch index.mjml -o index.html

To save the HTML result to a file of your choice use:

$ mjml -r index.mjml -o index.html

Check out the usage section of our documentation to make the use of MJML.

Integrate MJML in your workflow

Extensions/plugins are available for Visual Studio Code and Sublime Text and a desktop app is also available.

Visual Studio Code
Sublime Text Plugin
MJML Desktop App