activitysmith
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseActivitySmith
ActivitySmith
Use this skill to send push notifications and drive Live Activity lifecycle commands.
使用此skill发送推送通知并执行Live Activity生命周期命令。
Workflow
工作流程
- Ensure is installed and
activitysmith-cliis inactivitysmith.PATH - Ensure is set, or create
ACTIVITYSMITH_API_KEYfromskills/activitysmith/.env..env.example - Run one of the scripts in .
scripts/ - For Live Activities, save the from
Activity IDand pass it tostart_activity.shandupdate_activity.sh.end_activity.sh
- 确保已安装,且
activitysmith-cli已添加至activitysmith环境变量中。PATH - 确保已设置,或从
ACTIVITYSMITH_API_KEY创建.env.example文件。skills/activitysmith/.env - 运行目录下的任一脚本。
scripts/ - 对于Live Activities,保存返回的
start_activity.sh,并将其传入Activity ID和update_activity.sh中。end_activity.sh
Auth
身份验证
ACTIVITYSMITH_API_KEYScripts load auth in this order:
- Existing shell environment
skills/activitysmith/.env
ACTIVITYSMITH_API_KEY脚本按以下顺序加载身份验证信息:
- 现有Shell环境变量
- 文件
skills/activitysmith/.env
Scripts
脚本说明
- : Send a push notification.
scripts/send_push.sh - : Start a Live Activity and return an activity ID.
scripts/start_activity.sh - : Update an existing Live Activity.
scripts/update_activity.sh - : End an existing Live Activity.
scripts/end_activity.sh
- :发送推送通知。
scripts/send_push.sh - :启动一个Live Activity并返回活动ID。
scripts/start_activity.sh - :更新现有Live Activity。
scripts/update_activity.sh - :结束现有Live Activity。
scripts/end_activity.sh
Quick Commands
快速命令
bash
./skills/activitysmith/scripts/send_push.sh -m "Build finished" -t "CI"bash
./skills/activitysmith/scripts/start_activity.sh \
--title "Deploy" \
--type "segmented_progress" \
--steps 4 \
--current 1bash
./skills/activitysmith/scripts/update_activity.sh \
--activity-id "<activity_id>" \
--title "Deploy" \
--current 2bash
./skills/activitysmith/scripts/end_activity.sh \
--activity-id "<activity_id>" \
--title "Deploy" \
--current 4 \
--auto-dismiss 2bash
./skills/activitysmith/scripts/send_push.sh -m "Build finished" -t "CI"bash
./skills/activitysmith/scripts/start_activity.sh \
--title "Deploy" \
--type "segmented_progress" \
--steps 4 \
--current 1bash
./skills/activitysmith/scripts/update_activity.sh \
--activity-id "<activity_id>" \
--title "Deploy" \
--current 2bash
./skills/activitysmith/scripts/end_activity.sh \
--activity-id "<activity_id>" \
--title "Deploy" \
--current 4 \
--auto-dismiss 2