Skip to content

Commit 76b7c91

Browse files
feat: add CLI tool for MailCrab setup and update package description and keywords
1 parent 0aa2824 commit 76b7c91

File tree

2 files changed

+44
-6
lines changed

2 files changed

+44
-6
lines changed

README.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,10 +310,39 @@ pnpm mailcrab
310310
pnpm example
311311
```
312312

313+
#### unemail-mailcrab CLI
314+
315+
The package includes a CLI tool called `unemail-mailcrab` that helps you set up and manage a MailCrab container for local email testing:
316+
317+
```bash
318+
# Install globally to use the CLI from anywhere
319+
npm install -g unemail
320+
321+
# Run the CLI
322+
unemail-mailcrab
323+
```
324+
325+
The CLI tool:
326+
327+
- Checks if Docker is installed
328+
- Verifies if ports 1025 (SMTP) and 1080 (Web UI) are available
329+
- Pulls the MailCrab Docker image if not already available
330+
- Manages existing MailCrab containers (start/stop/create new)
331+
- Sets up a Docker container running MailCrab
332+
- Provides detailed instructions for using MailCrab with unemail
333+
334+
After running the CLI, you can:
335+
- Send emails to localhost:1025 using the MailCrab provider
336+
- View all sent emails in the MailCrab web UI at http://localhost:1080
337+
- Stop/start the container with `docker stop unemail-mailcrab` and `docker start unemail-mailcrab`
338+
313339
## License
314340

315341
[MIT](./LICENSE) License © [productdevbook](https://github.com/productdevbook)
316342

343+
## Credits
344+
345+
This project's architecture and provider pattern was inspired by [unjs/unstorage](https://github.com/unjs/unstorage), which uses a similar approach for storage drivers.
317346

318347
<!-- Badges -->
319348

@@ -326,4 +355,4 @@ pnpm example
326355
[license-src]: https://img.shields.io/github/license/productdevbook/unemail.svg?style=flat&colorA=080f12&colorB=1fa669
327356
[license-href]: https://github.com/productdevbook/unemail/blob/main/LICENSE
328357
[jsdocs-src]: https://img.shields.io/badge/jsdocs-reference-080f12?style=flat&colorA=080f12&colorB=1fa669
329-
[jsdocs-href]: https://www.jsdocs.io/package/unemail
358+
[jsdocs-href]: https://www.jsdocs.io/package/unemail

package.json

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"type": "module",
44
"version": "0.0.1",
55
"packageManager": "pnpm@10.7.1",
6-
"description": "TypeScript email library with direct API integration for email services including MailCrab",
6+
"description": "A modern TypeScript email library with zero dependencies, supporting multiple providers including AWS SES, Resend, MailCrab, and HTTP APIs",
77
"author": "productdevbook <hi@productdevbook.com>",
88
"license": "MIT",
99
"funding": "https://github.com/sponsors/productdevbook",
@@ -15,12 +15,21 @@
1515
"bugs": "https://github.com/productdevbook/unemail/issues",
1616
"keywords": [
1717
"email",
18-
"api",
19-
"mailcrab",
18+
"email-service",
2019
"typescript",
21-
"unemail",
20+
"esm",
21+
"zero-dependencies",
22+
"aws-ses",
23+
"resend",
24+
"mailcrab",
2225
"smtp",
23-
"aws-ses"
26+
"http-provider",
27+
"email-attachments",
28+
"html-emails",
29+
"email-templates",
30+
"unified-api",
31+
"provider-pattern",
32+
"development-tools"
2433
],
2534
"sideEffects": false,
2635
"exports": {

0 commit comments

Comments
 (0)