superacli 1.1.5 → 1.1.6
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/__tests__/resend-plugin.test.js +22 -1
- package/package.json +1 -1
- package/plugins/plugins.json +2 -2
- package/plugins/resend/plugin.json +279 -2
- package/plugins/resend/skills/quickstart/SKILL.md +32 -13
- package/temp_resend_cli/repo/.github/scripts/pr-title-check.js +34 -0
- package/temp_resend_cli/repo/.github/workflows/ci.yml +67 -0
- package/temp_resend_cli/repo/.github/workflows/post-release.yml +51 -0
- package/temp_resend_cli/repo/.github/workflows/pr-title-check.yml +13 -0
- package/temp_resend_cli/repo/.github/workflows/release.yml +175 -0
- package/temp_resend_cli/repo/.github/workflows/test-install-unix.yml +34 -0
- package/temp_resend_cli/repo/.github/workflows/test-install-windows.yml +48 -0
- package/temp_resend_cli/repo/CHANGELOG.md +31 -0
- package/temp_resend_cli/repo/LICENSE +21 -0
- package/temp_resend_cli/repo/README.md +450 -0
- package/temp_resend_cli/repo/biome.json +36 -0
- package/temp_resend_cli/repo/install.ps1 +141 -0
- package/temp_resend_cli/repo/install.sh +301 -0
- package/temp_resend_cli/repo/package.json +61 -0
- package/temp_resend_cli/repo/pnpm-lock.yaml +2439 -0
- package/temp_resend_cli/repo/renovate.json +4 -0
- package/temp_resend_cli/repo/src/cli.ts +98 -0
- package/temp_resend_cli/repo/src/commands/api-keys/create.ts +114 -0
- package/temp_resend_cli/repo/src/commands/api-keys/delete.ts +47 -0
- package/temp_resend_cli/repo/src/commands/api-keys/index.ts +26 -0
- package/temp_resend_cli/repo/src/commands/api-keys/list.ts +35 -0
- package/temp_resend_cli/repo/src/commands/api-keys/utils.ts +8 -0
- package/temp_resend_cli/repo/src/commands/auth/index.ts +20 -0
- package/temp_resend_cli/repo/src/commands/auth/login.ts +234 -0
- package/temp_resend_cli/repo/src/commands/auth/logout.ts +105 -0
- package/temp_resend_cli/repo/src/commands/broadcasts/create.ts +196 -0
- package/temp_resend_cli/repo/src/commands/broadcasts/delete.ts +46 -0
- package/temp_resend_cli/repo/src/commands/broadcasts/get.ts +59 -0
- package/temp_resend_cli/repo/src/commands/broadcasts/index.ts +43 -0
- package/temp_resend_cli/repo/src/commands/broadcasts/list.ts +60 -0
- package/temp_resend_cli/repo/src/commands/broadcasts/send.ts +56 -0
- package/temp_resend_cli/repo/src/commands/broadcasts/update.ts +95 -0
- package/temp_resend_cli/repo/src/commands/broadcasts/utils.ts +35 -0
- package/temp_resend_cli/repo/src/commands/contact-properties/create.ts +118 -0
- package/temp_resend_cli/repo/src/commands/contact-properties/delete.ts +48 -0
- package/temp_resend_cli/repo/src/commands/contact-properties/get.ts +46 -0
- package/temp_resend_cli/repo/src/commands/contact-properties/index.ts +48 -0
- package/temp_resend_cli/repo/src/commands/contact-properties/list.ts +68 -0
- package/temp_resend_cli/repo/src/commands/contact-properties/update.ts +88 -0
- package/temp_resend_cli/repo/src/commands/contact-properties/utils.ts +17 -0
- package/temp_resend_cli/repo/src/commands/contacts/add-segment.ts +78 -0
- package/temp_resend_cli/repo/src/commands/contacts/create.ts +122 -0
- package/temp_resend_cli/repo/src/commands/contacts/delete.ts +49 -0
- package/temp_resend_cli/repo/src/commands/contacts/get.ts +53 -0
- package/temp_resend_cli/repo/src/commands/contacts/index.ts +58 -0
- package/temp_resend_cli/repo/src/commands/contacts/list.ts +57 -0
- package/temp_resend_cli/repo/src/commands/contacts/remove-segment.ts +48 -0
- package/temp_resend_cli/repo/src/commands/contacts/segments.ts +39 -0
- package/temp_resend_cli/repo/src/commands/contacts/topics.ts +45 -0
- package/temp_resend_cli/repo/src/commands/contacts/update-topics.ts +90 -0
- package/temp_resend_cli/repo/src/commands/contacts/update.ts +77 -0
- package/temp_resend_cli/repo/src/commands/contacts/utils.ts +119 -0
- package/temp_resend_cli/repo/src/commands/doctor.ts +216 -0
- package/temp_resend_cli/repo/src/commands/domains/create.ts +83 -0
- package/temp_resend_cli/repo/src/commands/domains/delete.ts +42 -0
- package/temp_resend_cli/repo/src/commands/domains/get.ts +47 -0
- package/temp_resend_cli/repo/src/commands/domains/index.ts +35 -0
- package/temp_resend_cli/repo/src/commands/domains/list.ts +53 -0
- package/temp_resend_cli/repo/src/commands/domains/update.ts +75 -0
- package/temp_resend_cli/repo/src/commands/domains/utils.ts +44 -0
- package/temp_resend_cli/repo/src/commands/domains/verify.ts +38 -0
- package/temp_resend_cli/repo/src/commands/emails/batch.ts +140 -0
- package/temp_resend_cli/repo/src/commands/emails/get.ts +44 -0
- package/temp_resend_cli/repo/src/commands/emails/index.ts +30 -0
- package/temp_resend_cli/repo/src/commands/emails/list.ts +84 -0
- package/temp_resend_cli/repo/src/commands/emails/receiving/attachment.ts +55 -0
- package/temp_resend_cli/repo/src/commands/emails/receiving/attachments.ts +68 -0
- package/temp_resend_cli/repo/src/commands/emails/receiving/get.ts +58 -0
- package/temp_resend_cli/repo/src/commands/emails/receiving/index.ts +28 -0
- package/temp_resend_cli/repo/src/commands/emails/receiving/list.ts +59 -0
- package/temp_resend_cli/repo/src/commands/emails/receiving/utils.ts +38 -0
- package/temp_resend_cli/repo/src/commands/emails/send.ts +189 -0
- package/temp_resend_cli/repo/src/commands/open.ts +27 -0
- package/temp_resend_cli/repo/src/commands/segments/create.ts +50 -0
- package/temp_resend_cli/repo/src/commands/segments/delete.ts +47 -0
- package/temp_resend_cli/repo/src/commands/segments/get.ts +38 -0
- package/temp_resend_cli/repo/src/commands/segments/index.ts +36 -0
- package/temp_resend_cli/repo/src/commands/segments/list.ts +58 -0
- package/temp_resend_cli/repo/src/commands/segments/utils.ts +7 -0
- package/temp_resend_cli/repo/src/commands/teams/index.ts +10 -0
- package/temp_resend_cli/repo/src/commands/teams/list.ts +35 -0
- package/temp_resend_cli/repo/src/commands/teams/remove.ts +86 -0
- package/temp_resend_cli/repo/src/commands/teams/switch.ts +76 -0
- package/temp_resend_cli/repo/src/commands/topics/create.ts +73 -0
- package/temp_resend_cli/repo/src/commands/topics/delete.ts +47 -0
- package/temp_resend_cli/repo/src/commands/topics/get.ts +42 -0
- package/temp_resend_cli/repo/src/commands/topics/index.ts +42 -0
- package/temp_resend_cli/repo/src/commands/topics/list.ts +34 -0
- package/temp_resend_cli/repo/src/commands/topics/update.ts +59 -0
- package/temp_resend_cli/repo/src/commands/topics/utils.ts +16 -0
- package/temp_resend_cli/repo/src/commands/webhooks/create.ts +128 -0
- package/temp_resend_cli/repo/src/commands/webhooks/delete.ts +49 -0
- package/temp_resend_cli/repo/src/commands/webhooks/get.ts +42 -0
- package/temp_resend_cli/repo/src/commands/webhooks/index.ts +42 -0
- package/temp_resend_cli/repo/src/commands/webhooks/list.ts +55 -0
- package/temp_resend_cli/repo/src/commands/webhooks/listen.ts +379 -0
- package/temp_resend_cli/repo/src/commands/webhooks/update.ts +83 -0
- package/temp_resend_cli/repo/src/commands/webhooks/utils.ts +36 -0
- package/temp_resend_cli/repo/src/commands/whoami.ts +71 -0
- package/temp_resend_cli/repo/src/lib/actions.ts +157 -0
- package/temp_resend_cli/repo/src/lib/client.ts +37 -0
- package/temp_resend_cli/repo/src/lib/config.ts +217 -0
- package/temp_resend_cli/repo/src/lib/files.ts +15 -0
- package/temp_resend_cli/repo/src/lib/help-text.ts +38 -0
- package/temp_resend_cli/repo/src/lib/output.ts +56 -0
- package/temp_resend_cli/repo/src/lib/pagination.ts +36 -0
- package/temp_resend_cli/repo/src/lib/prompts.ts +149 -0
- package/temp_resend_cli/repo/src/lib/spinner.ts +100 -0
- package/temp_resend_cli/repo/src/lib/table.ts +57 -0
- package/temp_resend_cli/repo/src/lib/tty.ts +28 -0
- package/temp_resend_cli/repo/src/lib/update-check.ts +169 -0
- package/temp_resend_cli/repo/src/lib/version.ts +4 -0
- package/temp_resend_cli/repo/tests/commands/api-keys/create.test.ts +196 -0
- package/temp_resend_cli/repo/tests/commands/api-keys/delete.test.ts +157 -0
- package/temp_resend_cli/repo/tests/commands/api-keys/list.test.ts +134 -0
- package/temp_resend_cli/repo/tests/commands/auth/login.test.ts +153 -0
- package/temp_resend_cli/repo/tests/commands/auth/logout.test.ts +153 -0
- package/temp_resend_cli/repo/tests/commands/broadcasts/create.test.ts +454 -0
- package/temp_resend_cli/repo/tests/commands/broadcasts/delete.test.ts +183 -0
- package/temp_resend_cli/repo/tests/commands/broadcasts/get.test.ts +147 -0
- package/temp_resend_cli/repo/tests/commands/broadcasts/list.test.ts +199 -0
- package/temp_resend_cli/repo/tests/commands/broadcasts/send.test.ts +162 -0
- package/temp_resend_cli/repo/tests/commands/broadcasts/update.test.ts +288 -0
- package/temp_resend_cli/repo/tests/commands/contact-properties/create.test.ts +251 -0
- package/temp_resend_cli/repo/tests/commands/contact-properties/delete.test.ts +184 -0
- package/temp_resend_cli/repo/tests/commands/contact-properties/get.test.ts +145 -0
- package/temp_resend_cli/repo/tests/commands/contact-properties/list.test.ts +181 -0
- package/temp_resend_cli/repo/tests/commands/contact-properties/update.test.ts +217 -0
- package/temp_resend_cli/repo/tests/commands/contacts/add-segment.test.ts +189 -0
- package/temp_resend_cli/repo/tests/commands/contacts/create.test.ts +271 -0
- package/temp_resend_cli/repo/tests/commands/contacts/delete.test.ts +193 -0
- package/temp_resend_cli/repo/tests/commands/contacts/get.test.ts +149 -0
- package/temp_resend_cli/repo/tests/commands/contacts/list.test.ts +176 -0
- package/temp_resend_cli/repo/tests/commands/contacts/remove-segment.test.ts +167 -0
- package/temp_resend_cli/repo/tests/commands/contacts/segments.test.ts +168 -0
- package/temp_resend_cli/repo/tests/commands/contacts/topics.test.ts +164 -0
- package/temp_resend_cli/repo/tests/commands/contacts/update-topics.test.ts +248 -0
- package/temp_resend_cli/repo/tests/commands/contacts/update.test.ts +206 -0
- package/temp_resend_cli/repo/tests/commands/doctor.test.ts +164 -0
- package/temp_resend_cli/repo/tests/commands/domains/create.test.ts +193 -0
- package/temp_resend_cli/repo/tests/commands/domains/delete.test.ts +157 -0
- package/temp_resend_cli/repo/tests/commands/domains/get.test.ts +138 -0
- package/temp_resend_cli/repo/tests/commands/domains/list.test.ts +165 -0
- package/temp_resend_cli/repo/tests/commands/domains/update.test.ts +224 -0
- package/temp_resend_cli/repo/tests/commands/domains/verify.test.ts +118 -0
- package/temp_resend_cli/repo/tests/commands/emails/batch.test.ts +324 -0
- package/temp_resend_cli/repo/tests/commands/emails/get.test.ts +132 -0
- package/temp_resend_cli/repo/tests/commands/emails/receiving/attachment.test.ts +141 -0
- package/temp_resend_cli/repo/tests/commands/emails/receiving/attachments.test.ts +169 -0
- package/temp_resend_cli/repo/tests/commands/emails/receiving/get.test.ts +141 -0
- package/temp_resend_cli/repo/tests/commands/emails/receiving/list.test.ts +182 -0
- package/temp_resend_cli/repo/tests/commands/emails/send.test.ts +312 -0
- package/temp_resend_cli/repo/tests/commands/segments/create.test.ts +164 -0
- package/temp_resend_cli/repo/tests/commands/segments/delete.test.ts +183 -0
- package/temp_resend_cli/repo/tests/commands/segments/get.test.ts +138 -0
- package/temp_resend_cli/repo/tests/commands/segments/list.test.ts +174 -0
- package/temp_resend_cli/repo/tests/commands/teams/list.test.ts +62 -0
- package/temp_resend_cli/repo/tests/commands/teams/remove.test.ts +110 -0
- package/temp_resend_cli/repo/tests/commands/teams/switch.test.ts +103 -0
- package/temp_resend_cli/repo/tests/commands/topics/create.test.ts +192 -0
- package/temp_resend_cli/repo/tests/commands/topics/delete.test.ts +157 -0
- package/temp_resend_cli/repo/tests/commands/topics/get.test.ts +126 -0
- package/temp_resend_cli/repo/tests/commands/topics/list.test.ts +125 -0
- package/temp_resend_cli/repo/tests/commands/topics/update.test.ts +178 -0
- package/temp_resend_cli/repo/tests/commands/webhooks/create.test.ts +225 -0
- package/temp_resend_cli/repo/tests/commands/webhooks/delete.test.ts +157 -0
- package/temp_resend_cli/repo/tests/commands/webhooks/get.test.ts +126 -0
- package/temp_resend_cli/repo/tests/commands/webhooks/list.test.ts +178 -0
- package/temp_resend_cli/repo/tests/commands/webhooks/update.test.ts +207 -0
- package/temp_resend_cli/repo/tests/commands/whoami.test.ts +98 -0
- package/temp_resend_cli/repo/tests/e2e/smoke.test.ts +93 -0
- package/temp_resend_cli/repo/tests/helpers.ts +86 -0
- package/temp_resend_cli/repo/tests/lib/client.test.ts +71 -0
- package/temp_resend_cli/repo/tests/lib/config.test.ts +451 -0
- package/temp_resend_cli/repo/tests/lib/files.test.ts +73 -0
- package/temp_resend_cli/repo/tests/lib/help-text.test.ts +97 -0
- package/temp_resend_cli/repo/tests/lib/output.test.ts +136 -0
- package/temp_resend_cli/repo/tests/lib/prompts.test.ts +185 -0
- package/temp_resend_cli/repo/tests/lib/spinner.test.ts +166 -0
- package/temp_resend_cli/repo/tests/lib/table.test.ts +63 -0
- package/temp_resend_cli/repo/tests/lib/tty.test.ts +89 -0
- package/temp_resend_cli/repo/tests/lib/update-check.test.ts +179 -0
- package/temp_resend_cli/repo/tsconfig.json +14 -0
- package/temp_resend_cli/repo/vitest.config.e2e.ts +8 -0
- package/temp_resend_cli/repo/vitest.config.ts +10 -0
- package/tests/test-resend-smoke.sh +7 -3
|
@@ -4,6 +4,7 @@ const path = require("path")
|
|
|
4
4
|
const { execSync } = require("child_process")
|
|
5
5
|
|
|
6
6
|
const CLI = path.join(__dirname, "..", "cli", "supercli.js")
|
|
7
|
+
const nodeDir = path.dirname(process.execPath)
|
|
7
8
|
|
|
8
9
|
function runNoServer(args, options = {}) {
|
|
9
10
|
try {
|
|
@@ -83,13 +84,33 @@ describe("resend hybrid plugin", () => {
|
|
|
83
84
|
})
|
|
84
85
|
|
|
85
86
|
test("fails with helpful message when resend binary is missing", () => {
|
|
86
|
-
|
|
87
|
+
// Ensure 'resend' is not found, but keep 'node' available
|
|
88
|
+
const r = runNoServer("resend cli doctor --json", {
|
|
89
|
+
env: { ...env, PATH: `${fakeBinDir}:${nodeDir}` }
|
|
90
|
+
})
|
|
87
91
|
expect(r.ok).toBe(false)
|
|
88
92
|
const data = JSON.parse(r.output || r.stderr)
|
|
89
93
|
expect(data.error.message).toContain("Missing dependency 'resend'")
|
|
90
94
|
expect(data.error.message).toContain("Please run 'dcli resend cli setup'")
|
|
91
95
|
})
|
|
92
96
|
|
|
97
|
+
test("exposes expanded structured commands", () => {
|
|
98
|
+
const help = runNoServer("help resend --json", { env })
|
|
99
|
+
expect(help.ok).toBe(true)
|
|
100
|
+
const data = JSON.parse(help.output)
|
|
101
|
+
|
|
102
|
+
const resendNamespace = data.namespaces.find(n => n.name === "resend")
|
|
103
|
+
expect(resendNamespace).toBeDefined()
|
|
104
|
+
|
|
105
|
+
const resources = new Set(resendNamespace.resources.map(r => r.name))
|
|
106
|
+
|
|
107
|
+
expect(resources.has("domains")).toBe(true)
|
|
108
|
+
expect(resources.has("api-keys")).toBe(true)
|
|
109
|
+
expect(resources.has("webhooks")).toBe(true)
|
|
110
|
+
expect(resources.has("contacts")).toBe(true)
|
|
111
|
+
expect(resources.has("auth")).toBe(true)
|
|
112
|
+
})
|
|
113
|
+
|
|
93
114
|
test("doctor reports node and npm dependencies as healthy", () => {
|
|
94
115
|
const r = runNoServer("plugins doctor resend --json", { env })
|
|
95
116
|
expect(r.ok).toBe(true)
|
package/package.json
CHANGED
package/plugins/plugins.json
CHANGED
|
@@ -375,8 +375,8 @@
|
|
|
375
375
|
},
|
|
376
376
|
{
|
|
377
377
|
"name": "resend",
|
|
378
|
-
"description": "Resend CLI plugin for official email sending and
|
|
379
|
-
"tags": ["resend", "email", "api", "passthrough"],
|
|
378
|
+
"description": "Resend CLI plugin for official email sending, domain management, API keys, and audience contacts",
|
|
379
|
+
"tags": ["resend", "email", "api", "domains", "passthrough"],
|
|
380
380
|
"has_learn": true,
|
|
381
381
|
"source": {
|
|
382
382
|
"type": "bundled",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "resend",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Resend CLI plugin: official tool for Resend emails,
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Resend CLI plugin: official tool for Resend emails, domains, API keys, and audience management",
|
|
5
5
|
"source": "https://github.com/resend/resend-cli",
|
|
6
6
|
"checks": [
|
|
7
7
|
{ "type": "binary", "name": "node" },
|
|
@@ -35,6 +35,36 @@
|
|
|
35
35
|
},
|
|
36
36
|
"args": []
|
|
37
37
|
},
|
|
38
|
+
{
|
|
39
|
+
"namespace": "resend",
|
|
40
|
+
"resource": "auth",
|
|
41
|
+
"action": "whoami",
|
|
42
|
+
"description": "Display the current authenticated user/identity",
|
|
43
|
+
"adapter": "process",
|
|
44
|
+
"adapterConfig": {
|
|
45
|
+
"command": "resend",
|
|
46
|
+
"baseArgs": ["whoami"],
|
|
47
|
+
"jsonFlag": "--json",
|
|
48
|
+
"parseJson": true,
|
|
49
|
+
"missingDependencyHelp": "Please run 'dcli resend cli setup' to install the Resend CLI."
|
|
50
|
+
},
|
|
51
|
+
"args": []
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"namespace": "resend",
|
|
55
|
+
"resource": "auth",
|
|
56
|
+
"action": "logout",
|
|
57
|
+
"description": "Log out and clear local credentials",
|
|
58
|
+
"adapter": "process",
|
|
59
|
+
"adapterConfig": {
|
|
60
|
+
"command": "resend",
|
|
61
|
+
"baseArgs": ["logout"],
|
|
62
|
+
"jsonFlag": "--json",
|
|
63
|
+
"parseJson": true,
|
|
64
|
+
"missingDependencyHelp": "Please run 'dcli resend cli setup' to install the Resend CLI."
|
|
65
|
+
},
|
|
66
|
+
"args": []
|
|
67
|
+
},
|
|
38
68
|
{
|
|
39
69
|
"namespace": "resend",
|
|
40
70
|
"resource": "cli",
|
|
@@ -75,6 +105,253 @@
|
|
|
75
105
|
{ "name": "api-key", "type": "string", "required": false, "description": "Override API key" }
|
|
76
106
|
]
|
|
77
107
|
},
|
|
108
|
+
{
|
|
109
|
+
"namespace": "resend",
|
|
110
|
+
"resource": "domains",
|
|
111
|
+
"action": "list",
|
|
112
|
+
"description": "List all domains in your account",
|
|
113
|
+
"adapter": "process",
|
|
114
|
+
"adapterConfig": {
|
|
115
|
+
"command": "resend",
|
|
116
|
+
"baseArgs": ["domains", "list"],
|
|
117
|
+
"jsonFlag": "--json",
|
|
118
|
+
"parseJson": true,
|
|
119
|
+
"missingDependencyHelp": "Please run 'dcli resend cli setup' to install the Resend CLI."
|
|
120
|
+
},
|
|
121
|
+
"args": []
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"namespace": "resend",
|
|
125
|
+
"resource": "domains",
|
|
126
|
+
"action": "create",
|
|
127
|
+
"description": "Create a new domain for sending/receiving",
|
|
128
|
+
"adapter": "process",
|
|
129
|
+
"adapterConfig": {
|
|
130
|
+
"command": "resend",
|
|
131
|
+
"baseArgs": ["domains", "create"],
|
|
132
|
+
"jsonFlag": "--json",
|
|
133
|
+
"parseJson": true,
|
|
134
|
+
"missingDependencyHelp": "Please run 'dcli resend cli setup' to install the Resend CLI."
|
|
135
|
+
},
|
|
136
|
+
"args": [
|
|
137
|
+
{ "name": "name", "type": "string", "required": true, "description": "Domain name (e.g., example.com)" },
|
|
138
|
+
{ "name": "region", "type": "string", "required": false, "description": "Region (us-east-1, eu-west-1, etc.)" }
|
|
139
|
+
]
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"namespace": "resend",
|
|
143
|
+
"resource": "domains",
|
|
144
|
+
"action": "get",
|
|
145
|
+
"description": "Retrieve details for a specific domain",
|
|
146
|
+
"adapter": "process",
|
|
147
|
+
"adapterConfig": {
|
|
148
|
+
"command": "resend",
|
|
149
|
+
"baseArgs": ["domains", "get"],
|
|
150
|
+
"positionalArgs": ["id"],
|
|
151
|
+
"jsonFlag": "--json",
|
|
152
|
+
"parseJson": true,
|
|
153
|
+
"missingDependencyHelp": "Please run 'dcli resend cli setup' to install the Resend CLI."
|
|
154
|
+
},
|
|
155
|
+
"args": [
|
|
156
|
+
{ "name": "id", "type": "string", "required": true, "description": "Domain ID" }
|
|
157
|
+
]
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"namespace": "resend",
|
|
161
|
+
"resource": "domains",
|
|
162
|
+
"action": "delete",
|
|
163
|
+
"description": "Delete an existing domain",
|
|
164
|
+
"adapter": "process",
|
|
165
|
+
"adapterConfig": {
|
|
166
|
+
"command": "resend",
|
|
167
|
+
"baseArgs": ["domains", "delete"],
|
|
168
|
+
"positionalArgs": ["id"],
|
|
169
|
+
"jsonFlag": "--json",
|
|
170
|
+
"parseJson": true,
|
|
171
|
+
"missingDependencyHelp": "Please run 'dcli resend cli setup' to install the Resend CLI."
|
|
172
|
+
},
|
|
173
|
+
"args": [
|
|
174
|
+
{ "name": "id", "type": "string", "required": true, "description": "Domain ID" }
|
|
175
|
+
]
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"namespace": "resend",
|
|
179
|
+
"resource": "domains",
|
|
180
|
+
"action": "verify",
|
|
181
|
+
"description": "Verify an existing domain",
|
|
182
|
+
"adapter": "process",
|
|
183
|
+
"adapterConfig": {
|
|
184
|
+
"command": "resend",
|
|
185
|
+
"baseArgs": ["domains", "verify"],
|
|
186
|
+
"positionalArgs": ["id"],
|
|
187
|
+
"jsonFlag": "--json",
|
|
188
|
+
"parseJson": true,
|
|
189
|
+
"missingDependencyHelp": "Please run 'dcli resend cli setup' to install the Resend CLI."
|
|
190
|
+
},
|
|
191
|
+
"args": [
|
|
192
|
+
{ "name": "id", "type": "string", "required": true, "description": "Domain ID" }
|
|
193
|
+
]
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"namespace": "resend",
|
|
197
|
+
"resource": "api-keys",
|
|
198
|
+
"action": "list",
|
|
199
|
+
"description": "List all API keys in your account",
|
|
200
|
+
"adapter": "process",
|
|
201
|
+
"adapterConfig": {
|
|
202
|
+
"command": "resend",
|
|
203
|
+
"baseArgs": ["api-keys", "list"],
|
|
204
|
+
"jsonFlag": "--json",
|
|
205
|
+
"parseJson": true,
|
|
206
|
+
"missingDependencyHelp": "Please run 'dcli resend cli setup' to install the Resend CLI."
|
|
207
|
+
},
|
|
208
|
+
"args": []
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"namespace": "resend",
|
|
212
|
+
"resource": "api-keys",
|
|
213
|
+
"action": "create",
|
|
214
|
+
"description": "Create a new API key",
|
|
215
|
+
"adapter": "process",
|
|
216
|
+
"adapterConfig": {
|
|
217
|
+
"command": "resend",
|
|
218
|
+
"baseArgs": ["api-keys", "create"],
|
|
219
|
+
"jsonFlag": "--json",
|
|
220
|
+
"parseJson": true,
|
|
221
|
+
"missingDependencyHelp": "Please run 'dcli resend cli setup' to install the Resend CLI."
|
|
222
|
+
},
|
|
223
|
+
"args": [
|
|
224
|
+
{ "name": "name", "type": "string", "required": true, "description": "Name for the API key" },
|
|
225
|
+
{ "name": "permission", "type": "string", "required": false, "description": "Permission (full_access, sending_access)" },
|
|
226
|
+
{ "name": "domain-id", "type": "string", "required": false, "description": "Restrict to specific domain ID" }
|
|
227
|
+
]
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"namespace": "resend",
|
|
231
|
+
"resource": "api-keys",
|
|
232
|
+
"action": "delete",
|
|
233
|
+
"description": "Delete an existing API key",
|
|
234
|
+
"adapter": "process",
|
|
235
|
+
"adapterConfig": {
|
|
236
|
+
"command": "resend",
|
|
237
|
+
"baseArgs": ["api-keys", "delete"],
|
|
238
|
+
"positionalArgs": ["id"],
|
|
239
|
+
"jsonFlag": "--json",
|
|
240
|
+
"parseJson": true,
|
|
241
|
+
"missingDependencyHelp": "Please run 'dcli resend cli setup' to install the Resend CLI."
|
|
242
|
+
},
|
|
243
|
+
"args": [
|
|
244
|
+
{ "name": "id", "type": "string", "required": true, "description": "API Key ID" }
|
|
245
|
+
]
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"namespace": "resend",
|
|
249
|
+
"resource": "webhooks",
|
|
250
|
+
"action": "list",
|
|
251
|
+
"description": "List all webhooks in your account",
|
|
252
|
+
"adapter": "process",
|
|
253
|
+
"adapterConfig": {
|
|
254
|
+
"command": "resend",
|
|
255
|
+
"baseArgs": ["webhooks", "list"],
|
|
256
|
+
"jsonFlag": "--json",
|
|
257
|
+
"parseJson": true,
|
|
258
|
+
"missingDependencyHelp": "Please run 'dcli resend cli setup' to install the Resend CLI."
|
|
259
|
+
},
|
|
260
|
+
"args": []
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"namespace": "resend",
|
|
264
|
+
"resource": "webhooks",
|
|
265
|
+
"action": "create",
|
|
266
|
+
"description": "Create a new webhook",
|
|
267
|
+
"adapter": "process",
|
|
268
|
+
"adapterConfig": {
|
|
269
|
+
"command": "resend",
|
|
270
|
+
"baseArgs": ["webhooks", "create"],
|
|
271
|
+
"jsonFlag": "--json",
|
|
272
|
+
"parseJson": true,
|
|
273
|
+
"missingDependencyHelp": "Please run 'dcli resend cli setup' to install the Resend CLI."
|
|
274
|
+
},
|
|
275
|
+
"args": [
|
|
276
|
+
{ "name": "url", "type": "string", "required": true, "description": "Webhook endpoint URL (must be HTTPS)" },
|
|
277
|
+
{ "name": "events", "type": "string", "required": true, "description": "Events to listen for (space-separated, or 'all')" }
|
|
278
|
+
]
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
"namespace": "resend",
|
|
282
|
+
"resource": "webhooks",
|
|
283
|
+
"action": "delete",
|
|
284
|
+
"description": "Delete an existing webhook",
|
|
285
|
+
"adapter": "process",
|
|
286
|
+
"adapterConfig": {
|
|
287
|
+
"command": "resend",
|
|
288
|
+
"baseArgs": ["webhooks", "delete"],
|
|
289
|
+
"positionalArgs": ["id"],
|
|
290
|
+
"jsonFlag": "--json",
|
|
291
|
+
"parseJson": true,
|
|
292
|
+
"missingDependencyHelp": "Please run 'dcli resend cli setup' to install the Resend CLI."
|
|
293
|
+
},
|
|
294
|
+
"args": [
|
|
295
|
+
{ "name": "id", "type": "string", "required": true, "description": "Webhook ID" }
|
|
296
|
+
]
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"namespace": "resend",
|
|
300
|
+
"resource": "contacts",
|
|
301
|
+
"action": "list",
|
|
302
|
+
"description": "List contacts in an audience",
|
|
303
|
+
"adapter": "process",
|
|
304
|
+
"adapterConfig": {
|
|
305
|
+
"command": "resend",
|
|
306
|
+
"baseArgs": ["contacts", "list"],
|
|
307
|
+
"jsonFlag": "--json",
|
|
308
|
+
"parseJson": true,
|
|
309
|
+
"missingDependencyHelp": "Please run 'dcli resend cli setup' to install the Resend CLI."
|
|
310
|
+
},
|
|
311
|
+
"args": [
|
|
312
|
+
{ "name": "audience-id", "type": "string", "required": true, "description": "Audience ID" }
|
|
313
|
+
]
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
"namespace": "resend",
|
|
317
|
+
"resource": "contacts",
|
|
318
|
+
"action": "create",
|
|
319
|
+
"description": "Create a new contact",
|
|
320
|
+
"adapter": "process",
|
|
321
|
+
"adapterConfig": {
|
|
322
|
+
"command": "resend",
|
|
323
|
+
"baseArgs": ["contacts", "create"],
|
|
324
|
+
"jsonFlag": "--json",
|
|
325
|
+
"parseJson": true,
|
|
326
|
+
"missingDependencyHelp": "Please run 'dcli resend cli setup' to install the Resend CLI."
|
|
327
|
+
},
|
|
328
|
+
"args": [
|
|
329
|
+
{ "name": "audience-id", "type": "string", "required": true, "description": "Audience ID" },
|
|
330
|
+
{ "name": "email", "type": "string", "required": true, "description": "Contact email address" },
|
|
331
|
+
{ "name": "first-name", "type": "string", "required": false, "description": "First name" },
|
|
332
|
+
{ "name": "last-name", "type": "string", "required": false, "description": "Last name" },
|
|
333
|
+
{ "name": "unsubscribed", "type": "boolean", "required": false, "description": "Unsubscribed status" }
|
|
334
|
+
]
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"namespace": "resend",
|
|
338
|
+
"resource": "contacts",
|
|
339
|
+
"action": "delete",
|
|
340
|
+
"description": "Delete an existing contact",
|
|
341
|
+
"adapter": "process",
|
|
342
|
+
"adapterConfig": {
|
|
343
|
+
"command": "resend",
|
|
344
|
+
"baseArgs": ["contacts", "delete"],
|
|
345
|
+
"jsonFlag": "--json",
|
|
346
|
+
"parseJson": true,
|
|
347
|
+
"missingDependencyHelp": "Please run 'dcli resend cli setup' to install the Resend CLI."
|
|
348
|
+
},
|
|
349
|
+
"args": [
|
|
350
|
+
{ "name": "audience-id", "type": "string", "required": true, "description": "Audience ID" },
|
|
351
|
+
{ "name": "id", "type": "string", "required": false, "description": "Contact ID" },
|
|
352
|
+
{ "name": "email", "type": "string", "required": false, "description": "Contact email address" }
|
|
353
|
+
]
|
|
354
|
+
},
|
|
78
355
|
{
|
|
79
356
|
"namespace": "resend",
|
|
80
357
|
"resource": "_",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
skill_name: resend.quickstart
|
|
3
|
-
description: Agent workflow to
|
|
4
|
-
tags: resend,email,api,agents,usage
|
|
3
|
+
description: Agent workflow to manage emails, domains, API keys, and contacts via Resend CLI.
|
|
4
|
+
tags: resend,email,domains,api-keys,contacts,agents,usage
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Resend CLI Quickstart
|
|
8
8
|
|
|
9
|
-
Use this when you need to send emails
|
|
9
|
+
Use this when you need to send emails, manage domains, API keys, or audience contacts.
|
|
10
10
|
|
|
11
11
|
## 1) Install the plugin
|
|
12
12
|
|
|
@@ -41,21 +41,40 @@ supercli resend emails send --api-key re_xxx ...
|
|
|
41
41
|
supercli resend login --key re_xxx
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
## 4)
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
supercli resend cli doctor --json
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
## 5) Send an email
|
|
44
|
+
## 4) Core Operations
|
|
51
45
|
|
|
46
|
+
### Emails
|
|
52
47
|
```bash
|
|
53
48
|
supercli resend emails send \
|
|
54
49
|
--from "you@yourdomain.com" \
|
|
55
50
|
--to "recipient@example.com" \
|
|
56
|
-
--subject "Hello
|
|
57
|
-
--text "Body text
|
|
51
|
+
--subject "Hello" \
|
|
52
|
+
--text "Body text" \
|
|
58
53
|
--json
|
|
59
54
|
```
|
|
60
55
|
|
|
61
|
-
|
|
56
|
+
### Domains
|
|
57
|
+
```bash
|
|
58
|
+
supercli resend domains list --json
|
|
59
|
+
supercli resend domains create --name "example.com" --json
|
|
60
|
+
supercli resend domains verify --id "dom_123" --json
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### API Keys
|
|
64
|
+
```bash
|
|
65
|
+
supercli resend api-keys list --json
|
|
66
|
+
supercli resend api-keys create --name "Production Key" --permission full_access --json
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Audience Contacts
|
|
70
|
+
```bash
|
|
71
|
+
supercli resend contacts list --audience-id "aud_123" --json
|
|
72
|
+
supercli resend contacts create --audience-id "aud_123" --email "user@example.com" --json
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## 5) Diagnostics
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
supercli resend auth whoami --json
|
|
79
|
+
supercli resend cli doctor --json
|
|
80
|
+
```
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
|
|
3
|
+
const eventPath = process.env.GITHUB_EVENT_PATH;
|
|
4
|
+
if (!eventPath) {
|
|
5
|
+
console.error(
|
|
6
|
+
'GITHUB_EVENT_PATH is not set. This script must run inside GitHub Actions.',
|
|
7
|
+
);
|
|
8
|
+
process.exit(1);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const eventJson = JSON.parse(fs.readFileSync(eventPath, 'utf8'));
|
|
12
|
+
const prTitle = eventJson.pull_request?.title;
|
|
13
|
+
if (!prTitle) {
|
|
14
|
+
console.error('Could not read pull_request.title from event payload.');
|
|
15
|
+
process.exit(1);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const isValidType = (title) =>
|
|
19
|
+
/^(feat|fix|chore|refactor)(\([a-zA-Z0-9-]+\))?:\s[a-z0-9].*$/.test(title);
|
|
20
|
+
|
|
21
|
+
const validateTitle = (title) => {
|
|
22
|
+
if (!isValidType(title)) {
|
|
23
|
+
console.error(
|
|
24
|
+
`PR title does not follow the required format "[type]: [description]"
|
|
25
|
+
Examples: "feat: add --cc flag" | "fix: domain fetch timeout"
|
|
26
|
+
Types: feat · fix · chore · refactor
|
|
27
|
+
Rules: lowercase after the colon`,
|
|
28
|
+
);
|
|
29
|
+
process.exit(1);
|
|
30
|
+
}
|
|
31
|
+
console.info(`PR title valid: "${title}"`);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
validateTitle(prTitle);
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches: [main]
|
|
5
|
+
pull_request:
|
|
6
|
+
concurrency:
|
|
7
|
+
group: ci-${{ github.ref }}
|
|
8
|
+
cancel-in-progress: true
|
|
9
|
+
jobs:
|
|
10
|
+
lint:
|
|
11
|
+
runs-on: blacksmith-2vcpu-ubuntu-2204
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v6
|
|
14
|
+
- uses: pnpm/action-setup@v4
|
|
15
|
+
- uses: actions/setup-node@v6
|
|
16
|
+
with:
|
|
17
|
+
node-version: 24
|
|
18
|
+
cache: 'pnpm'
|
|
19
|
+
- run: pnpm install --frozen-lockfile
|
|
20
|
+
- run: pnpm lint
|
|
21
|
+
|
|
22
|
+
typecheck:
|
|
23
|
+
runs-on: blacksmith-2vcpu-ubuntu-2204
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v6
|
|
26
|
+
- uses: pnpm/action-setup@v4
|
|
27
|
+
- uses: actions/setup-node@v6
|
|
28
|
+
with:
|
|
29
|
+
node-version: 24
|
|
30
|
+
cache: 'pnpm'
|
|
31
|
+
- run: pnpm install --frozen-lockfile
|
|
32
|
+
- run: pnpm typecheck
|
|
33
|
+
|
|
34
|
+
test:
|
|
35
|
+
runs-on: blacksmith-2vcpu-ubuntu-2204
|
|
36
|
+
steps:
|
|
37
|
+
- uses: actions/checkout@v6
|
|
38
|
+
- uses: pnpm/action-setup@v4
|
|
39
|
+
- uses: actions/setup-node@v6
|
|
40
|
+
with:
|
|
41
|
+
node-version: 24
|
|
42
|
+
cache: 'pnpm'
|
|
43
|
+
- run: pnpm install --frozen-lockfile
|
|
44
|
+
- run: pnpm test
|
|
45
|
+
|
|
46
|
+
smoke:
|
|
47
|
+
runs-on: blacksmith-2vcpu-ubuntu-2204
|
|
48
|
+
steps:
|
|
49
|
+
- uses: actions/checkout@v6
|
|
50
|
+
- uses: pnpm/action-setup@v4
|
|
51
|
+
- uses: actions/setup-node@v6
|
|
52
|
+
with:
|
|
53
|
+
node-version: 24
|
|
54
|
+
cache: 'pnpm'
|
|
55
|
+
- run: pnpm install --frozen-lockfile
|
|
56
|
+
- name: Build Node bundle
|
|
57
|
+
run: pnpm build
|
|
58
|
+
- name: Build pkg binary
|
|
59
|
+
run: pnpm exec pkg dist/cli.cjs --compress Brotli --target node24-linux-x64 --output dist/resend
|
|
60
|
+
- name: Smoke test Node bundle
|
|
61
|
+
run: |
|
|
62
|
+
node dist/cli.cjs --version
|
|
63
|
+
node dist/cli.cjs --help
|
|
64
|
+
- name: Smoke test pkg binary
|
|
65
|
+
run: |
|
|
66
|
+
./dist/resend --version
|
|
67
|
+
./dist/resend --help
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
name: Post-Release Verification
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_run:
|
|
5
|
+
workflows: [Release]
|
|
6
|
+
types: [completed]
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
verify-install-unix:
|
|
10
|
+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
|
11
|
+
strategy:
|
|
12
|
+
fail-fast: false
|
|
13
|
+
matrix:
|
|
14
|
+
os: [ubuntu-latest, macos-latest]
|
|
15
|
+
runs-on: ${{ matrix.os }}
|
|
16
|
+
steps:
|
|
17
|
+
- name: Install via install.sh
|
|
18
|
+
run: curl -fsSL https://raw.githubusercontent.com/resend/resend-cli/${{ github.event.workflow_run.head_sha }}/install.sh | bash
|
|
19
|
+
|
|
20
|
+
- name: Verify binary
|
|
21
|
+
run: |
|
|
22
|
+
"$HOME/.resend/bin/resend" --version
|
|
23
|
+
"$HOME/.resend/bin/resend" --help
|
|
24
|
+
|
|
25
|
+
verify-install-windows:
|
|
26
|
+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
|
27
|
+
runs-on: windows-latest
|
|
28
|
+
steps:
|
|
29
|
+
- name: Install via install.ps1
|
|
30
|
+
shell: pwsh
|
|
31
|
+
run: irm https://raw.githubusercontent.com/resend/resend-cli/${{ github.event.workflow_run.head_sha }}/install.ps1 | iex
|
|
32
|
+
|
|
33
|
+
- name: Verify binary
|
|
34
|
+
shell: pwsh
|
|
35
|
+
run: |
|
|
36
|
+
$exe = "$env:USERPROFILE\.resend\bin\resend.exe"
|
|
37
|
+
& $exe --version
|
|
38
|
+
& $exe --help
|
|
39
|
+
|
|
40
|
+
verify-npx:
|
|
41
|
+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
|
42
|
+
runs-on: ubuntu-latest
|
|
43
|
+
steps:
|
|
44
|
+
- uses: actions/setup-node@v6
|
|
45
|
+
with:
|
|
46
|
+
node-version: 24
|
|
47
|
+
|
|
48
|
+
- name: Verify npx resend-cli
|
|
49
|
+
run: |
|
|
50
|
+
npx resend-cli --version
|
|
51
|
+
npx resend-cli --help
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
name: PR Title Check
|
|
2
|
+
on:
|
|
3
|
+
pull_request:
|
|
4
|
+
types: [opened, edited, synchronize, reopened]
|
|
5
|
+
permissions:
|
|
6
|
+
contents: read
|
|
7
|
+
pull-requests: read
|
|
8
|
+
jobs:
|
|
9
|
+
pr-title-check:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v6
|
|
13
|
+
- run: node .github/scripts/pr-title-check.js
|