@wraps.dev/cli 0.1.0 → 0.1.1
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 +157 -69
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -35,9 +35,11 @@ choco install pulumi
|
|
|
35
35
|
## Installation
|
|
36
36
|
|
|
37
37
|
```bash
|
|
38
|
-
npm install -g @wraps/cli
|
|
38
|
+
npm install -g @wraps.dev/cli
|
|
39
39
|
# or
|
|
40
|
-
pnpm add -g @wraps/cli
|
|
40
|
+
pnpm add -g @wraps.dev/cli
|
|
41
|
+
# or use npx (no installation required)
|
|
42
|
+
npx @wraps.dev/cli init
|
|
41
43
|
```
|
|
42
44
|
|
|
43
45
|
## Quick Start
|
|
@@ -50,8 +52,9 @@ wraps init
|
|
|
50
52
|
|
|
51
53
|
This will:
|
|
52
54
|
- ✅ Validate your AWS credentials
|
|
53
|
-
- ✅ Prompt for configuration (
|
|
54
|
-
- ✅
|
|
55
|
+
- ✅ Prompt for configuration preset (Starter, Production, Enterprise, or Custom)
|
|
56
|
+
- ✅ Show estimated monthly costs based on your volume
|
|
57
|
+
- ✅ Deploy infrastructure (IAM roles, SES, DynamoDB, Lambda, EventBridge, SQS)
|
|
55
58
|
- ✅ Display next steps with role ARN and DNS records
|
|
56
59
|
|
|
57
60
|
### 2. Install the SDK
|
|
@@ -59,15 +62,15 @@ This will:
|
|
|
59
62
|
After deploying, install the TypeScript SDK to send emails:
|
|
60
63
|
|
|
61
64
|
```bash
|
|
62
|
-
npm install @wraps
|
|
65
|
+
npm install @wraps.dev/email
|
|
63
66
|
# or
|
|
64
|
-
pnpm add @wraps
|
|
67
|
+
pnpm add @wraps.dev/email
|
|
65
68
|
```
|
|
66
69
|
|
|
67
70
|
**Send your first email:**
|
|
68
71
|
|
|
69
72
|
```typescript
|
|
70
|
-
import { Wraps } from '@wraps
|
|
73
|
+
import { Wraps } from '@wraps.dev/email';
|
|
71
74
|
|
|
72
75
|
const wraps = new Wraps();
|
|
73
76
|
|
|
@@ -79,7 +82,7 @@ await wraps.emails.send({
|
|
|
79
82
|
});
|
|
80
83
|
```
|
|
81
84
|
|
|
82
|
-
Learn more: [SDK Documentation](https://github.com/wraps-team/wraps-js) | [npm](https://www.npmjs.com/package/@wraps
|
|
85
|
+
Learn more: [SDK Documentation](https://github.com/wraps-team/wraps-js) | [npm](https://www.npmjs.com/package/@wraps.dev/email)
|
|
83
86
|
|
|
84
87
|
### 3. Check Status
|
|
85
88
|
|
|
@@ -88,10 +91,11 @@ wraps status
|
|
|
88
91
|
```
|
|
89
92
|
|
|
90
93
|
Shows:
|
|
91
|
-
-
|
|
94
|
+
- Active features and configuration
|
|
92
95
|
- AWS region
|
|
93
96
|
- Verified domains
|
|
94
97
|
- Deployed resources
|
|
98
|
+
- Links to console dashboard
|
|
95
99
|
|
|
96
100
|
## Commands
|
|
97
101
|
|
|
@@ -127,6 +131,64 @@ Show current infrastructure status.
|
|
|
127
131
|
wraps status
|
|
128
132
|
```
|
|
129
133
|
|
|
134
|
+
### `wraps connect`
|
|
135
|
+
|
|
136
|
+
Connect to existing AWS SES infrastructure and add Wraps features.
|
|
137
|
+
|
|
138
|
+
**Options:**
|
|
139
|
+
- `--account <account>` - AWS account ID or alias (optional)
|
|
140
|
+
|
|
141
|
+
**Example:**
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
wraps connect
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### `wraps console`
|
|
148
|
+
|
|
149
|
+
Start local web dashboard for monitoring email activity.
|
|
150
|
+
|
|
151
|
+
**Example:**
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
wraps console
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Opens a local dashboard at `http://localhost:3000` with real-time email tracking.
|
|
158
|
+
|
|
159
|
+
### `wraps verify`
|
|
160
|
+
|
|
161
|
+
Verify domain DNS records and SES status.
|
|
162
|
+
|
|
163
|
+
**Options:**
|
|
164
|
+
- `-d, --domain <domain>` - Domain to verify
|
|
165
|
+
|
|
166
|
+
**Example:**
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
wraps verify --domain myapp.com
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### `wraps upgrade`
|
|
173
|
+
|
|
174
|
+
Add features to existing infrastructure.
|
|
175
|
+
|
|
176
|
+
**Example:**
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
wraps upgrade
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### `wraps destroy`
|
|
183
|
+
|
|
184
|
+
Remove all deployed Wraps infrastructure.
|
|
185
|
+
|
|
186
|
+
**Example:**
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
wraps destroy
|
|
190
|
+
```
|
|
191
|
+
|
|
130
192
|
### `wraps completion`
|
|
131
193
|
|
|
132
194
|
Generate shell completion script.
|
|
@@ -137,13 +199,38 @@ Generate shell completion script.
|
|
|
137
199
|
wraps completion
|
|
138
200
|
```
|
|
139
201
|
|
|
140
|
-
|
|
202
|
+
## Configuration Presets
|
|
203
|
+
|
|
204
|
+
Wraps offers feature-based configuration presets with transparent cost estimates:
|
|
205
|
+
|
|
206
|
+
### Starter (~$0.05/mo)
|
|
207
|
+
Perfect for MVPs and side projects:
|
|
208
|
+
- Open & click tracking
|
|
209
|
+
- Bounce/complaint suppression
|
|
210
|
+
- Minimal infrastructure
|
|
211
|
+
|
|
212
|
+
### Production (~$2-5/mo) - Recommended
|
|
213
|
+
For most applications:
|
|
214
|
+
- Everything in Starter
|
|
215
|
+
- Real-time event tracking (EventBridge)
|
|
216
|
+
- 90-day email history storage
|
|
217
|
+
- Reputation metrics dashboard
|
|
141
218
|
|
|
142
|
-
|
|
219
|
+
### Enterprise (~$50-100/mo)
|
|
220
|
+
For high-volume senders:
|
|
221
|
+
- Everything in Production
|
|
222
|
+
- Dedicated IP address
|
|
223
|
+
- 1-year email history retention
|
|
224
|
+
- All 10 SES event types tracked
|
|
143
225
|
|
|
144
|
-
###
|
|
226
|
+
### Custom
|
|
227
|
+
Configure each feature individually with granular control.
|
|
145
228
|
|
|
146
|
-
|
|
229
|
+
## Hosting Provider Integration
|
|
230
|
+
|
|
231
|
+
### Vercel (Recommended)
|
|
232
|
+
|
|
233
|
+
Wraps uses OIDC federation so you never need to store AWS credentials:
|
|
147
234
|
|
|
148
235
|
```bash
|
|
149
236
|
wraps init --provider vercel
|
|
@@ -155,14 +242,12 @@ You'll be prompted for:
|
|
|
155
242
|
|
|
156
243
|
### AWS Native
|
|
157
244
|
|
|
158
|
-
For Lambda, ECS, or EC2 deployments:
|
|
245
|
+
For Lambda, ECS, or EC2 deployments - uses IAM roles automatically:
|
|
159
246
|
|
|
160
247
|
```bash
|
|
161
248
|
wraps init --provider aws
|
|
162
249
|
```
|
|
163
250
|
|
|
164
|
-
Uses IAM roles automatically.
|
|
165
|
-
|
|
166
251
|
### Other Providers
|
|
167
252
|
|
|
168
253
|
For Railway, Render, or other platforms:
|
|
@@ -171,25 +256,7 @@ For Railway, Render, or other platforms:
|
|
|
171
256
|
wraps init --provider other
|
|
172
257
|
```
|
|
173
258
|
|
|
174
|
-
Note: Will require AWS access keys.
|
|
175
|
-
|
|
176
|
-
## Integration Levels
|
|
177
|
-
|
|
178
|
-
### Enhanced (Recommended)
|
|
179
|
-
|
|
180
|
-
Creates full email tracking infrastructure:
|
|
181
|
-
- ✅ IAM role with send permissions
|
|
182
|
-
- ✅ SES configuration set
|
|
183
|
-
- ✅ DynamoDB table for email history
|
|
184
|
-
- ✅ Lambda functions for event processing
|
|
185
|
-
- ✅ SNS topics for bounce/complaint handling
|
|
186
|
-
|
|
187
|
-
### Dashboard-Only
|
|
188
|
-
|
|
189
|
-
Read-only access for dashboard integration:
|
|
190
|
-
- ✅ IAM role with read-only permissions
|
|
191
|
-
- ❌ No sending capabilities
|
|
192
|
-
- ❌ No email history tracking
|
|
259
|
+
Note: Will require AWS access keys as environment variables.
|
|
193
260
|
|
|
194
261
|
## Development
|
|
195
262
|
|
|
@@ -236,22 +303,38 @@ packages/cli/
|
|
|
236
303
|
│ ├── cli.ts # Entry point
|
|
237
304
|
│ ├── commands/ # CLI commands
|
|
238
305
|
│ │ ├── init.ts # Deploy new infrastructure
|
|
239
|
-
│ │
|
|
306
|
+
│ │ ├── connect.ts # Connect existing SES
|
|
307
|
+
│ │ ├── console.ts # Web dashboard
|
|
308
|
+
│ │ ├── status.ts # Show current setup
|
|
309
|
+
│ │ ├── verify.ts # DNS verification
|
|
310
|
+
│ │ ├── upgrade.ts # Add features
|
|
311
|
+
│ │ └── destroy.ts # Clean removal
|
|
240
312
|
│ ├── infrastructure/ # Pulumi stacks
|
|
241
313
|
│ │ ├── email-stack.ts # Main stack
|
|
242
314
|
│ │ ├── vercel-oidc.ts # Vercel OIDC setup
|
|
243
315
|
│ │ └── resources/ # Resource definitions
|
|
244
|
-
│ │ ├── iam.ts
|
|
245
|
-
│ │ ├── ses.ts
|
|
246
|
-
│ │
|
|
316
|
+
│ │ ├── iam.ts # IAM roles and policies
|
|
317
|
+
│ │ ├── ses.ts # SES configuration
|
|
318
|
+
│ │ ├── dynamodb.ts # Email history storage
|
|
319
|
+
│ │ ├── lambda.ts # Event processing
|
|
320
|
+
│ │ ├── sqs.ts # Event queues + DLQ
|
|
321
|
+
│ │ └── eventbridge.ts # SES event routing
|
|
322
|
+
│ ├── console/ # Web dashboard (React)
|
|
323
|
+
│ ├── lambda/ # Lambda function source
|
|
324
|
+
│ │ └── event-processor/ # SQS → DynamoDB processor
|
|
247
325
|
│ ├── utils/ # Utilities
|
|
248
|
-
│ │ ├── aws.ts
|
|
249
|
-
│ │ ├── prompts.ts
|
|
250
|
-
│ │ ├──
|
|
251
|
-
│ │
|
|
326
|
+
│ │ ├── aws.ts # AWS SDK helpers
|
|
327
|
+
│ │ ├── prompts.ts # Interactive prompts
|
|
328
|
+
│ │ ├── costs.ts # Cost calculations
|
|
329
|
+
│ │ ├── presets.ts # Config presets
|
|
330
|
+
│ │ ├── errors.ts # Error handling
|
|
331
|
+
│ │ └── metadata.ts # Deployment metadata
|
|
252
332
|
│ └── types/
|
|
253
333
|
│ └── index.ts
|
|
334
|
+
├── lambda/ # Lambda source (bundled to dist)
|
|
254
335
|
└── dist/ # Build output
|
|
336
|
+
├── console/ # Built dashboard
|
|
337
|
+
└── lambda/ # Lambda source for deployment
|
|
255
338
|
```
|
|
256
339
|
|
|
257
340
|
## Troubleshooting
|
|
@@ -282,34 +365,39 @@ If you've already deployed infrastructure:
|
|
|
282
365
|
wraps status
|
|
283
366
|
|
|
284
367
|
# To redeploy, destroy the existing stack first
|
|
285
|
-
|
|
368
|
+
wraps destroy
|
|
369
|
+
wraps init
|
|
286
370
|
```
|
|
287
371
|
|
|
288
|
-
##
|
|
289
|
-
|
|
290
|
-
###
|
|
291
|
-
- [x]
|
|
292
|
-
- [x]
|
|
293
|
-
- [x]
|
|
294
|
-
- [x]
|
|
295
|
-
- [x]
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
- [
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
- [
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
- [
|
|
305
|
-
- [
|
|
306
|
-
- [
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
- [
|
|
310
|
-
- [
|
|
311
|
-
|
|
312
|
-
|
|
372
|
+
## What's Included
|
|
373
|
+
|
|
374
|
+
### Core Commands ✅
|
|
375
|
+
- [x] `wraps init` - Deploy new infrastructure
|
|
376
|
+
- [x] `wraps connect` - Connect existing SES
|
|
377
|
+
- [x] `wraps console` - Local web dashboard
|
|
378
|
+
- [x] `wraps status` - Infrastructure status
|
|
379
|
+
- [x] `wraps verify` - DNS verification
|
|
380
|
+
- [x] `wraps upgrade` - Add features
|
|
381
|
+
- [x] `wraps destroy` - Clean removal
|
|
382
|
+
- [x] `wraps completion` - Shell completion
|
|
383
|
+
|
|
384
|
+
### Features ✅
|
|
385
|
+
- [x] Feature-based configuration presets
|
|
386
|
+
- [x] Transparent cost estimation
|
|
387
|
+
- [x] Lambda function bundling
|
|
388
|
+
- [x] Vercel OIDC integration
|
|
389
|
+
- [x] Real-time event tracking (EventBridge → SQS → Lambda → DynamoDB)
|
|
390
|
+
- [x] Email history storage
|
|
391
|
+
- [x] Bounce/complaint handling
|
|
392
|
+
- [x] Non-destructive deployments
|
|
393
|
+
- [x] Beautiful interactive prompts
|
|
394
|
+
- [x] Comprehensive error handling
|
|
395
|
+
|
|
396
|
+
### Coming Soon
|
|
397
|
+
- [ ] Multi-domain support
|
|
398
|
+
- [ ] Advanced analytics dashboard
|
|
399
|
+
- [ ] Email template management
|
|
400
|
+
- [ ] Webhook integrations
|
|
313
401
|
|
|
314
402
|
## License
|
|
315
403
|
|