emailr-cli 1.4.0 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +16 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -766,7 +766,14 @@ async function handleTemplatePreview(template) {
|
|
|
766
766
|
}
|
|
767
767
|
}
|
|
768
768
|
function createTemplatesCommand() {
|
|
769
|
-
const cmd = new Command3("templates").description(
|
|
769
|
+
const cmd = new Command3("templates").description(`Manage email templates
|
|
770
|
+
|
|
771
|
+
AGENTIC LIVE EDITING:
|
|
772
|
+
draft Create new template with live preview
|
|
773
|
+
edit <id> Edit existing template with live preview
|
|
774
|
+
|
|
775
|
+
Both commands save HTML to a local file and start a hot-reload server.
|
|
776
|
+
Edit the file and see changes instantly in the browser.`);
|
|
770
777
|
cmd.command("list").description("List all templates").option("--limit <number>", "Number of templates to return", "20").option("--page <number>", "Page number", "1").option("--format <format>", "Output format (json|table)", "table").action(async (options) => {
|
|
771
778
|
try {
|
|
772
779
|
const config = loadConfig();
|
|
@@ -832,7 +839,10 @@ Total: ${result.length}`);
|
|
|
832
839
|
process.exit(1);
|
|
833
840
|
}
|
|
834
841
|
});
|
|
835
|
-
cmd.command("create").description(
|
|
842
|
+
cmd.command("create").description(`Create a new template
|
|
843
|
+
|
|
844
|
+
TIP: For live preview while building, use "emailr templates draft" first.
|
|
845
|
+
It creates a local file with hot-reload preview, then use this command to save.`).requiredOption("--name <name>", "Template name").requiredOption("--subject <subject>", "Email subject").option("--html <html>", "HTML content").option("--text <text>", "Plain text content").option("--html-file <path>", "Read HTML content from file").option("--text-file <path>", "Read text content from file").option("--from <email>", "Default from email").option("--reply-to <email>", "Default reply-to email").option("--preview-text <text>", "Preview text").option("--format <format>", "Output format (json|table)", "table").action(async (options) => {
|
|
836
846
|
try {
|
|
837
847
|
const config = loadConfig();
|
|
838
848
|
const client = new Emailr3({
|
|
@@ -890,7 +900,10 @@ Open the Preview URL in your browser to view the rendered template.`);
|
|
|
890
900
|
process.exit(1);
|
|
891
901
|
}
|
|
892
902
|
});
|
|
893
|
-
cmd.command("update <id>").description(
|
|
903
|
+
cmd.command("update <id>").description(`Update a template
|
|
904
|
+
|
|
905
|
+
TIP: For live preview while editing, use "emailr templates edit <id>" first.
|
|
906
|
+
It downloads the template with hot-reload preview, then use this command to save.`).option("--name <name>", "Template name").option("--subject <subject>", "Email subject").option("--html <html>", "HTML content").option("--text <text>", "Plain text content").option("--html-file <path>", "Read HTML content from file").option("--text-file <path>", "Read text content from file").option("--from <email>", "Default from email").option("--reply-to <email>", "Default reply-to email").option("--preview-text <text>", "Preview text").option("--format <format>", "Output format (json|table)", "table").action(async (id, options) => {
|
|
894
907
|
try {
|
|
895
908
|
const config = loadConfig();
|
|
896
909
|
const client = new Emailr3({
|