activitysmith-cli 1.12.0 → 1.13.0

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 (3) hide show
  1. package/README.md +77 -7
  2. package/package.json +2 -2
  3. package/src/cli.js +14 -1
package/README.md CHANGED
@@ -57,6 +57,19 @@ activitysmith push \
57
57
  --subtitle "main"
58
58
  ```
59
59
 
60
+ ### Custom Push Notification Icons
61
+
62
+ ![Push Notifications with custom icons](https://cdn.activitysmith.com/features/push-notifications-with-custom-icons.png)
63
+
64
+ Set `--icon` to a publicly accessible HTTPS image URL to show an avatar or service logo alongside a smaller ActivitySmith app icon. With a custom icon, iOS may omit the subtitle from the notification.
65
+
66
+ ```bash
67
+ activitysmith push \
68
+ --title 'MRR just crossed $10,000 🎉' \
69
+ --message "Up 18% this month from 31 new subscriptions." \
70
+ --icon "https://cdn.activitysmith.com/integrations/icons/stripe.png"
71
+ ```
72
+
60
73
  ### Rich Push Notifications with Media
61
74
 
62
75
  ![Rich Push Notification with image](https://cdn.activitysmith.com/features/rich-push-notification-with-image.png)
@@ -154,23 +167,80 @@ activitysmith push \
154
167
  --actions-file "./actions.json"
155
168
  ```
156
169
 
170
+ ### Push Notification Interruption Levels
171
+
172
+ ![Time Sensitive Push Notification](https://cdn.activitysmith.com/features/time-sensitive-push-notifications.png)
173
+
174
+ Use `--interruption-level` to choose how urgently iOS presents a Push Notification. Omit it for normal delivery. Explicit `active` has the same behavior as the default.
175
+
176
+ | Value | Behavior |
177
+ | --- | --- |
178
+ | `passive` | Appears quietly in the notification list, without sound or waking the screen. |
179
+ | `active` | Normal delivery, subject to the device's notification settings and Focus. This is the default. |
180
+ | `time-sensitive` | Can bypass Scheduled Summary and Focus when the user allows Time Sensitive Notifications for ActivitySmith. |
181
+
182
+ See Apple's [interruption levels](https://developer.apple.com/documentation/usernotifications/unnotificationinterruptionlevel) for the system behavior.
183
+
184
+ #### Passive
185
+
186
+ ```bash
187
+ activitysmith push \
188
+ --title "Daily summary" \
189
+ --message "All scheduled jobs completed successfully." \
190
+ --interruption-level "passive"
191
+ ```
192
+
193
+ #### Active (default)
194
+
195
+ ```bash
196
+ activitysmith push \
197
+ --title "Deployment complete" \
198
+ --message "Your latest changes are live." \
199
+ --interruption-level "active"
200
+ ```
201
+
202
+ Removing the interruption level from this example produces the same delivery behavior.
203
+
204
+ #### Time Sensitive
205
+
206
+ ```bash
207
+ activitysmith push \
208
+ --title "🚨 checkout-api is down" \
209
+ --message "500 errors on 62% of requests. Customers can't complete payments." \
210
+ --interruption-level "time-sensitive"
211
+ ```
212
+
157
213
  ## Live Activities
158
214
 
159
215
  Choose the Live Activity type that matches what you want to show:
160
216
 
161
- - ![Value Live Activity showing revenue with a growth badge](https://cdn.activitysmith.com/features/value-live-activity.png) **Value**: Show a single value on your Lock Screen, such as revenue, a queue count, or a temperature.
217
+ ![Value Live Activity showing revenue with a growth badge](https://cdn.activitysmith.com/features/value-live-activity.png)
218
+
219
+ **Value**: Show a single value on your Lock Screen, such as revenue, a queue count, or a temperature.
220
+
221
+ ![Stats Live Activity with six labeled sales metrics](https://cdn.activitysmith.com/features/stats-live-activity.png)
222
+
223
+ **Stats**: Show up to 8 labeled values on your Lock Screen, from revenue and orders to uptime and conversion.
224
+
225
+ ![Alert Live Activity showing a customer reactivation update](https://cdn.activitysmith.com/features/alert-live-activity.png)
226
+
227
+ **Alert**: Show status updates with a clear message, badge, and icon. When you add an action button, `color` controls the button tint.
228
+
229
+ ![Metrics Live Activity with CPU and memory values](https://cdn.activitysmith.com/features/metrics-live-activity-start.png)
230
+
231
+ **Metrics**: Track two related values with segmented bars, such as CPU and memory.
162
232
 
163
- - ![Stats Live Activity with six labeled sales metrics](https://cdn.activitysmith.com/features/stats-live-activity.png) **Stats**: Show up to 8 labeled values on your Lock Screen, from revenue and orders to uptime and conversion.
233
+ ![Segmented Progress Live Activity showing a workflow step](https://cdn.activitysmith.com/features/update-live-activity.png)
164
234
 
165
- - ![Alert Live Activity showing a customer reactivation update](https://cdn.activitysmith.com/features/alert-live-activity.png) **Alert**: Show status updates with a clear message, badge, and icon. When you add an action button, `color` controls the button tint.
235
+ **Segmented Progress**: Show progress through a known set of steps, like build, test, deploy, and verify.
166
236
 
167
- - ![Metrics Live Activity with CPU and memory values](https://cdn.activitysmith.com/features/metrics-live-activity-start.png) **Metrics**: Track two related values with segmented bars, such as CPU and memory.
237
+ ![Progress Live Activity showing percentage completion](https://cdn.activitysmith.com/features/progress-live-activity.png)
168
238
 
169
- - ![Segmented Progress Live Activity showing a workflow step](https://cdn.activitysmith.com/features/update-live-activity.png) **Segmented Progress**: Show progress through a known set of steps, like build, test, deploy, and verify.
239
+ **Progress**: Show percentage progress for jobs that move continuously toward completion.
170
240
 
171
- - ![Progress Live Activity showing percentage completion](https://cdn.activitysmith.com/features/progress-live-activity.png) **Progress**: Show percentage progress for jobs that move continuously toward completion.
241
+ ![Timer Live Activity showing a benchmark run countdown](https://cdn.activitysmith.com/features/timer-live-activity.png)
172
242
 
173
- - ![Timer Live Activity showing a benchmark run countdown](https://cdn.activitysmith.com/features/timer-live-activity.png) **Timer**: Count down from a duration, or count up from 00:00 while a job runs.
243
+ **Timer**: Count down from a duration, or count up from 00:00 while a job runs.
174
244
 
175
245
  ### Start & Update Live Activity
176
246
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "activitysmith-cli",
3
- "version": "1.12.0",
3
+ "version": "1.13.0",
4
4
  "description": "Command-line interface for ActivitySmith. Send Push Notifications, start, update, and end Live Activities, and set App Icon Badge Counts from your terminal.",
5
5
  "keywords": [
6
6
  "activitysmith",
@@ -42,7 +42,7 @@
42
42
  "test": "node --test"
43
43
  },
44
44
  "dependencies": {
45
- "activitysmith": "^1.12.0",
45
+ "activitysmith": "^1.13.0",
46
46
  "commander": "^12.1.0"
47
47
  }
48
48
  }
package/src/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { Command, InvalidArgumentError } from "commander";
3
+ import { Command, InvalidArgumentError, Option } from "commander";
4
4
  import { loadMetadata } from "./metadata.js";
5
5
  import ActivitySmith from "activitysmith";
6
6
  import { createRequire } from "module";
@@ -1265,6 +1265,14 @@ program
1265
1265
  "--media <url>",
1266
1266
  "HTTPS URL for image, audio, or video shown when the notification is expanded"
1267
1267
  )
1268
+ .option("--icon <url>", "HTTPS image URL for the notification icon, such as an avatar or service logo")
1269
+ .addOption(
1270
+ new Option("--interruption-level <level>", "Notification interruption level").choices([
1271
+ "passive",
1272
+ "active",
1273
+ "time-sensitive",
1274
+ ])
1275
+ )
1268
1276
  .option("--redirection <url>", "HTTPS or shortcuts:// URL opened when notification is tapped")
1269
1277
  .option("--actions <json>", "Actions JSON array (max 4)")
1270
1278
  .option("--actions-file <path>", "Path to actions JSON array file")
@@ -1301,6 +1309,11 @@ program
1301
1309
  options.media !== undefined
1302
1310
  ? normalizeHttpsUrl(options.media, "media")
1303
1311
  : undefined,
1312
+ icon:
1313
+ options.icon !== undefined
1314
+ ? normalizeHttpsUrl(options.icon, "icon")
1315
+ : undefined,
1316
+ interruption_level: options.interruptionLevel,
1304
1317
  redirection:
1305
1318
  options.redirection !== undefined
1306
1319
  ? normalizeOpenUrl(options.redirection, "redirection")