Automatic desktop notifications for Grunt errors and warnings using Growl for OS X or Windows, Mountain Lion and Mavericks Notification Center, and Notify-Send.


Automatic desktop notifications for Grunt errors and warnings using Growl for OS X or Windows, Mountain Lion and Mavericks Notification Center, and Notify-Send.

OS XOS X Notification Center
OS XGrowl for Mac
Windows 8Windows 8 notifications
WindowsGrowl for Windows

This plugin recommends Grunt 0.4.1 or newer.

npm install grunt-notify --save-dev

Once that's done, add this line to your project's Gruntfile.js:


That's all you need for automatic notifications.

If you want change the automatic messaging configure a task called notify_hooks.

  // This is optional! 
  notify_hooks: {
    options: {
      enabled: true,
      max_jshint_notifications: 5, // maximum number of notifications from jshint output 
      title: "Project Name", // defaults to the name in package.json, or will use project directory's name 
      success: false, // whether successful grunt executions should be notified automatically 
      duration: 3 // the duration of notification in seconds, for `notify-send only 
// Load the task 
// This is required if you use any options.'notify_hooks');

Sometimes you want to show messages like "Uglify complete" or "Project Deployed" - that's easy to do too.

Custom Message - Grunt
Custom Message - Notification Center
Custom Message - Notify-Send
  notify: {
    task_name: {
      options: {
        // Task-specific options go here. 
    watch: {
      options: {
        title: 'Task Complete',  // optional 
        message: 'SASS and Uglify finished running', //required 
    server: {
      options: {
        message: 'Server is ready!'
// simplified example 
grunt.registerTask('server', [
  • title optional Notification title
  • message required Notification message

Run grunt to lint and run the tests.

Support Included.

If you are using OS X 10.8 Mountain Lion or newer a notification system is built in, but Apple does not provide a notification API that Node can access. Only code written in Objective C and signed in XCode can access it. This is not very friendly for Node users so we are using the tiny signed MIT-licensed native application Terminal Notifier from Eloy Durán. I've changed the default icon which is owned by Apple to the Grunt logo.

Requires growlnotify for OS X.

Install growlnotify from the Growl Downloads Page. This will install in /usr/local/bin/growlnotify.

Included with Snarl.

If you have downloaded and installed Snarl from Snarl's web site you'll have the commandline tool heysnarl as well.

Requires growlnotify for Windows.

Install growlnotify from the growlnotify Page.

Nothing to install.

Create a pull request!

Nothing to install.

I created an Ubuntu virtual machine and it had notify-send in the path.

I don't use Linux frequently so I don't know if this utility is available for other distros.

notify-send man page.

notify-send has an addition duration option which takes a number seconds. The default is 3 seconds.

Duration doesn't work natively on some versions of Ubuntu.

Here is a fix:

Not supported yet.

Chrome has a notification system but I'm not sure if it's possible to use from a command-line Node app. Somebody could probably create a Chrome Plugin helper for this.

Run grunt -v (for verbose mode) to show grunt-notify debug messages. It will tell you what notification system it thinks it can use. Create an issue and I'll look into it asap.

About the Author

Hi! Thanks for checking grunt-notify! My name is Dylan Greene. When not overwhelmed with my two young kids I enjoy contributing to the open source community. I'm also a tech lead at Opower.

Here's some of my other Node projects:

| Name | Description | npm Downloads | |---|---|--:|--:| | grunt‑prompt | Interactive prompt for your Grunt config using console checkboxes, text input with filtering, password fields. | | | shortid | Amazingly short non-sequential url-friendly unique id generator. | | | npm‑check | Check for outdated, incorrect, and unused dependencies. | | | rss | RSS feed generator. Add RSS feeds to any project. Supports enclosures and GeoRSS. | | | xml | Fast and simple xml generator. Supports attributes, CDATA, etc. Includes tests and examples. | | | changelog | Command line tool (and Node module) that generates a changelog in color output, markdown, or json for modules in's registry as well as any public repo. | | | grunt‑attention | Display attention-grabbing messages in the terminal | | | observatory | Beautiful UI for showing tasks running on the command line. | | | anthology | Module information and stats for any @npmjs user | | | grunt‑cat | Echo a file to the terminal. Works with text, figlets, ascii art, and full-color ansi. | |

This list was generated using anthology.

Copyright (c) 2014 Dylan Greene, contributors.

Released under the MIT license.

Screenshots are CC BY-SA (Attribution-ShareAlike).

Generated using grunt-readme with grunt-templates-dylang on Friday, November 7, 2014.