lettr-kit
v1.1.3
Published
CLI tool for managing [Lettr](https://lettr.com) email templates locally.
Readme
lettr-kit
CLI tool for managing Lettr email templates locally.
Installation
npm install -g lettr-kitOr run directly with npx:
npx lettr-kitSetup
Initialize a config file in your project:
lettr-kit initThis creates a lettr.json file:
{
"apiKey": "$LETTR_API_KEY",
"outputDir": "./emails"
}- apiKey — Your API key directly, or
$ENV_VARto reference an environment variable. - outputDir — Directory where templates will be saved.
API Key Resolution
The API key is resolved in this order:
--api-keyflagapiKeyinlettr.json(supports$ENV_VARsyntax)LETTR_API_KEYenvironment variable
Commands
lettr-kit init
Interactively creates a lettr.json config file in the current directory.
lettr-kit list
Lists all templates from the Lettr API.
lettr-kit list
lettr-kit list --api-key lttr_abc123lettr-kit pull
Pulls all templates and saves them as {slug}.html files in the configured output directory.
lettr-kit pull
lettr-kit pull --api-key lttr_abc123License
MIT
