Search

Lib.rs

› Web programming | Email
#email-validation #email-template #convert-html #migrate #framework #css #responsive #wasm-module #template-engine #tr

app inky-cli

Inky CLI — transform, migrate, and validate email templates

Owned by Joe Workman.

  • Install
  • GitHub repo (foundation)
  • Home (foundationcss.com)

9 releases

2.0.0-beta.9 Apr 24, 2026
2.0.0-beta.8 Mar 31, 2026
2.0.0-beta.5 Mar 30, 2026
2.0.0-beta.1 Mar 20, 2026

#684 in Email

MIT license

330KB
8K SLoC

Inky

Inky is a complete email framework that converts simple HTML into complex, responsive email-ready HTML. It includes a templating engine, built-in responsive CSS, CSS inlining, validation, and a CLI toolchain.

Written in Rust. Distributed as a CLI binary, WASM module, native shared library, and Rust crate — with official bindings for Node.js, PHP, Python, Ruby, and Go.

Inky was formerly known as "Foundation for Emails." Starting with v2, everything is unified under the Inky brand.

Give Inky simple HTML like this:

<container>
  <row>
    <column lg="6">Left</column>
    <column lg="6">Right</column>
  </row>
</container>

And get email-ready HTML like this:

<table role="presentation" align="center" class="container">
  <tbody><tr><td>
    <table role="presentation" class="row">
      <tbody><tr>
        <th class="small-12 large-6 columns first">
          <table role="presentation"><tbody><tr><th>Left</th></tr></tbody></table>
        </th>
        <th class="small-12 large-6 columns last">
          <table role="presentation"><tbody><tr><th>Right</th></tr></tbody></table>
        </th>
      </tr></tbody>
    </table>
  </td></tr></tbody>
</table>

Install

# Homebrew
brew install foundation/inky/inky

# Cargo
cargo install inky-cli

# npm (WASM)
npm install inky-email

Quick Start

# Scaffold a new project
inky init my-email
cd my-email

# Build
inky build

# Watch for changes
inky watch

What's New in v2

  • Rust rewrite — fast, single binary, cross-platform
  • Modern syntax — attributes over classes (size="small" instead of class="small")
  • 27 components — layout, buttons, cards, alerts, hero sections, social links, video, and more
  • CSS inlining — built-in, enabled by default
  • SCSS framework — responsive email styles with per-template variable overrides
  • Layouts & includes — <layout>, <include>, custom <ink-*> components, and template variables
  • Validation — catches missing alt text, Gmail clipping risks, Outlook issues
  • Data merging — optional Jinja2-compatible data merge via MiniJinja (--data data.json)
  • Hybrid output — --hybrid mode emits <div> layout with Outlook MSO ghost table fallbacks
  • Bulletproof buttons — VML <v:roundrect> fallbacks for styled buttons in Outlook
  • Live preview — inky serve starts a local dev server with auto-reload
  • Template friendly — auto-preserves ERB, Jinja2, Handlebars, and other merge tag syntax
  • Plain text generation — auto-generate .txt multipart email version (--plain-text)
  • Spam checker — inky spam-check detects common spam triggers
  • 22 validation rules — links, accessibility, rendering quirks, Gmail clipping, spam detection
  • Per-template data — --data-dir auto-pairs JSON data files with templates
  • Migration tool — inky migrate converts v1 syntax to v2 automatically
  • Language bindings — Node.js, PHP, Python, Ruby, Go

Documentation

  • Getting Started — Installation, CLI usage, first template
  • Component Reference — All 27 components with examples
  • Style Reference — SCSS variables for colors, typography, layout, and more
  • Email Development Guide — CSS support, Outlook quirks, images, testing, and best practices
  • Email Client Compatibility — Support matrix across desktop, webmail, and mobile
  • Data Merging — Merge JSON data into templates
  • Hybrid Output — <div> layout with Outlook fallbacks
  • Migration Guide — Upgrading from v1 to v2
  • Language Bindings — Node.js, PHP, Python, Ruby, Go
  • Troubleshooting — Common issues and how to fix them

Examples

Language Repository
Node.js inky-example-node
PHP inky-example-php
Python inky-example-python
Ruby inky-example-ruby
Go inky-example-go

Building from Source

git clone https://github.com/foundation/inky.git
cd inky

# Build the CLI
cargo build -p inky-cli --release
# Binary at: target/release/inky

# Run tests
cargo test --workspace

Architecture

Crate Purpose Output
inky-core Core transformation engine Rust library
inky-cli Command-line tool inky binary
inky-wasm Browser/Node.js bindings (inky on npm) .wasm module
inky-ffi PHP/Python/Ruby/Go bindings .so / .dylib / .dll

License

MIT

Dependencies

~14–30MB
~434K SLoC

  • clap+derive
  • colored 2.0
  • glob
  • grass
  • inky-core+css-inlining+templating+serialize
  • notify 7.0
  • notify-debouncer-mini 0.5
  • regex
  • serde+derive
  • serde_json
  • tiny_http
Related: inky-core
See also: validator, mailchecker, html2text, tr, unicode_titlecase, listsend, mailjet_api_wrapper, fusionauth-rust-client, email_address, check-if-email-exists, serde-email

Lib.rs is an unofficial list of Rust/Cargo crates, created by kornelski. It contains data from multiple sources, including heuristics, and manually curated data. Content of this page is not necessarily endorsed by the authors of the crate. This site is not affiliated with nor endorsed by the Rust Project. If something is missing or incorrect, please file a bug.