Derek Rushforth

⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄⠄⠂⠁⠁⠂⠄

Postmark CLI

Postmark is a transactional email platform for web apps. During a company-wide hack week, I built the first iteration of the command-line tool for Postmark. This was my first time building a CLI tool, so it was super cool diving into something new.

Managing Postmark templates

While Postmark supports email templates, they were only accessible from the web app and REST API. This made it difficult for teams who had fancier development workflows or managed their templates with version control. The postmark templates command enables developers to:

  • Automate the deployment process to Postmark
  • Develop templates locally
  • Utilize version control
  • Integrate build tools like Webpack or Gulp, plus whatever other cool templating frameworks are out there
  • Automate the workflow with CI/CD integrations

Pull templates

postmark templates pull downloads templates from Postmark’s servers, similarly to git pull.

Push templates

postmark templates push uploads all of the templates and layouts in the current working directory up to Postmark. The CLI tool displays a summary of changes prior to pushing them up.

Preview templates

postmark templates preview spins up a local server so that developers can preview all of their templates. The template, layout, and dynamic variables are all compiled so that it’s as close to production as possible. It also comes with hot reloading, so updates automatically appear as file changes are made.

Other commands

The CLI tool’s main focus was on the template development workflow. However, it also comes with a couple extra commands to help with the development workflow.

Send an email

postmark email supports sending both raw or template emails. Enabling triggered emails via a CI/CD pipeline when a certain condition is met.

Fetch server information

postmark servers displays the servers for an account. Postmark is an API driven product, so being able to quickly grab keys or server information as part of a development workflow was crucial.