Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Node.js module to output text in lots of ways
CoffeeScript JavaScript
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.

putt is a node.js module that lets you easily output text in lots of fun ways. It wraps a bunch of other libraries to make this as simple as possible.

var putt = require("putt");
putt().speak("This is spoken aloud by your computer");
putt().desktop_notify("This appears as a desktop notification");

Supported output formats:


First, install Node.JS and NPM. Then, cd into your project folder and run:

npm install putt

For speak to work on Linux, install Festival and see what voices you have available (e.g. voice_rab_diphone).

For desktop_notify to work, install:

  • Mac: growl, including the growlnotify extra
  • Linux: notify-send with sudo apt-get install libnotify-bin or equivalent


All output types take an options hash (optional), e.g.:

putt().speak("I am talking", {voice: "Bruce"});

All output types also have two optional callbacks that can be chained:

  • done() is called when the output finishes outputting
  • error(reason) is called when an error is encountered during output

For example:

putt().speak("I am talking").done(function() {
    console.log("Finished talking");
}).error(function(reason) {
    console.log("Something went wrong:", reason);

Note that you can chain these method calls in any order:

putt().done(function() {
    console.log("Finished talking");
}).speak("I am talking");


putt().speak("This is spoken");


  • voice the voice to use when speaking.

See say.js docs for a full list of voices

Desktop notification

putt().desktop_notify("This is a desktop notification");


  • title the title of the notification window
  • name the name of the application
  • priority (integer) the priority of the notification (default is 0)
  • sticky (boolean) if notification should fade away or not
  • image custom image to show along with notification

See node-growl docs for more details

POST request

putt().post({param1: "value1", param2: "value2"}, {url: ''});


  • url (required) the URL to POST to
  • headers a hash of HTTP headers to be sent

See restler docs for more details


By default, email assumes that the sender is a Gmail user.

    user: '',
    pass: 'sender_password'
}).email("Body of email", {to: '', subject: 'yo'});


  • to (required) the recipient email address
  • subject the subject for the email


  • user username (email address) used for authentication
  • pass password used for authentication
  • host the SMTP host
  • port (integer) the SMTP port
  • ssl (boolean) whether or not to use SSL

See nodemailer docs for more details


First, create a new Twitter application, and under the "Settings" tab, you will also want to give your app "Read and write" permissions so that we can write a tweet. Then, click the button at the bottom of the "Details" tab to generate an access token and secret.

Next, provide those keys and secrets to putt when you call it:

    consumer_key: "your consumer key",
    consumer_secret: "your consumer secret",
    access_token: "your access token",
    access_token_secret: "your access token secret"
}).tweet("This text will be tweeted by your account");
Something went wrong with that request. Please try again.