Home

Awesome

NCutil

Notification Center command line utility - Add and remove apps, set alert styles. OS Mavericks and Yosemite. View changes via the GUI in real-time.

Short Demo Video

<a href="http://www.youtube.com/watch?feature=player_embedded&v=4mPsqD30eCY " target="_blank"><img src="http://img.youtube.com/vi/4mPsqD30eCY/0.jpg" alt="Modify Notification Center from the command line in OS X" width="600" height="400" border="0" /></a>

Add and remove apps from Notification Center

Adding and removing apps is perfect for deploying software silently or having it pre-configured so the user doesn't have to do anything.

Add apps

Remove apps

Get Current Settings

Running a command like this:

will return something like this:

Notification Center settings for Reminders.app:
    Reminders.app alert style:         Alerts
    Show notifications on lock screen: Yes
    Show message preview:              Always
    Show in Notification Center:       5 Recent Items
    Badge app icon:                    Yes
    Play sound for notifications:      Yes

Get Individual Settings

Get The Current Alert Settings

You can find out what the app's current alert setting is with the -g flag or --get-alert-style.

which will return a one line response: none, banners, or alerts

Get Other Settings

You can check if individual settings are on or off using some of the examples shown below, which will return a one line response.

NCutil.py --get-show-on-lock-screen com.apple.iCal

returns true or false

NCutil.py --get-badge-app-icon com.apple.iCal

returns true or false

NCutil.py --get-sound com.apple.iCal

returns true or false

NCutil.py --get-show-in-notification-center com.apple.iCal

returns a number: 0, 5, 10, or 20

Change Settings

Adjust Alert Duration (Alerts, Banners, or None)

Adjust Other Checkbox Settings

You can adjust any of the checkboxes in the GUI such as the badge icon, number of recent items, whether or not to show it on the lock screen, etc. Notifications that can be adjusted with NCutil.py

Don't show iCal Notifications on the lock screen

Disable the badge app icon for Message

Disable the sound for TextWrangler

Set the amount of recent Notifications to show to 20 for Dropbox

Multiple Bundle IDs

Most of the options like --insert, --remove, or --alert-style, allow you to add multiple bundle IDs to modify the same setting for multiple apps.

_SYSTEM_CENTER_ Notifications

Apple has a lot of different apps that show notifications, which do not show up in the GUI. You can remove all of these hidden Notification sources by using the -remove-system-center option but is not fully-supported as we don't know what they all do. If you decide to try it, this is the equivalent to setting each one individually to an alert style of none.

Remove _SYSTEM_CENTER_ At Your Own Risk

To add a little more detail to the command above, the _SYSTEM_CENTER_ entries are hidden from the GUI. Apple is obviously not expecting users to change any of those preferences (since there is no UI to do so) and so it would be prudent to not modify those. However, this utility lets you do that. You can do so at your own risk. Personally, I have had them turned off for a few weeks now without issue, but that doesn't mean it won't break later.

Additionally, if there were some sources you still wanted to have notification for, you can simply re-enable them on an individual basis.

Suppress Apple Update Notifications Like The "Free Yosemite Upgrade"

From what I can tell, these are the items you need to disable to stop the Yosemite upgrade Notification.

Hide the Free Yosemite Upgrade notification

Disabling the App Store Notifications may also help:

Known Issues

If Do Not Disturb is on and you run a command that modifies a setting, Do Not Disturb will be turned off unintentionally. This seems to only happen in Mavericks and is likely caused by the killall NotificiationCenter, which is what allows the commands to show up in real time.

Do Not Disturb bug

Changelog

2.4

2.3

2.2

2.1

2.0

1.0