@emailens/cli 0.9.0 → 0.11.0

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/README.md CHANGED
@@ -1,276 +1,165 @@
1
- <div align="center">
2
-
3
- <picture>
4
- <source media="(prefers-color-scheme: dark)" srcset="./docs/wordmark-dark.svg">
5
- <img src="./docs/wordmark-light.svg" alt="emailens / cli" width="444">
6
- </picture>
7
-
8
- **The email rendering linter for terminal and CI**
9
-
10
- [![CI](https://github.com/emailens/cli/actions/workflows/ci.yml/badge.svg)](https://github.com/emailens/cli/actions/workflows/ci.yml)
11
- [![npm](https://img.shields.io/npm/v/@emailens/cli)](https://www.npmjs.com/package/@emailens/cli)
12
- [![MCP](https://img.shields.io/badge/MCP-Server-blue)](https://github.com/emailens/mcp)
13
- [![GitHub stars](https://img.shields.io/github/stars/emailens/cli?style=flat)](https://github.com/emailens/cli/stargazers)
14
-
15
- </div>
16
-
17
- Your email looks perfect in Apple Mail. Gmail strips half the CSS. Outlook renders it in Word.
18
-
19
- `@emailens/cli` checks HTML, React Email, MJML, and Maizzle against real client behavior across 21 email clients. It flags compatibility issues before they ship, in your terminal, in CI, or in your AI workflow.
20
-
21
- The quickest way to try it:
22
-
23
- ```bash
24
- npx @emailens/cli lint email.html
25
- ```
26
-
27
- If you want a hosted preview, screenshots, and team workflows, see [emailens.dev](https://emailens.dev).
28
-
29
- ## Why Emailens
30
-
31
- Email clients are the hardest frontend target in existence. Every client has different CSS support, different rendering engines, and different failure modes.
32
-
33
- Emailens gives you:
34
-
35
- - per-client compatibility scoring across 21 clients
36
- - file:line reporting for HTML inputs
37
- - CI-safe exit codes for build pipelines
38
- - support for React Email, MJML, Maizzle, and raw HTML
39
- - local/offline usage with no account required
40
-
41
- ## The ecosystem
42
-
43
- | Project | Purpose | Start here |
44
- |---|---|---|
45
- | [@emailens/engine](https://github.com/emailens/engine) | Core analysis engine and library API | If you want to build on top of it |
46
- | [@emailens/cli](https://github.com/emailens/cli) | Terminal linting and CI checks | Best first stop |
47
- | [@emailens/mcp](https://github.com/emailens/mcp) | Claude/Cursor/AI agent integration | If you want AI-assisted email QA |
48
- | [emailens/action](https://github.com/emailens/action) | GitHub Action quality gate | If you want PR blocking |
49
- | [emailens/vscode](https://github.com/emailens/vscode) | VS Code linting and preview | If you want editor feedback |
50
- | [emailens.dev](https://emailens.dev) | Hosted previews, screenshots, team workflows | If you want team-grade QA and shareable reports |
51
-
52
- ## Install
53
-
54
- ```bash
55
- npm install -g @emailens/cli
56
- ```
57
-
58
- Or use it without installing:
59
-
60
- ```bash
61
- npx @emailens/cli lint email.html
62
- ```
63
-
64
- Maizzle HTML needs `@maizzle/framework@5` installed beside the CLI. A `.vue` file needs `@maizzle/framework@6`. One install is one major.
65
-
66
- ## Quick start
67
-
68
- ### Check a single file
69
-
70
- ```bash
71
- emailens analyze email.html
72
- emailens analyze email.html --clients gmail-web,outlook-windows
73
- emailens analyze email.html --json
74
- ```
75
-
76
- ### Lint in CI
77
-
78
- ```bash
79
- npx @emailens/cli lint 'emails/**/*.{html,tsx,mjml}' --fail-on-warning
80
- ```
81
-
82
- ### Preview a render
83
-
84
- ```bash
85
- emailens preview email.html
86
- emailens preview email.html --dark-mode
87
- emailens preview email.html --screenshots --out ./screenshots
88
- ```
89
-
90
- ### Fix common issues
91
-
92
- ```bash
93
- emailens fix email.html
94
- emailens fix email.html -o fixed.html
95
- ```
96
-
97
- ## What the output looks like
98
-
99
- ```text
100
- src/emails/welcome.html
101
- error 12:8 outlook-windows border-radius Not supported in Outlook Windows
102
- warn spam caps-ratio 20%+ of words are ALL CAPS
103
-
104
- 2 files | 1 error | 1 warning
105
- ```
106
-
107
- This is intentionally readable in a terminal and structured enough for CI, editors, and agents.
108
-
109
- ## Supported formats
110
-
111
- Point it at:
112
-
113
- - HTML
114
- - JSX / React Email
115
- - MJML
116
- - Maizzle
117
-
118
- Format is detected from the file extension, and the CLI compiles your template before it analyzes the actual HTML that would be sent.
119
-
120
- ## Commands
121
-
122
- ### `emailens analyze <file>`
123
-
124
- Analyze CSS compatibility and get per-client scores.
125
-
126
- ```bash
127
- emailens analyze email.html
128
- emailens analyze email.html --clients gmail-web,outlook-windows
129
- emailens analyze email.html --json
130
- cat email.html | emailens analyze -
131
- ```
132
-
133
- ### `emailens preview <file>`
134
-
135
- Full preview pipeline: transforms, analysis, dark mode simulation, and optional screenshots.
136
-
137
- ```bash
138
- emailens preview email.html
139
- emailens preview email.html --dark-mode
140
- emailens preview email.html --screenshots --out ./screenshots
141
- emailens preview email.html --json
142
- ```
143
-
144
- ### `emailens export <file>`
145
-
146
- Export a self-contained HTML or JSON report.
147
-
148
- ```bash
149
- emailens export email.html -o ./report
150
- emailens export email.html --json -o ./report
151
- ```
152
-
153
- ### `emailens lint <file|glob>`
154
-
155
- CI-friendly linting with structured exit codes.
156
-
157
- ```bash
158
- emailens lint email.html
159
- emailens lint src/*.html
160
- emailens lint email.html --json
161
- emailens lint email.html --fail-on-warning
162
- emailens lint email.html --max-warnings 5
163
- ```
164
-
165
- | Flag | Alias | Description |
166
- |------|-------|-------------|
167
- | `--format` | `-f` | Input format: `html`, `jsx`, `mjml`, `maizzle`. `.vue` is `maizzle`. A pasted Vue file with no flag is detected. |
168
- | `--json` | | Output as JSON |
169
- | `--fail-on-warning` | | Exit 2 if warnings found |
170
- | `--skip` | | Comma-separated checks to skip: `spam,links,accessibility,images,compatibility,inboxPreview,size,templateVariables,overflow,visual,darkContrast,mobileContrast,design,vml,styleSurvival,targeting` |
171
- | `--targeting-policy` | | `progressive` (default), `strict`, or `lenient` |
172
- | `--max-warnings` | | Fail if more than n warnings |
173
-
174
- Exit codes:
175
-
176
- - `0`: clean
177
- - `1`: errors found
178
- - `2`: warnings only (with `--fail-on-warning` or `--max-warnings` exceeded)
179
-
180
- ### `emailens inbox wait`
181
-
182
- The CI step for what your app actually sends. Make your app send a real email
183
- (sign-up, reset, receipt) to your Emailens test inbox, then wait for it. It
184
- fails when the email is no longer the one you checked in Emailens, or changed
185
- since it last arrived: a link moved to staging, an emptied variable, a new
186
- line, an image gone, a size jump, signing that stopped passing. Codes, tokens
187
- and tracking ids differ on every send and do not count.
188
-
189
- ```bash
190
- export EMAILENS_API_KEY=... # app.emailens.dev/dashboard/api
191
- SINCE=$(date +%s000) # before the send
192
- npm run send-signup-email # your app sends it
193
- emailens inbox wait --subject "Welcome" --since "$SINCE"
194
- ```
195
-
196
- ```
197
- Welcome to Acme from Acme <hi@acme.dev>
198
-
199
- Your check Same as "Welcome", apart from the links your email service wrapped.
200
- Since last time Changed since last time: 1 change.
201
-
202
- ✗ 1 link points somewhere else: "finish setup" went to staging.acme.dev.
203
-
204
- ✗ Fail: 1 change
205
- ```
206
-
207
- Options: `--subject`, `--sender`, `--inbox <id>`, `--since` (ISO time, epoch
208
- ms, or a duration such as `5m`; default 2 minutes back), `--timeout` (seconds,
209
- default 60, at most 600), `--fail-on all|check|drift|none` (default `all`),
210
- `--json`. An email you never checked, and its first arrival, pass and say so.
211
-
212
- Exit codes: `0` pass, `1` changed, `2` nothing arrived or Emailens could not be
213
- reached.
214
-
215
- ### `emailens clients`
216
-
217
- List all 21 supported clients.
218
-
219
- ```bash
220
- emailens clients
221
- emailens clients --json
222
- ```
223
-
224
- ## GitHub Actions
225
-
226
- Add a PR gate to fail builds when email regressions appear:
227
-
228
- ```yaml
229
- name: Email lint
230
-
231
- on:
232
- pull_request:
233
- paths:
234
- - 'emails/**'
235
- - 'src/emails/**'
236
-
237
- jobs:
238
- lint:
239
- runs-on: ubuntu-latest
240
- steps:
241
- - uses: actions/checkout@v4
242
- - uses: actions/setup-node@v4
243
- with:
244
- node-version: 22
245
- - name: Lint emails
246
- run: npx -y @emailens/cli lint 'emails/**/*.{html,tsx,mjml}' --fail-on-warning
247
- ```
248
-
249
- ## AI and MCP
250
-
251
- Prefer AI? Use the [MCP server](https://github.com/emailens/mcp). It gives your coding agent access to the same analysis engine and lets it preview, audit, fix, and diff email templates.
252
-
253
- ```bash
254
- claude mcp add emailens -- npx -y @emailens/mcp
255
- ```
256
-
257
- ## Why not just use the hosted app?
258
-
259
- You can. But the open-source tools are what let developers:
260
-
261
- - validate before a push
262
- - fail CI before a broken email ships
263
- - run audits offline
264
- - keep email QA in their editor and terminal
265
- - build local automation without signing up for a platform
266
-
267
- The hosted SaaS adds screenshot previews, shared reports, and team workflows. The OSS tools give you the developer-first layer.
268
-
269
- ## License
270
-
271
- MIT
272
-
273
- ---
274
-
275
- If this saved you from an Outlook surprise, [a star](https://github.com/emailens/cli) helps other email developers find it.
276
-
1
+ <div align="center">
2
+
3
+ <picture>
4
+ <source media="(prefers-color-scheme: dark)" srcset="./docs/wordmark-dark.svg">
5
+ <img src="./docs/wordmark-light.svg" alt="emailens / cli" width="444">
6
+ </picture>
7
+
8
+ **The email rendering linter for terminal and CI**
9
+
10
+ [![CI](https://github.com/emailens/cli/actions/workflows/ci.yml/badge.svg)](https://github.com/emailens/cli/actions/workflows/ci.yml)
11
+ [![npm](https://img.shields.io/npm/v/@emailens/cli)](https://www.npmjs.com/package/@emailens/cli)
12
+ [![MCP](https://img.shields.io/badge/MCP-Server-blue)](https://github.com/emailens/mcp)
13
+
14
+ </div>
15
+
16
+ ```text
17
+ $ emailens lint emails/welcome.html --fail-on-warning
18
+ emails/welcome.html
19
+ warn 6:17 outlook-windows-legacy display:flex Outlook Classic receives this flex box. The MSO branch needs a table.
20
+ warn 6:30 outlook-windows-legacy,yahoo-mail,yahoo-mail-android+2 gap Outlook Classic does not support "gap".
21
+ warn 6:39 outlook-windows-legacy,outlook-windows-legacy padding Outlook Classic drops this padding. Put it on a table cell, or set mso-padding-alt on one.
22
+ warn inboxPreview preheader-too-short Preheader is only 22 characters, so email clients may backfill with body text (recommended: 30+).
23
+ 9 info: safe fallbacks, not problems. --info lists them.
24
+
25
+ 1 file | 4 warnings
26
+
27
+ Failed: 4 warnings found (--failOnWarning)
28
+ See it rendered in Gmail, Outlook and Apple Mail, no signup: https://app.emailens.dev/try?utm_source=cli&utm_medium=lint
29
+ ```
30
+
31
+ That is a flex row with a rounded button, checked against 21 email clients.
32
+ Each finding has its line:column, and the exit code (here 2) fails the build.
33
+ The rounded corners are among the 9 info findings: Outlook Classic draws them
34
+ square, a safe fallback rather than a problem. The last line appears only when
35
+ the check fails; `--quiet` drops it, and `--json` never has it.
36
+
37
+ ## Install
38
+
39
+ ```bash
40
+ npm install -g @emailens/cli
41
+ ```
42
+
43
+ ## Run
44
+
45
+ ```bash
46
+ emailens lint 'emails/*.html'
47
+ ```
48
+
49
+ Or without installing: `npx @emailens/cli lint email.html`. HTML, React Email
50
+ (`.tsx`/`.jsx`), MJML and Maizzle are detected from the extension and compiled
51
+ first, so the check runs on the HTML that would be sent. No account and no
52
+ network: the analysis runs locally.
53
+
54
+ Exit codes: `0` clean, `1` errors, `2` warnings with `--fail-on-warning`, or
55
+ more than `--max-warnings`.
56
+
57
+ ## Why not caniemail, or React Email's own checker?
58
+
59
+ [Can I email](https://www.caniemail.com) is the support table: one feature,
60
+ every client. It does not read your email. This CLI's support data is generated
61
+ from caniemail's (synced 2026-10-27), plus the cells a real-device screenshot
62
+ contradicted, each marked "Observed" with its date. What the CLI adds is the
63
+ reading: it finds the features your file uses, points at the line, scores each
64
+ client, and exits non-zero.
65
+
66
+ [React Email 4](https://resend.com/blog/react-email-4) added a compatibility
67
+ checker, also powered by Can I email, to its preview. Its CLI (`email dev`,
68
+ `build`, `start`, `export`) has no check command and no exit code for CI, per
69
+ [its docs](https://react.email/docs/cli). This CLI reads React Email files as
70
+ well as MJML, Maizzle and plain HTML, and fails the build.
71
+
72
+ Beyond CSS support, `lint` checks what neither covers: spam signals, links,
73
+ accessibility, images, the inbox preview text, size, template variables,
74
+ overflow, dark-mode and mobile contrast, Outlook VML, styles a client drops, and
75
+ client-targeting hacks.
76
+
77
+ ## Extras
78
+
79
+ ### `lint` options
80
+
81
+ | Flag | Alias | Description |
82
+ |------|-------|-------------|
83
+ | `--format` | `-f` | Input format: `html`, `jsx`, `mjml`, `maizzle`. `.vue` is `maizzle`. A pasted Vue file with no flag is detected. |
84
+ | `--json` | | Output as JSON, one line, every finding including info |
85
+ | `--info` | | List info findings too. By default they are counted, not listed: they are safe fallbacks, not problems |
86
+ | `--fail-on-warning` | | Exit 2 if warnings found |
87
+ | `--max-warnings` | | Fail if more than n warnings |
88
+ | `--quiet` | `-q` | No line about the hosted preview after a failure |
89
+ | `--skip` | | Comma-separated checks to skip: `spam,links,accessibility,images,compatibility,inboxPreview,size,templateVariables,overflow,visual,darkContrast,mobileContrast,design,vml,styleSurvival,targeting` |
90
+ | `--targeting-policy` | | `progressive` (default), `strict`, or `lenient` |
91
+
92
+ A `.emailensrc` in the project, the file the VS Code extension reads, can set
93
+ rule severities and skips; `--skip` on the command line wins.
94
+
95
+ Maizzle HTML needs `@maizzle/framework@5` installed beside the CLI. A `.vue`
96
+ file needs `@maizzle/framework@6`. One install is one major.
97
+
98
+ ### Other commands
99
+
100
+ ```bash
101
+ emailens analyze email.html # score per client, findings by client
102
+ emailens analyze email.html --clients gmail-web,outlook-windows --json
103
+ emailens audit email.html # compatibility plus every other check
104
+ emailens preview email.html --dark-mode # transforms, analysis, dark mode simulation
105
+ emailens preview email.html --screenshots --out ./shots # needs BROWSERLESS_URL and playwright-core
106
+ emailens export email.html -o ./report # self-contained HTML report (--json for JSON)
107
+ emailens fix email.html -o fixed.html # AI fix, needs ANTHROPIC_API_KEY (--estimate: tokens only)
108
+ emailens clients # the 21 clients
109
+ cat email.html | emailens analyze - # stdin
110
+ ```
111
+
112
+ ### `emailens inbox wait`
113
+
114
+ The CI step for what your app actually sends. Make your app send a real email
115
+ (sign-up, reset, receipt) to your Emailens test inbox, then wait for it. It
116
+ fails when the email is no longer the one you checked in Emailens, or changed
117
+ since it last arrived: a link moved to staging, an emptied variable, a new
118
+ line, an image gone, a size jump, signing that stopped passing. Codes, tokens
119
+ and tracking ids differ on every send and do not count. It needs an API key.
120
+
121
+ ```bash
122
+ export EMAILENS_API_KEY=... # app.emailens.dev/dashboard/api
123
+ SINCE=$(date +%s000) # before the send
124
+ npm run send-signup-email # your app sends it
125
+ emailens inbox wait --subject "Welcome" --since "$SINCE"
126
+ ```
127
+
128
+ Options: `--subject`, `--sender`, `--inbox <id>`, `--since` (ISO time, epoch
129
+ ms, or a duration such as `5m`; default 2 minutes back), `--timeout` (seconds,
130
+ default 60, at most 600), `--fail-on all|check|drift|none` (default `all`),
131
+ `--json`. Exit codes: `0` pass, `1` changed, `2` nothing arrived or Emailens
132
+ could not be reached.
133
+
134
+ ### In GitHub Actions
135
+
136
+ ```yaml
137
+ - uses: actions/setup-node@v4
138
+ with:
139
+ node-version: 22
140
+ - run: npx -y @emailens/cli lint 'emails/*.html' --fail-on-warning
141
+ ```
142
+
143
+ `**` globs are not supported: use a single-level wildcard or list the files.
144
+ For scores per client in a pull request comment, use the
145
+ [Action](https://github.com/emailens/action).
146
+
147
+ ### Hosted
148
+
149
+ [app.emailens.dev/try](https://app.emailens.dev/try?utm_source=cli&utm_medium=readme)
150
+ renders the email per client: five clients with no account, all 21 with a free
151
+ one. The + Real plans add real-device screenshots: Outlook on Windows and Mac,
152
+ Apple Mail on Mac and iPad, and Gmail, Yahoo and Proton on the web.
153
+
154
+ ## Ecosystem
155
+
156
+ | Project | What it is |
157
+ |---|---|
158
+ | [@emailens/engine](https://github.com/emailens/engine) | The analysis engine this CLI runs, as a library |
159
+ | [@emailens/mcp](https://github.com/emailens/mcp) | The same checks for coding agents: `claude mcp add emailens -- npx -y @emailens/mcp` |
160
+ | [emailens/action](https://github.com/emailens/action) | GitHub Action: fails the build, and can comment the scores per client on the pull request |
161
+ | [emailens/vscode](https://github.com/emailens/vscode) | VS Code extension: findings and preview in the editor |
162
+
163
+ ## License
164
+
165
+ MIT
package/dist/index.js CHANGED
@@ -12,7 +12,7 @@ import { EMAIL_CLIENTS } from "@emailens/engine";
12
12
  // package.json
13
13
  var package_default = {
14
14
  name: "@emailens/cli",
15
- version: "0.9.0",
15
+ version: "0.11.0",
16
16
  description: "CLI tool for email compatibility analysis: lint, preview and export HTML, MJML, Maizzle and React Email rendering across 21 email clients.",
17
17
  type: "module",
18
18
  bin: {
@@ -39,7 +39,7 @@ var package_default = {
39
39
  prepublishOnly: "bun run build"
40
40
  },
41
41
  dependencies: {
42
- "@emailens/engine": "^0.15.0",
42
+ "@emailens/engine": "^0.17.0",
43
43
  citty: "^0.1.6",
44
44
  "cli-table3": "^0.6.5",
45
45
  ora: "^8.2.0",
@@ -243,7 +243,7 @@ function formatJsonOutput(opts) {
243
243
  return output;
244
244
  }
245
245
  function printJson(opts) {
246
- console.log(JSON.stringify(formatJsonOutput(opts), null, 2));
246
+ console.log(JSON.stringify(formatJsonOutput(opts)));
247
247
  }
248
248
 
249
249
  // src/output/terminal.ts
@@ -576,7 +576,7 @@ var clients_default = defineCommand3({
576
576
  engine: c.engine,
577
577
  darkModeSupport: c.darkModeSupport
578
578
  }));
579
- console.log(JSON.stringify(data, null, 2));
579
+ console.log(JSON.stringify(data));
580
580
  return;
581
581
  }
582
582
  console.log();
@@ -923,7 +923,7 @@ var fix_default = defineCommand5({
923
923
  spinner?.succeed(`Found ${warnings.length} warnings`);
924
924
  if (warnings.length === 0) {
925
925
  if (args.json) {
926
- console.log(JSON.stringify({ message: "No issues found", code: source }, null, 2));
926
+ console.log(JSON.stringify({ message: "No issues found", code: source }));
927
927
  } else {
928
928
  console.log(pc3.green("\n No compatibility issues found, nothing to fix.\n"));
929
929
  }
@@ -962,7 +962,7 @@ var fix_default = defineCommand5({
962
962
  const structuralPct = estimate.warningCount > 0 ? Math.round(estimate.structuralCount / estimate.warningCount * 100) : 0;
963
963
  if (args.estimate) {
964
964
  if (args.json) {
965
- console.log(JSON.stringify(estimate, null, 2));
965
+ console.log(JSON.stringify(estimate));
966
966
  } else {
967
967
  console.log(`
968
968
  ${pc3.bold("Token Estimate")}`);
@@ -1033,7 +1033,7 @@ var fix_default = defineCommand5({
1033
1033
  targetedWarnings: result.targetedWarnings,
1034
1034
  structuralCount: result.structuralCount,
1035
1035
  tokenEstimate: result.tokenEstimate
1036
- }, null, 2));
1036
+ }));
1037
1037
  } else {
1038
1038
  console.log("\n" + result.code);
1039
1039
  }
@@ -1114,7 +1114,7 @@ var audit_default = defineCommand6({
1114
1114
  const report = auditEmail(html, { framework, skip, targetingPolicy });
1115
1115
  spinner?.succeed("Audit complete");
1116
1116
  if (args.json) {
1117
- console.log(JSON.stringify(report, null, 2));
1117
+ console.log(JSON.stringify(report));
1118
1118
  } else {
1119
1119
  if (!skip.includes("compatibility")) {
1120
1120
  printScoreTable(report.compatibility.scores, report.compatibility.warnings, { quiet: args.quiet });
@@ -1326,6 +1326,10 @@ var lint_default = defineCommand7({
1326
1326
  type: "boolean",
1327
1327
  description: "Output as JSON"
1328
1328
  },
1329
+ info: {
1330
+ type: "boolean",
1331
+ description: "List info findings too: safe fallbacks, not problems (counted, not listed, by default)"
1332
+ },
1329
1333
  failOnWarning: {
1330
1334
  type: "boolean",
1331
1335
  description: "Exit 2 if warnings found"
@@ -1338,6 +1342,11 @@ var lint_default = defineCommand7({
1338
1342
  maxWarnings: {
1339
1343
  type: "string",
1340
1344
  description: "Fail if more than n warnings"
1345
+ },
1346
+ quiet: {
1347
+ type: "boolean",
1348
+ alias: "q",
1349
+ description: "Suppress decorations: no hosted-preview line after a failure"
1341
1350
  }
1342
1351
  },
1343
1352
  async run({ args }) {
@@ -1406,23 +1415,28 @@ var lint_default = defineCommand7({
1406
1415
  totalWarnings += warnings;
1407
1416
  }
1408
1417
  if (args.json) {
1409
- console.log(JSON.stringify({ files: results, totalErrors, totalWarnings }, null, 2));
1418
+ console.log(JSON.stringify({ files: results, totalErrors, totalWarnings }));
1410
1419
  } else {
1411
1420
  for (const result of results) {
1412
1421
  console.log(pc5.underline(result.file));
1413
- if (result.issues.length === 0) {
1422
+ const shown = args.info ? result.issues : result.issues.filter((i) => i.severity !== "info");
1423
+ const hidden = result.issues.length - shown.length;
1424
+ if (shown.length === 0) {
1414
1425
  console.log(` ${pc5.green("pass")} No issues found`);
1415
1426
  } else {
1416
- const width = result.issues.reduce(
1427
+ const width = shown.reduce(
1417
1428
  (w, i) => i.loc ? Math.max(w, `${i.loc.line}:${i.loc.column}`.length) : w,
1418
1429
  0
1419
1430
  );
1420
- for (const issue of result.issues) {
1431
+ for (const issue of shown) {
1421
1432
  const sev = issue.severity === "error" ? pc5.red("error") : issue.severity === "warning" ? pc5.yellow("warn ") : pc5.blue("info ");
1422
1433
  const pos = width > 0 ? `${pc5.dim((issue.loc ? `${issue.loc.line}:${issue.loc.column}` : "").padStart(width))} ` : "";
1423
1434
  console.log(` ${sev} ${pos}${pc5.dim(issue.category.padEnd(18))} ${pc5.bold(issue.rule.padEnd(22))} ${issue.message}`);
1424
1435
  }
1425
1436
  }
1437
+ if (hidden > 0) {
1438
+ console.log(pc5.dim(` ${hidden} info: safe fallbacks, not problems. --info lists them.`));
1439
+ }
1426
1440
  console.log();
1427
1441
  }
1428
1442
  const summary = [
@@ -1433,23 +1447,25 @@ var lint_default = defineCommand7({
1433
1447
  ].filter(Boolean).join(" | ");
1434
1448
  console.log(summary);
1435
1449
  }
1450
+ let exitCode = 0;
1451
+ let reason = null;
1436
1452
  if (totalErrors > 0) {
1437
- process.exit(1);
1438
- }
1439
- if (args.failOnWarning && totalWarnings > 0) {
1440
- if (!args.json) {
1441
- console.error(pc5.yellow(`
1442
- Failed: ${totalWarnings} warning${totalWarnings === 1 ? "" : "s"} found (--failOnWarning)`));
1443
- }
1444
- process.exit(2);
1453
+ exitCode = 1;
1454
+ } else if (args.failOnWarning && totalWarnings > 0) {
1455
+ exitCode = 2;
1456
+ reason = pc5.yellow(`
1457
+ Failed: ${totalWarnings} warning${totalWarnings === 1 ? "" : "s"} found (--failOnWarning)`);
1458
+ } else if (Number.isFinite(maxWarnings) && totalWarnings > maxWarnings) {
1459
+ exitCode = 2;
1460
+ reason = pc5.red(`
1461
+ Exceeded max warnings: ${totalWarnings} > ${maxWarnings}`);
1445
1462
  }
1446
- if (Number.isFinite(maxWarnings) && totalWarnings > maxWarnings) {
1447
- if (!args.json) {
1448
- console.error(pc5.red(`
1449
- Exceeded max warnings: ${totalWarnings} > ${maxWarnings}`));
1450
- }
1451
- process.exit(2);
1463
+ if (!args.json) {
1464
+ if (reason) console.error(reason);
1465
+ const hint = failureHint(exitCode, { quiet: args.quiet });
1466
+ if (hint) console.log(pc5.dim(hint));
1452
1467
  }
1468
+ if (exitCode !== 0) process.exit(exitCode);
1453
1469
  } catch (err) {
1454
1470
  if (err instanceof CompileError6) {
1455
1471
  console.error(pc5.red(`Compilation failed (${err.phase}): ${err.message}`));
@@ -1460,6 +1476,11 @@ Exceeded max warnings: ${totalWarnings} > ${maxWarnings}`));
1460
1476
  }
1461
1477
  }
1462
1478
  });
1479
+ var HOSTED_HINT = "See it rendered in Gmail, Outlook and Apple Mail, no signup: https://app.emailens.dev/try?utm_source=cli&utm_medium=lint";
1480
+ function failureHint(exitCode, options = {}) {
1481
+ if (exitCode === 0 || options.quiet) return null;
1482
+ return HOSTED_HINT;
1483
+ }
1463
1484
  async function resolveGlob(pattern) {
1464
1485
  if (!pattern.includes("*")) {
1465
1486
  return [resolve2(pattern)];