A few days ago I discovered an old Unix shell script for basic command line control of iTunes via AppleScript. It was written in 2001 but, amazingly, it still works with the current iTunes version. The original script can be found here.
Trying to avoid more useful work, I hacked away on this script and produced something which could be marginally useful. I have a Mac Mini server providing N.MUSIC through the BM-Link software, and navigating this music collection with a Beo4 in a link room can be a frustrating experience. Now I imagined myself logging in to the Mac Mini with ssh, controlling iTunes from my iPhone instead (using the excellent Prompt app).
Oh, well – and then yesterday I suddenly discovered Apple's free Remote app. So the need for a complicated CLI interface isn't really there anymore. However, my little script can do at least one thing that the Remote app can't do on an iPhone: display lyrics for a track. I can imagine a few esoteric uses for it as well (like when you are sitting in front of your vintage Sun-3/60 workstation in a link room and don't have an iPhone nearby).
Here are a couple of screenshots from my iPhone to give you the idea. First, the options:
And then this is what it looks like when queried for the current N.MUSIC status:
I tried to emulate the N.MUSIC display on my BeoCenter 2, with the addition of color hints for Beo4 operation of artist, genre, album and playlist selection.
If anyone would like to try it out, the script can be downloaded at http://idisk.mac.com/psand-Public/itunes-cli.zip. It's a standard Unix Bourne shell script, using osascript to talk to iTunes with AppleScript commands and some inelegant AWK stuff thrown in to handle output formatting. Place it in /usr/local/bin (or anywhere else), make it executable (chmod 755) and run it from the terminal.