The notify CLI is written with node, so you can install it with npm:
npm install -g notify-cli
Alternatively, you can download & use the shell script equivalent from here, with basic support for adding a single key and sending a notification to it.
You'll also need the app on your phone to actually receive the notifications.
Using notify is simple. When you download the app to your phone, it will give you a registration key. This key is how your phone is identified by notify. Before you can begin using notify, you should first register your key.
notify -r myKey
After registering, you can use notify as follows:
someLongRunningCommand ; notify
You will receive a push notification to your phone when the command has completed, regardless of whether or not it was successful.
You can also specify what the notification will say, like this:
notify --text "My message" notify -t "Some cool message"