
Node-iMessage – Query iMessage from terminal and Node.js - nicolagreco
https://github.com/nicola/node-imessage
======
RoseO
I wrote a little bash script to allow for the sending of iMessages and made a
little API in Node so I could send service status messages across all my
devices easily.

It's probably not possible to do this in pure Node but if it's of interest
here is the gist:
[https://gist.github.com/roldershaw/7311547](https://gist.github.com/roldershaw/7311547)

Now I can see iMessage chatbots being made :P

~~~
aktau
Cool, I have something similar cobbled together:
[http://www.aktau.be/2014/02/12/send-imessages-via-the-
comman...](http://www.aktau.be/2014/02/12/send-imessages-via-the-commandline-
on-osx-even-to-yourself/)

The gist version should even be able to handle input from stdin:
[https://gist.github.com/aktau/8958054](https://gist.github.com/aktau/8958054)

Like this: ./imessage <number> < notes.txt

I use it quite often :). The most difficult thing to me was getting it to work
even when Messages.app wasn't started. Applescript is quite frustrating for
someone who's never dealt with it before. This was on Mavericks though, not
sure if that's still a problem on Yosemite. Does your version have problems
with that?

~~~
RoseO
That's pretty cool, I never bothered handling actually starting the Messages
app because I was just running it in a VM and assumed it would always work on
startup.

I don't use this anymore because I've ditched my iPhone.

------
nicolagreco
Thanks everyone for the support. Not sure about `innovation`, but hope this
abstracts iMessage nicely for developers that want to focus on the main
product ;) or want to do quick and dirty little hacks, My 2c.

------
filipedeschamps
Genuine question: I'm seeing a lot of innovation coming from Node.js projects,
some of them useful, some of them not, but even though when not, they're
really creative.

I'm new to programing and I'm wondering if this happened in the past for other
technologies when they were released. Did they reached the same spectrum?

Best regards.

~~~
matthewmacleod
I'm curious what you mean by that. This is basically a wrapper around the
iMessage SQLite database – it could equally well have been implemented in
Ruby, or Python, or Go. Projects like this always seem to be implemented in
whatever environment the developer wants to use, which is great, but not
really relevant.

I don't see any particularly interesting innovation from Node.js projects when
compared with any other similar community.

~~~
jekrb
I know what you mean when something could have been implemented in X, Y, or Z
language, but I too, have noticed some really interesting projects in Node.js.

One of my favorites is torrent-mount. It allows me to use virtual machines
directly from a torrent stream, rather than first downloading the entire vm.

[https://github.com/mafintosh/torrent-
mount](https://github.com/mafintosh/torrent-mount)

~~~
drdaeman
JavaScript happens to be hip-of-the-day language.

For example, torrent-mount's idea isn't something novel. It was voiced[1] and
implemented[2][3] a number of times before, and the links are what I got just
by a single Google query. It's just that Node is a trending platform today
(although some may say it's popularity peak had passed already), so the
surrounding chatter's more active and thus you're likely to find out about
those.

Or, possibly, there's even some bias like when you're looking for interesting
projects on resources where JS-favoring people gather.

[1] [http://permalink.gmane.org/gmane.comp.file-
systems.fuse.deve...](http://permalink.gmane.org/gmane.comp.file-
systems.fuse.devel/1666) [2]
[https://github.com/rkfg/BTFS](https://github.com/rkfg/BTFS) [3]
[http://btslave.sourceforge.net/](http://btslave.sourceforge.net/)

------
BaconJuice
how does this work? How does it get the iMessage data from let say an iPhone?
Or is this for Mac users only?

~~~
tlack
Looks like iMessage for Mac stores the messages it receives in an SQLite
database. This app simply reads and queries that database. See here:
[https://github.com/nicola/node-
imessage/blob/master/index.js...](https://github.com/nicola/node-
imessage/blob/master/index.js#L23)

------
bkurtz13
Shouldn't be asking people to upvote in the README.

~~~
nicolagreco
You have a good point, updated.

