resend-cli 1.2.2 → 1.3.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.
Files changed (182) hide show
  1. package/README.md +25 -10
  2. package/dist/cli.cjs +562 -0
  3. package/package.json +31 -12
  4. package/.claude/settings.local.json +0 -5
  5. package/.github/scripts/pr-title-check.js +0 -34
  6. package/.github/workflows/ci.yml +0 -32
  7. package/.github/workflows/pr-title-check.yml +0 -13
  8. package/.github/workflows/release.yml +0 -120
  9. package/.github/workflows/test-install-windows.yml +0 -48
  10. package/CHANGELOG.md +0 -31
  11. package/biome.json +0 -36
  12. package/bun.lock +0 -73
  13. package/bunfig.toml +0 -2
  14. package/docs/agent-dx-gaps.md +0 -167
  15. package/docs/missing-commands.md +0 -58
  16. package/docs/production-readiness.md +0 -99
  17. package/docs/secure-key-storage.md +0 -174
  18. package/install.ps1 +0 -141
  19. package/install.sh +0 -301
  20. package/renovate.json +0 -4
  21. package/src/cli.ts +0 -92
  22. package/src/commands/api-keys/create.ts +0 -114
  23. package/src/commands/api-keys/delete.ts +0 -47
  24. package/src/commands/api-keys/index.ts +0 -26
  25. package/src/commands/api-keys/list.ts +0 -35
  26. package/src/commands/api-keys/utils.ts +0 -8
  27. package/src/commands/auth/index.ts +0 -20
  28. package/src/commands/auth/login.ts +0 -234
  29. package/src/commands/auth/logout.ts +0 -105
  30. package/src/commands/broadcasts/create.ts +0 -196
  31. package/src/commands/broadcasts/delete.ts +0 -46
  32. package/src/commands/broadcasts/get.ts +0 -59
  33. package/src/commands/broadcasts/index.ts +0 -43
  34. package/src/commands/broadcasts/list.ts +0 -60
  35. package/src/commands/broadcasts/send.ts +0 -56
  36. package/src/commands/broadcasts/update.ts +0 -95
  37. package/src/commands/broadcasts/utils.ts +0 -35
  38. package/src/commands/contact-properties/create.ts +0 -118
  39. package/src/commands/contact-properties/delete.ts +0 -48
  40. package/src/commands/contact-properties/get.ts +0 -46
  41. package/src/commands/contact-properties/index.ts +0 -48
  42. package/src/commands/contact-properties/list.ts +0 -68
  43. package/src/commands/contact-properties/update.ts +0 -88
  44. package/src/commands/contact-properties/utils.ts +0 -17
  45. package/src/commands/contacts/add-segment.ts +0 -78
  46. package/src/commands/contacts/create.ts +0 -122
  47. package/src/commands/contacts/delete.ts +0 -49
  48. package/src/commands/contacts/get.ts +0 -53
  49. package/src/commands/contacts/index.ts +0 -58
  50. package/src/commands/contacts/list.ts +0 -57
  51. package/src/commands/contacts/remove-segment.ts +0 -48
  52. package/src/commands/contacts/segments.ts +0 -39
  53. package/src/commands/contacts/topics.ts +0 -45
  54. package/src/commands/contacts/update-topics.ts +0 -90
  55. package/src/commands/contacts/update.ts +0 -77
  56. package/src/commands/contacts/utils.ts +0 -119
  57. package/src/commands/doctor.ts +0 -216
  58. package/src/commands/domains/create.ts +0 -83
  59. package/src/commands/domains/delete.ts +0 -42
  60. package/src/commands/domains/get.ts +0 -47
  61. package/src/commands/domains/index.ts +0 -35
  62. package/src/commands/domains/list.ts +0 -53
  63. package/src/commands/domains/update.ts +0 -75
  64. package/src/commands/domains/utils.ts +0 -44
  65. package/src/commands/domains/verify.ts +0 -38
  66. package/src/commands/emails/batch.ts +0 -140
  67. package/src/commands/emails/index.ts +0 -24
  68. package/src/commands/emails/receiving/attachment.ts +0 -55
  69. package/src/commands/emails/receiving/attachments.ts +0 -68
  70. package/src/commands/emails/receiving/get.ts +0 -58
  71. package/src/commands/emails/receiving/index.ts +0 -28
  72. package/src/commands/emails/receiving/list.ts +0 -59
  73. package/src/commands/emails/receiving/utils.ts +0 -38
  74. package/src/commands/emails/send.ts +0 -189
  75. package/src/commands/open.ts +0 -24
  76. package/src/commands/segments/create.ts +0 -50
  77. package/src/commands/segments/delete.ts +0 -47
  78. package/src/commands/segments/get.ts +0 -38
  79. package/src/commands/segments/index.ts +0 -36
  80. package/src/commands/segments/list.ts +0 -58
  81. package/src/commands/segments/utils.ts +0 -7
  82. package/src/commands/teams/index.ts +0 -10
  83. package/src/commands/teams/list.ts +0 -35
  84. package/src/commands/teams/remove.ts +0 -86
  85. package/src/commands/teams/switch.ts +0 -76
  86. package/src/commands/topics/create.ts +0 -73
  87. package/src/commands/topics/delete.ts +0 -47
  88. package/src/commands/topics/get.ts +0 -42
  89. package/src/commands/topics/index.ts +0 -42
  90. package/src/commands/topics/list.ts +0 -34
  91. package/src/commands/topics/update.ts +0 -59
  92. package/src/commands/topics/utils.ts +0 -16
  93. package/src/commands/webhooks/create.ts +0 -128
  94. package/src/commands/webhooks/delete.ts +0 -49
  95. package/src/commands/webhooks/get.ts +0 -42
  96. package/src/commands/webhooks/index.ts +0 -44
  97. package/src/commands/webhooks/list.ts +0 -55
  98. package/src/commands/webhooks/update.ts +0 -83
  99. package/src/commands/webhooks/utils.ts +0 -36
  100. package/src/commands/whoami.ts +0 -71
  101. package/src/lib/actions.ts +0 -157
  102. package/src/lib/client.ts +0 -37
  103. package/src/lib/config.ts +0 -217
  104. package/src/lib/files.ts +0 -15
  105. package/src/lib/help-text.ts +0 -38
  106. package/src/lib/output.ts +0 -54
  107. package/src/lib/pagination.ts +0 -36
  108. package/src/lib/prompts.ts +0 -149
  109. package/src/lib/spinner.ts +0 -100
  110. package/src/lib/table.ts +0 -57
  111. package/src/lib/tty.ts +0 -28
  112. package/src/lib/update-check.ts +0 -172
  113. package/src/lib/version.ts +0 -4
  114. package/tests/commands/api-keys/create.test.ts +0 -195
  115. package/tests/commands/api-keys/delete.test.ts +0 -156
  116. package/tests/commands/api-keys/list.test.ts +0 -133
  117. package/tests/commands/auth/login.test.ts +0 -156
  118. package/tests/commands/auth/logout.test.ts +0 -146
  119. package/tests/commands/broadcasts/create.test.ts +0 -447
  120. package/tests/commands/broadcasts/delete.test.ts +0 -182
  121. package/tests/commands/broadcasts/get.test.ts +0 -146
  122. package/tests/commands/broadcasts/list.test.ts +0 -196
  123. package/tests/commands/broadcasts/send.test.ts +0 -161
  124. package/tests/commands/broadcasts/update.test.ts +0 -283
  125. package/tests/commands/contact-properties/create.test.ts +0 -250
  126. package/tests/commands/contact-properties/delete.test.ts +0 -183
  127. package/tests/commands/contact-properties/get.test.ts +0 -144
  128. package/tests/commands/contact-properties/list.test.ts +0 -180
  129. package/tests/commands/contact-properties/update.test.ts +0 -216
  130. package/tests/commands/contacts/add-segment.test.ts +0 -188
  131. package/tests/commands/contacts/create.test.ts +0 -270
  132. package/tests/commands/contacts/delete.test.ts +0 -192
  133. package/tests/commands/contacts/get.test.ts +0 -148
  134. package/tests/commands/contacts/list.test.ts +0 -175
  135. package/tests/commands/contacts/remove-segment.test.ts +0 -166
  136. package/tests/commands/contacts/segments.test.ts +0 -167
  137. package/tests/commands/contacts/topics.test.ts +0 -163
  138. package/tests/commands/contacts/update-topics.test.ts +0 -247
  139. package/tests/commands/contacts/update.test.ts +0 -205
  140. package/tests/commands/doctor.test.ts +0 -165
  141. package/tests/commands/domains/create.test.ts +0 -192
  142. package/tests/commands/domains/delete.test.ts +0 -156
  143. package/tests/commands/domains/get.test.ts +0 -137
  144. package/tests/commands/domains/list.test.ts +0 -164
  145. package/tests/commands/domains/update.test.ts +0 -223
  146. package/tests/commands/domains/verify.test.ts +0 -117
  147. package/tests/commands/emails/batch.test.ts +0 -313
  148. package/tests/commands/emails/receiving/attachment.test.ts +0 -140
  149. package/tests/commands/emails/receiving/attachments.test.ts +0 -168
  150. package/tests/commands/emails/receiving/get.test.ts +0 -140
  151. package/tests/commands/emails/receiving/list.test.ts +0 -181
  152. package/tests/commands/emails/send.test.ts +0 -309
  153. package/tests/commands/segments/create.test.ts +0 -163
  154. package/tests/commands/segments/delete.test.ts +0 -182
  155. package/tests/commands/segments/get.test.ts +0 -137
  156. package/tests/commands/segments/list.test.ts +0 -173
  157. package/tests/commands/teams/list.test.ts +0 -63
  158. package/tests/commands/teams/remove.test.ts +0 -103
  159. package/tests/commands/teams/switch.test.ts +0 -96
  160. package/tests/commands/topics/create.test.ts +0 -191
  161. package/tests/commands/topics/delete.test.ts +0 -156
  162. package/tests/commands/topics/get.test.ts +0 -125
  163. package/tests/commands/topics/list.test.ts +0 -124
  164. package/tests/commands/topics/update.test.ts +0 -177
  165. package/tests/commands/webhooks/create.test.ts +0 -224
  166. package/tests/commands/webhooks/delete.test.ts +0 -156
  167. package/tests/commands/webhooks/get.test.ts +0 -125
  168. package/tests/commands/webhooks/list.test.ts +0 -177
  169. package/tests/commands/webhooks/update.test.ts +0 -206
  170. package/tests/commands/whoami.test.ts +0 -99
  171. package/tests/helpers.ts +0 -93
  172. package/tests/lib/client.test.ts +0 -71
  173. package/tests/lib/config.test.ts +0 -445
  174. package/tests/lib/files.test.ts +0 -65
  175. package/tests/lib/help-text.test.ts +0 -97
  176. package/tests/lib/output.test.ts +0 -127
  177. package/tests/lib/prompts.test.ts +0 -178
  178. package/tests/lib/spinner.test.ts +0 -146
  179. package/tests/lib/table.test.ts +0 -63
  180. package/tests/lib/tty.test.ts +0 -85
  181. package/tests/lib/update-check.test.ts +0 -169
  182. package/tsconfig.json +0 -14
package/README.md CHANGED
@@ -27,13 +27,19 @@ brew install resend/cli/resend
27
27
  curl -fsSL https://resend.com/install.sh | bash
28
28
  ```
29
29
 
30
+ ### npx
31
+
32
+ ```bash
33
+ npx resend-cli
34
+ ```
35
+
30
36
  ## Local development
31
37
 
32
38
  Use this when you want to change the CLI and run your build locally.
33
39
 
34
40
  ### Prerequisites
35
41
 
36
- - [Bun](https://bun.sh) (runtime and package manager)
42
+ - [Node.js](https://nodejs.org) 20+
37
43
 
38
44
  ### Setup
39
45
 
@@ -47,30 +53,29 @@ Use this when you want to change the CLI and run your build locally.
47
53
  2. **Install dependencies**
48
54
 
49
55
  ```bash
50
- bun install
56
+ pnpm install
51
57
  ```
52
58
 
53
59
  3. **Build locally**
54
60
 
55
61
  ```bash
56
- bun run build
62
+ pnpm build
57
63
  ```
58
64
 
59
- Output: `./dist/resend`
65
+ Output: `./dist/cli.cjs`
60
66
 
61
67
  ### Running the CLI locally
62
68
 
63
- Use the built binary directly:
69
+ Use the dev script:
64
70
 
65
71
  ```bash
66
- ./dist/resend --version
72
+ pnpm dev -- --version
67
73
  ```
68
74
 
69
- Or add the project to your `PATH`:
75
+ Or run the built JS bundle:
70
76
 
71
77
  ```bash
72
- export PATH="$(pwd)/dist:$PATH"
73
- resend doctor
78
+ node dist/cli.cjs --version
74
79
  ```
75
80
 
76
81
  ### Making changes
@@ -78,9 +83,19 @@ resend doctor
78
83
  After editing source files, rebuild:
79
84
 
80
85
  ```bash
81
- bun run build
86
+ pnpm build
82
87
  ```
83
88
 
89
+ ### Building native binaries
90
+
91
+ To build a standalone native binary:
92
+
93
+ ```bash
94
+ pnpm build:bin
95
+ ```
96
+
97
+ Output: `./dist/resend`
98
+
84
99
  ## Quick start
85
100
 
86
101
  ```bash