@ascendkit/cli 0.3.8 → 0.3.11

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/dist/cli.js CHANGED
@@ -112,9 +112,14 @@ Commands:
112
112
  journey node update <journey-id> <node-name> [--action <json>] [--email-id <email>] [--terminal <true|false>]
113
113
  journey node remove <journey-id> <node-name>
114
114
  journey transition list <journey-id> [--from <node-name>] [--to <node-name>]
115
- journey transition add <journey-id> --from <node-name> --to <node-name> --trigger <json> [--priority <n>] [--name <transition-name>] [--quiet]
116
- journey transition update <journey-id> <transition-name> [--trigger <json>] [--priority <n>]
117
- journey transition remove <journey-id> <transition-name>`,
115
+ journey transition add <journey-id> --from <node-name> --to <node-name> --on <event> | --after <delay> [--priority <n>] [--name <transition-name>] [--quiet]
116
+ journey transition update <journey-id> <transition-name> [--on <event>] [--after <delay>] [--priority <n>]
117
+ journey transition remove <journey-id> <transition-name>
118
+
119
+ Trigger shortcuts:
120
+ --on <event> Event trigger (e.g. --on user.login, --on app.completed_onboarding)
121
+ --after <delay> Timer trigger (e.g. --after 2d, --after 12h, --after 30m)
122
+ --trigger <json> Raw JSON: {"type":"event","event":"user.login"} or {"type":"timer","delay":"3d"}`,
118
123
  "email-identity": `Usage: ascendkit email-identity <command>
119
124
 
120
125
  Commands:
@@ -142,10 +147,10 @@ Commands:
142
147
  campaign: `Usage: ascendkit campaign <command>
143
148
 
144
149
  Commands:
145
- campaign create --name <name> --template <template-id> --audience <json> [--scheduled-at <datetime>]
150
+ campaign create --name <name> --template <template-id> --audience <json> [--from <email>] [--scheduled-at <datetime>]
146
151
  campaign list [--status <draft|scheduled|sending|sent|failed|cancelled>]
147
152
  campaign show <campaign-id>
148
- campaign update <campaign-id> [--name <name>] [--template <template-id>] [--audience <json>] [--scheduled-at <datetime>]
153
+ campaign update <campaign-id> [--name <name>] [--template <template-id>] [--audience <json>] [--from <email>] [--scheduled-at <datetime>]
149
154
  campaign preview <campaign-id>
150
155
  campaign schedule <campaign-id> --at <datetime>
151
156
  campaign cancel <campaign-id>
@@ -153,6 +158,7 @@ Commands:
153
158
 
154
159
  Notes:
155
160
  - --audience is a JSON filter object, e.g. '{"tags":{"$in":["premium"]}}'
161
+ - --from specifies a verified email identity to send from (defaults to environment default)
156
162
  - --scheduled-at / --at accepts ISO 8601 datetime, e.g. 2026-03-15T10:00:00Z
157
163
  - cancel deletes a draft/failed campaign or cancels a scheduled/sending campaign`,
158
164
  environment: `Usage: ascendkit environment <command>
@@ -1951,7 +1957,7 @@ async function runCampaign(client, action, rest) {
1951
1957
  switch (action) {
1952
1958
  case "create": {
1953
1959
  if (!flags.name || !flags.template || !flags.audience) {
1954
- console.error("Usage: ascendkit campaign create --name <name> --template <template-id> --audience <json> [--scheduled-at <datetime>]");
1960
+ console.error("Usage: ascendkit campaign create --name <name> --template <template-id> --audience <json> [--from <email>] [--scheduled-at <datetime>]");
1955
1961
  return await exitCli(1);
1956
1962
  }
1957
1963
  let createFilter;
@@ -1966,6 +1972,7 @@ async function runCampaign(client, action, rest) {
1966
1972
  name: flags.name,
1967
1973
  templateId: flags.template,
1968
1974
  audienceFilter: createFilter,
1975
+ fromIdentityEmail: flags.from,
1969
1976
  scheduledAt: flags["scheduled-at"],
1970
1977
  }));
1971
1978
  break;
@@ -2008,6 +2015,7 @@ async function runCampaign(client, action, rest) {
2008
2015
  name: flags.name,
2009
2016
  templateId: flags.template,
2010
2017
  audienceFilter: updateFilter,
2018
+ fromIdentityEmail: flags.from,
2011
2019
  scheduledAt: flags["scheduled-at"],
2012
2020
  }));
2013
2021
  break;
@@ -13,6 +13,7 @@ const ASCENDKIT_ENV_KEYS = [
13
13
  "ASCENDKIT_API_URL",
14
14
  "NEXT_PUBLIC_ASCENDKIT_ENV_KEY",
15
15
  "ASCENDKIT_ENV_KEY",
16
+ "ASCENDKIT_APP_URL",
16
17
  "ASCENDKIT_SECRET_KEY",
17
18
  "ASCENDKIT_WEBHOOK_SECRET",
18
19
  ];
@@ -135,6 +136,11 @@ function buildAscendKitEnvBlock(values) {
135
136
  `NEXT_PUBLIC_ASCENDKIT_ENV_KEY=${values.NEXT_PUBLIC_ASCENDKIT_ENV_KEY}`,
136
137
  `ASCENDKIT_ENV_KEY=${values.ASCENDKIT_ENV_KEY}`,
137
138
  "",
139
+ "# Public URL where your app is hosted (used for auth callbacks and redirects)",
140
+ "# Example: https://app.yourdomain.com",
141
+ "# Leave blank in local dev if the SDK should infer from the incoming request.",
142
+ `ASCENDKIT_APP_URL=${values.ASCENDKIT_APP_URL}`,
143
+ "",
138
144
  "# AscendKit secret key (server-only; never expose to client/browser)",
139
145
  `ASCENDKIT_SECRET_KEY=${values.ASCENDKIT_SECRET_KEY}`,
140
146
  "",
@@ -183,6 +189,7 @@ async function updateEnvExampleFile(filePath) {
183
189
  ASCENDKIT_API_URL: "",
184
190
  NEXT_PUBLIC_ASCENDKIT_ENV_KEY: "",
185
191
  ASCENDKIT_ENV_KEY: "",
192
+ ASCENDKIT_APP_URL: "",
186
193
  ASCENDKIT_SECRET_KEY: "",
187
194
  ASCENDKIT_WEBHOOK_SECRET: "",
188
195
  });
@@ -208,6 +215,7 @@ async function updateRuntimeEnvFile(filePath, apiUrl, publicKey, secretKey, opti
208
215
  ASCENDKIT_API_URL: resolvedApiUrl,
209
216
  NEXT_PUBLIC_ASCENDKIT_ENV_KEY: resolvedPublicKey,
210
217
  ASCENDKIT_ENV_KEY: resolvedPublicKey,
218
+ ASCENDKIT_APP_URL: readEnvValue(original, "ASCENDKIT_APP_URL") ?? "",
211
219
  ASCENDKIT_SECRET_KEY: resolvedSecretKey,
212
220
  ASCENDKIT_WEBHOOK_SECRET: resolvedWebhookSecret,
213
221
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ascendkit/cli",
3
- "version": "0.3.8",
3
+ "version": "0.3.11",
4
4
  "description": "AscendKit CLI and MCP server",
5
5
  "author": "ascendkit.dev",
6
6
  "license": "MIT",