activitysmith-cli 1.18.0 → 1.18.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 +55 -23
- package/package.json +1 -1
- package/src/cli.js +1 -1
package/README.md
CHANGED
|
@@ -111,22 +111,6 @@ activitysmith keys create --name "Ops alerts" --channels ops,alerts
|
|
|
111
111
|
|
|
112
112
|
An API key cannot create another key. This command always uses the browser sign-in, even when `ACTIVITYSMITH_API_KEY` is set.
|
|
113
113
|
|
|
114
|
-
## Paired Devices
|
|
115
|
-
|
|
116
|
-
List the iPhones and iPads paired to your account. Active devices come first:
|
|
117
|
-
|
|
118
|
-
```bash
|
|
119
|
-
activitysmith devices list
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
If no device is paired, the command prints the App Store link. Install ActivitySmith on your iPhone, sign in with the same account, and allow notifications.
|
|
123
|
-
|
|
124
|
-
Add `--include-inactive` to also list devices that can no longer receive deliveries:
|
|
125
|
-
|
|
126
|
-
```bash
|
|
127
|
-
activitysmith devices list --include-inactive
|
|
128
|
-
```
|
|
129
|
-
|
|
130
114
|
## Push Notifications
|
|
131
115
|
|
|
132
116
|
### Send a Push Notification
|
|
@@ -252,7 +236,7 @@ activitysmith push \
|
|
|
252
236
|
--actions-file "./actions.json"
|
|
253
237
|
```
|
|
254
238
|
|
|
255
|
-
###
|
|
239
|
+
### Interruption Levels
|
|
256
240
|
|
|
257
241
|

|
|
258
242
|
|
|
@@ -311,6 +295,23 @@ activitysmith push \
|
|
|
311
295
|
--message "Error rate is back to normal. Incident resolved."
|
|
312
296
|
```
|
|
313
297
|
|
|
298
|
+
### Dismiss a Push Notification
|
|
299
|
+
|
|
300
|
+
Pass the `Notification ID` to `push dismiss` when a Push Notification no longer needs attention, for example after you answered an agent's question somewhere else.
|
|
301
|
+
|
|
302
|
+
Dismissing clears it from the Lock Screen and Notification Center on every device it was sent to. History keeps it.
|
|
303
|
+
|
|
304
|
+
Devices clear the notification in the background, so it can take a moment.
|
|
305
|
+
|
|
306
|
+
```bash
|
|
307
|
+
activitysmith push \
|
|
308
|
+
--title "🙋 Agent needs your input" \
|
|
309
|
+
--message "Approve the database migration?"
|
|
310
|
+
# Notification ID: Xk3pQ8mV2nR7tL9wB4yZ
|
|
311
|
+
|
|
312
|
+
activitysmith push dismiss "Xk3pQ8mV2nR7tL9wB4yZ"
|
|
313
|
+
```
|
|
314
|
+
|
|
314
315
|
## Live Activities
|
|
315
316
|
|
|
316
317
|
Choose the Live Activity type that matches what you want to show:
|
|
@@ -527,13 +528,13 @@ activitysmith activity stream nightly-backup \
|
|
|
527
528
|
}'
|
|
528
529
|
```
|
|
529
530
|
|
|
530
|
-
###
|
|
531
|
+
### Colors
|
|
531
532
|
|
|
532
533
|
Choose from these colors for the Live Activity accent, including progress bars and action buttons, or apply them to an individual icon or badge:
|
|
533
534
|
|
|
534
535
|
`lime`, `green`, `cyan`, `blue`, `purple`, `magenta`, `red`, `orange`, `yellow`, `gray`
|
|
535
536
|
|
|
536
|
-
###
|
|
537
|
+
### Actions
|
|
537
538
|
|
|
538
539
|

|
|
539
540
|
|
|
@@ -654,11 +655,9 @@ activitysmith activity stream agent-approval \
|
|
|
654
655
|
|
|
655
656
|

|
|
656
657
|
|
|
657
|
-
ActivitySmith lets you display any value on your Lock Screen with widgets - SaaS metrics, revenue, signups, uptime, habits, or anything else you want to track.
|
|
658
|
+
ActivitySmith lets you display any value on your Lock Screen with widgets - SaaS metrics, revenue, signups, uptime, habits, or anything else you want to track. Send a value to a metric key, add a widget to your Lock Screen, and it fetches the latest value automatically.
|
|
658
659
|
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
Use the metric key to update its value.
|
|
660
|
+
Use the metric key to update its value. The first value creates the metric.
|
|
662
661
|
|
|
663
662
|
```bash
|
|
664
663
|
activitysmith metrics update deploy.success_rate 99.9
|
|
@@ -670,6 +669,23 @@ String metric values work too.
|
|
|
670
669
|
activitysmith metrics update prod.status healthy
|
|
671
670
|
```
|
|
672
671
|
|
|
672
|
+
### Create a metric
|
|
673
|
+
|
|
674
|
+
Use `create` to set the label and how widgets show the value, such as currency, percent, or a unit. Omitted fields keep their current values, so you can call it every time your app starts.
|
|
675
|
+
|
|
676
|
+
```bash
|
|
677
|
+
activitysmith metrics create mrr \
|
|
678
|
+
--label MRR \
|
|
679
|
+
--format currency \
|
|
680
|
+
--currency-code USD
|
|
681
|
+
|
|
682
|
+
activitysmith metrics update mrr 12450
|
|
683
|
+
```
|
|
684
|
+
|
|
685
|
+
You can also create and edit metrics in the [web app](https://activitysmith.com/app/widgets).
|
|
686
|
+
|
|
687
|
+

|
|
688
|
+
|
|
673
689
|
## App Icon Badge
|
|
674
690
|
|
|
675
691
|

|
|
@@ -835,6 +851,22 @@ activitysmith activity stream nightly-backup \
|
|
|
835
851
|
activitysmith badge 3 --channels "sales,customer-success"
|
|
836
852
|
```
|
|
837
853
|
|
|
854
|
+
## Paired Devices
|
|
855
|
+
|
|
856
|
+
List the iPhones and iPads paired to your account. Active devices come first:
|
|
857
|
+
|
|
858
|
+
```bash
|
|
859
|
+
activitysmith devices list
|
|
860
|
+
```
|
|
861
|
+
|
|
862
|
+
If no device is paired, the command prints the App Store link. Install ActivitySmith on your iPhone, sign in with the same account, and allow notifications.
|
|
863
|
+
|
|
864
|
+
Add `--include-inactive` to also list devices that can no longer receive deliveries:
|
|
865
|
+
|
|
866
|
+
```bash
|
|
867
|
+
activitysmith devices list --include-inactive
|
|
868
|
+
```
|
|
869
|
+
|
|
838
870
|
## Output
|
|
839
871
|
|
|
840
872
|
Use `--json` for machine-readable output:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "activitysmith-cli",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.1",
|
|
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",
|
package/src/cli.js
CHANGED
|
@@ -391,7 +391,7 @@ const validateContentState = (contentState, mode) => {
|
|
|
391
391
|
const normalizedType =
|
|
392
392
|
typeof contentState.type === "string" ? contentState.type.trim() : undefined;
|
|
393
393
|
|
|
394
|
-
if (
|
|
394
|
+
if (typeof contentState.title !== "string") {
|
|
395
395
|
throw new Error("contentState.title is required");
|
|
396
396
|
}
|
|
397
397
|
|