Skip to content

Repository files navigation

Notification Center for Raycast

Interact with macOS Notification Center directly from Raycast using the notif CLI tool.

What is notfi / notif?

notfi usually refers to notif (Airbnb's open-source CLI):

  • It reads notifications from macOS Notification Center (notif list)
  • It performs notification actions (notif click, notif dismiss, notif expand, notif collapse)
  • It serves as the low-level execution layer for this Raycast extension

This project itself is a Raycast command interface and interaction layer. It does not directly manipulate Notification Center internals; all notification operations are delegated to the notif binary.

Install notif (required)

Choose one of the following installation methods:

# 1) Homebrew (recommended)
brew install notif

# 2) Verify installation
which notif
notif list

Or install from releases: https://github.com/airbnb/notif/releases

After installation:

  • Ensure notif is in your PATH, or
  • Set an absolute path in Raycast extension settings (notif Binary Path)

Project dependencies on underlying capabilities

This extension depends on the following foundational capabilities:

  • macOS Notification Center accessibility via notif CLI
  • Raycast runtime and API (@raycast/api) for command execution, list rendering, actions, and menu bar integration
  • Raycast extension utilities (@raycast/utils) for convenience helpers and runtime ergonomics

Without notif, the extension can load in Raycast but cannot read or operate notifications.

Features

  • πŸš€ Open Notifications: Auto-open latest notification or jump to actionable list view
  • πŸ–±οΈ Click Notifications: Open notifications with a single click
  • πŸ—‘οΈ Dismiss Notifications: Clear individual or grouped notifications
  • πŸ“¦ Group Management: Expand and collapse notification groups
  • πŸ”” Monitor Notifications (Menu Bar): Single menu bar monitor with optional keyword filtering and always-on new-notification alerts
  • βš™οΈ Configurable: Set custom paths and behavior preferences

Prerequisites

You need to install the notif CLI tool first:

# Using Homebrew
brew install notif

# Or download from releases
# https://github.com/airbnb/notif/releases

Make sure notif is in your PATH or configure the absolute path in Raycast settings.

Raycast side setup

After installing this extension in Raycast:

  1. Open Raycast Settings β†’ Extensions β†’ Notification Center
  2. Configure notif Binary Path (default notif)
  3. Optionally enable:
    • Auto Open Single Notification
    • Always Open Latest Notification
    • Keywords for Menu Bar Filtering
  4. Assign hotkeys for Open Notifications / Manage Notifications

Installation

From Raycast Store

Search for "Notification Center" in the Raycast Store and install it.

Manual Installation

  1. Clone this repository
  2. Install dependencies:
    npm install
  3. Build the extension:
    npm run build
  4. Import the extension into Raycast

Commands

Open Notifications

Runs a quick entry command:

  • If Always Open Latest Notification is enabled, it clicks the latest non-group notification directly
  • Else if Auto Open Single Notification is enabled and only one non-group notification exists, it clicks that notification
  • Otherwise, it opens the Manage Notifications command

Shortcut: Assign a hotkey in Raycast settings for quick access

Manage Notifications

Opens a detailed list view with the following actions:

  • Enter: Click / open notification (non-group items)
  • ⌘D: Dismiss notification
  • ⌘E: Expand group (group items)
  • ⌘L: Collapse group (group items)
  • ⌘R: Refresh list
  • ⌘C: Copy notification text

Monitor Notifications

Single monitoring command in menu bar with two modes:

  • Displays a menu bar icon and matched notification count
  • Filters notifications by configured keywords (case-insensitive)
  • New-notification behavior depends on whether keywords are configured:
    • No keywords: show an alert popup for the newest new notification (auto-click after 3s unless dismissed); if multiple arrive at once, it also shows a HUD summary to avoid Raycast execution timeouts
    • With keywords: only react to new notifications that match keywords
  • Transient monitor failures are ignored silently (for example execution timed out and temporary Notification Center UI lookup failures)
  • When keywords are configured, auto-open behavior follows existing preferences:
    • If Always Open Latest Notification is enabled, it auto-opens the newest matched notification
    • Else if Auto Open Single Notification is enabled and only one matched notification is new, it auto-opens it
  • Click menu bar icon to view and interact with matched notifications
  • Quick access to configure keywords

Note: The monitor only triggers actions for notifications that arrive after the monitor has captured an initial snapshot. Existing notifications won't trigger actions immediately.

Configuration

notif Binary Path

Default: notif (uses PATH)

Set the path to the notif binary. Options:

  • notif - Uses system PATH
  • /usr/local/bin/notif - Absolute path
  • ~/bin/notif - Home directory path

Auto Open Single Notification

When enabled, automatically opens the notification if only one exists in the notification center.

Keywords for Monitoring

Comma-separated list of keywords to filter notifications (case-insensitive). Examples:

  • urgent, important, error
  • meeting, calendar, reminder

Development

Setup

npm install
npm run dev

Debugging

View logs in real-time:

npm run logs

Or use Raycast's built-in developer console:

  1. Open Raycast
  2. Search for "Developer: Show Console"
  3. Select "Notification Center" extension

Testing

# Test notif command
npm run test:notif

# Build extension
npm run build

# Lint code
npm run lint

# Fix linting issues
npm run fix-lint

Troubleshooting

notif command not found

Make sure notif is installed and in your PATH:

which notif

If notif is not in PATH, set the absolute path in Raycast settings.

Permission Denied

Ensure notif has execute permissions:

chmod +x /path/to/notif

No Notifications Showing

  1. Check if notifications exist in Notification Center
  2. Verify notif works from terminal: notif list
  3. Check extension logs for errors

License

MIT

Credits

Built with Raycast API

Uses notif by Airbnb

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages