Usage
Parameters
1-based notification index from list-notifications. Must be >= 1.Note: While
list-notifications returns 0-based indices, this command accepts 1-based indices for user convenience.Name of the action button to click. Must match one of the action names in the notification’s
actions array from list-notifications.Common action names:ReplyOpenSnoozeMark as ReadDismiss
Response
The name of the action that was clicked
Examples
Click Reply Action
Open Notification
Workflow
List notifications
Run Example output:
list-notifications to see notifications and their available actions:Note the index and action
Identify the notification index (add 1 for 1-based) and the action name you want to trigger.
Use Cases
Quick Reply to Messages
Quick Reply to Messages
Reply to Messages notifications directly from the CLI:
Open App from Notification
Open App from Notification
Open the app associated with a notification:This brings the app to the foreground and navigates to the relevant content.
Snooze Reminders
Snooze Reminders
Snooze Calendar or Reminders notifications:
Automated Notification Handling
Automated Notification Handling
Automatically respond to specific notifications:
Action Availability
Not all notifications have action buttons. Check theactions array in the notification object from list-notifications:
- Messages: Reply, Open
- Mail: Reply, Delete, Mark as Read
- Calendar: Snooze, Open
- Slack: Reply, Open, Mark as Read
- Reminders: Complete, Snooze
Error Handling
Common error codes:ELEMENT_NOT_FOUND: Index out of range or notification already dismissedACTION_NOT_SUPPORTED: Action name not found in notification’s actions arrayINVALID_ARGS: Index is 0 or negative, or action name is emptyACTION_FAILED: The action button exists but clicking it failed
Notes
- The command uses 1-based indexing for user convenience
- Action names are case-sensitive and must match exactly
- After clicking an action, the notification may be dismissed automatically (depends on the app)
- Some actions (like “Open”) will bring the source app to the foreground
- The action is performed via macOS accessibility APIs, so accessibility permission is required
Related Commands
- list-notifications - List notifications to see available actions
- dismiss-notification - Dismiss a notification without clicking an action
- wait - Wait for a new notification before acting on it