7 ms·
Show HN: I made a command-line iMessage interface
- adieth 12y agoIf it could be ingrated with [WeeChat] [1], it could be a way to provide iMessage support as a [web browser chat client] [2] and to [Android devices] [3]. [1]: https://weechat.org/ https://weechat.org/ [2]: https://github.com/glowing-bear/glowing-bear https://github.com/glowing-bear/glowing-bear [3]: https://github.com/ubergeek42/weechat-android https://github.com/ubergeek42/weechat-android
- LukeB_UK 12y agoFrom reading the readme, it seems it only works on a Mac and you have to have messages.app running and logged in.
- dewey 12y agoIt's "just" using AppleScript for some GUI scripting, it's still using the Messages.app. Still a pretty cool project.
- camhenlin 12y agoHi, op here, I also made this last summer for purposes of imessaging on a windows phone: https://github.com/CamHenlin/imessageservice https://github.com/CamHenlin/imessageservice unfortunately integration with other services is pretty difficult because everything requires routing messages through the OS X messages client
- blogle 12y agoThis is amazing, I have been wanting something like this for some time now. Hopefully the protocol can be demystified such that this is less clumsy.
- gargarplex 12y agoThis has the potential to be some day disruptive to Twilio, Plivo, etc.
- striking 12y agoPlease note that this isn't actually using the iMessage protocol, this just uses AppleScript to fire messages via Messages.app. However, it's nice to finally be able to iMessage over SSH. :)
- camhenlin 12y agoThat's correct. In the future, if time permits, I would like to figure out how to use private APIs within OS X or the Messages.app libraries to send messages without the AppleScript files. Unfortunately that's non-trivial and takes some serious poking around. Right now it's a useful solution for me over ssh so I wanted to share it with the community since I thought others might find that ability useful as well
- zer0defex 12y agoAgreed! I'm definitely going to lift some of this code for some Alfred workflows too.
- camhenlin 12y agoPlease post it, I'd love to see what you come up with!
- rian 12y agoBitlbee!!
- alexose 12y agoCool project! Though, the OSX requirement makes its utility pretty limited. Could someone host iMessage as a service without being sued into oblivion?
- dewey 12y agoThe protocol isn't open source. It's a cli layer over the messages app so at this point there's no way to "host" it somewhere.
- voxic11 12y agoyou could host it by using a ton of macs :P
- RoseO 12y agoI've previously ran OSX in a VM to send automated alerts over iMessage. It worked rather well.
- camhenlin 12y agoI've found during my own research that running an OS X VM sending out iMessages for too long will eventually get itself and its host machine blacklisted from iCloud services for a few days. Not sure how they detect the host but I can cause it consistently. I think the VM is blacklisted by its bad SN
- throwaway150207 12y agoBlacklisting/intentional degradation happens with volume sending on a real mac mini too.
- camhenlin 12y agoDo you have any documentation of precisely when service starts being cut off?
- LargeCompanies 12y agoANyone know of way or an app to search your iMessage threads?
- xuki 12y agohttps://flexibits.com/chatology https://flexibits.com/chatology This looks solid
- spdustin 12y agoSpotlight. Alfred. Connect directly to chat.db. Any of those sound good? :)
- dacort 12y agoDifferent use case (SMS stats), but you can see an example of querying the local iMessage DB here: https://github.com/mroth/grayratio https://github.com/mroth/grayratio
- justinmk 12y agoAnyone know of a CLI client for Microsoft lync?
- Macuyiko 12y agoYup. Pidgin + SIPE http://sourceforge.net/projects/sipe/ http://sourceforge.net/projects/sipe/ + Finch http://linuxers.org/article/finch-command-line-alternative-pidgin http://linuxers.org/article/finch-command-line-alternative-p...
- jmduke 12y ago## Why did you make this? Why not? Regardless of the actual repository (though don't get me wrong, this is still super cool and I like seeing AppleScript in action since I feel like it's criminally underused), this kind of thing in a Readme always brings a grin to my face. Tinkering for tinkering's sake is the best.
- extempore 12y ago"Criminal" is definitely the word to use when it comes to applescript, though maybe not in quite that way.
- pwenzel 12y ago"Why not?" is fine, but my question is: What are you going to use it for?
- ZoF 12y agoI'd say using iMessage over ssh. What makes your question more valid than 'why make this'?
- justinmayer 12y agoFor those of you who, like me, might want to use this on older hardware, I got an error on launch on Mac OS X 10.8.5 Mountain Lion: https://github.com/CamHenlin/imessageclient/issues/2 https://github.com/CamHenlin/imessageclient/issues/2 Just thought I'd mention it here in case others are thinking of trying this out on Mountain Lion. Edit: CamHenlin has already committed a fix for this problem. Nice work!
- camhenlin 12y agoThanks, hoping that I can help you out!
- lindbergh 12y agoReally cool. Now I must figure a way to add this as an emacs mode. Good job!
- camhenlin 12y agoHow about a Sublime plugin :)
- djabatt 12y agoYeah why not?
- vhost- 12y agomacmini-server-in-a-closet = iMessage on linux over ssh. I should label it "iMessage server".
- akrymski 12y agoAwesome! Is there a way to create a new conversation?
- asdf0 12y agoive played with this similar before capturing incoming. as well you can write events for messsages in javascript just now with yosemite the same as you would applescript. you can use osacompile and osascript command tools to run and compile javascript/applescript. the same things applescript can do. i find easier to write. doesnt have to be complicated to run for personal use inside ssh.
- rjuyal 12y agoDid you tried capturing incoming messages? If yes, please redirect me how to do so.
- BillinghamJ 12y agoHave you looked into using MessagesKit.framework? (In /System/Library/PrivateFrameworks) If it's written in Obj-C, you can extract fully usable headers from it. If C++/C/etc., it will be difficult (but not impossible) to understand it. After extracting the headers from that, you may well be able to use it instead of AppleScript.
- camhenlin 12y agoThanks for the pointer, exactly the type of response I was hoping to elicit
- omaranto 12y agoI know I'll sound like I am an old man yelling "Get off my lawn!", but as far as I can tell this is a text-mode application but it is not a commandline interface. Note that it's only the HN submission title that gets it wrong, the Readme.md on GitHub correctly calls it "terminal-based" rather than CLI. An actual commandline interface would also be cool, to be able to easily send iMessages from shell scripts, for example.
- camhenlin 12y agoSure, you're right, I just got excited typing out the title :) You could actually use the AppleScript files in the repo to send messages directly without the use of the rest of the code. Usage would be like this: osascript sendmessage_single.AppleScript PHONE_NUMBER_OR_ICLOUD_EMAIL "my message text" false false