Use the ably push command group to manage push notifications. These commands enable you to publish notifications, manage channel subscriptions, configure push services, and manage device registrations.
Publish notifications
Use the following commands to deliver push notifications to devices, clients, or channels without requiring an active connection:
| Command | Description |
|---|---|
ably push publish | Publish a push notification to a device, client, or channel. |
ably push batch-publish | Publish push notifications to multiple recipients in a batch. |
Manage push channels
Use the following commands to manage push notification channel subscriptions. Channel-based push uses a Pub/Sub model to broadcast notifications to all subscribed devices on a channel:
| Command | Description |
|---|---|
ably push channels list | List push channel subscriptions. |
ably push channels list-channels | List channels with push subscriptions. |
ably push channels save | Subscribe a device or client to push notifications on a channel. |
ably push channels remove | Remove a push channel subscription. |
ably push channels remove-where | Remove push channel subscriptions matching filter criteria. |
Manage push configuration
Use the following commands to configure push notification services for your app. These commands manage APNs and FCM credentials:
| Command | Description |
|---|---|
ably push config show | Show push notification configuration for an app. |
ably push config set-apns | Configure APNs push notifications for an app. |
ably push config set-fcm | Configure FCM push notifications for an app. |
ably push config clear-apns | Clear APNs push notification configuration for an app. |
ably push config clear-fcm | Clear FCM push notification configuration for an app. |
Manage device registrations
Use the following commands to manage push notification device registrations. Device registrations track which devices are registered to receive push notifications:
| Command | Description |
|---|---|
ably push devices list | List push device registrations. |
ably push devices get | Get details of a push device registration. |
ably push devices save | Register or update a push device. |
ably push devices remove | Remove a push device registration. |
ably push devices remove-where | Remove push device registrations matching filter criteria. |
See also
- CLI reference — Full list of available commands.