
Show HN: Notify – CLI to notify your phone - mashlol
https://mashlol.github.io/notify/
======
sourdesi
Really like the idea!

Im trying it out right now and the Android app told me to use an identifier
that starts with a '9'. I typed `notify -r <my_identifier>`. When I try
running `notify` however, it gives me this:

[notify] Encountered an error: ParseError { code: 141, message: 'Error 112:
Channel name must start with a letter: <my_identifier>' }

~~~
mashlol
Ah, this is interesting, didn't encounter this during testing. Working on a
fix, thanks for reporting!

------
peedy
Are these your keys?
[https://github.com/mashlol/notify/blob/master/node/notify.js](https://github.com/mashlol/notify/blob/master/node/notify.js)

~~~
mashlol
Yes they are the parse app keys, they are meant to be public.

------
brbsix
Just a heads up that that the app gives the following example:

    
    
      $ someLongRunningCommand || notify
    
      This will send a push to your phone when the command has completed, regardless of success or failure.
    

Obviously that will only notify upon command failure. It looks like the
webpage is accurate (uses a ;) so perhaps the app just hasn't been updated
yet.

------
aargh_aargh
For those like me who wonder how to use npm without being root, here's an
answer that worked for me on Debian:

[http://stackoverflow.com/a/21712034/323094](http://stackoverflow.com/a/21712034/323094)

~~~
brbsix
FYI you don't need root at all. Just download the node tarball and unpack it
somewhere in your user dir.

Then add the following to your .profile (or .bashrc or whatever you prefer):

    
    
      # add node.js bin to PATH
      npath=~/Applications/node-v4.2.1-linux-x64/bin
      if [ -d "$npath" ]; then
          PATH=$npath${PATH:+:$PATH}
      fi
    

Then add the following to your .manpath if you want access to node manpages:

    
    
      # node.js
      MANPATH_MAP    ~/Applications/node-v4.2.1-linux-x64/bin    ~/Applications/node-v4.2.1-linux-x64/share/man
      MANPATH_MAP    ~/Applications/node-v4.2.1-linux-x64/bin    ~/Applications/node-v4.2.1-linux-x64/lib/node_modules/npm/man
    

Then to install:

    
    
      npm install -g notify-cli
    

Obviously you may need to update the particulars.

------
SlashmanX
Great idea.

Is it possible to customize the notification text?

Small error: Rotating the phone while in the app changes the text to "Your
identifier is: Hello World!" and you have to completely quit the app to fix
it.

~~~
mashlol
Ah good find with the Android bug, I forgot Android re-draws everything on
rotates. As of 0.0.3 it is now possible to customize the text with -t.

~~~
brbsix
I also got the "Your identifier is: Hello World!" upon startup (while internet
was disabled).

------
distracted_boy
How does this work? Is the notifications sent via your server which finds the
correct device and pushes the message?

~~~
mashlol
When you download the app, it registers with Parse, which generates a
registration ID for your device. When you use the CLI, it goes to Parse with
the key you received from the app and queries for your installation, sending
the notification to that specific installation.

------
atmosx
What is the difference between this solution and Pushover?

Do I have to install an app on my mobile?

~~~
mashlol
Yes you have to install an app (soon to come is email fallback if you don't
have the app, and Chrome push notifications on Android, which don't require an
app downloaded).

While I hadn't heard of it until you mentioned it, the main difference between
this and Pushover seems to be that 1) Pushover seems to have more features and
available platforms, and 2) Pushover costs money while this is free &
opensource.

------
dvdplm
Lovely idea! Please post an update here when the iOS app is available! :)

~~~
astronautjones
Here's hoping it's compatible with older versions of iOS as well

------
shadowfax92
Love the idea! Nice tool missing in developers life :)

