A collection of handy command-line utilities for the iPhone and iPod touch geek. This page hosts basic information about the individual utilities and download links for the software. Please join my open discussion thread for the Erica Utilities or return to the main FTP site by clicking here.
I've merged the Erica Utilities and the iPhone Utilities. With 1.1.3, the iPhone and iTouch platforms are close enough that the software crosses lines. Most utilities like note support now work on both platforms.
Provides a simple way to look up contacts from the command line. The utility queries your address book database and searches for all matches, returning contact details.
Set, list, and manage your iPhone alarms with this handy utility. Usage details are in this post.
Alert is pretty much your one-utility source for all command-line alerts. It lets you customize text, buttons, and images and offers special features like timed alerts (no human intervention necessary) and progress indicators. Run at the command line for the full documentation and feature set. An early version of alert is documented here
Enter or leave airplane mode from the command line. A second argument always forces WiFi to on.
Notifies (via nikita) that new applications have arrived and loads them onto Springboard. No Springboard restart needed.
Like snapngo, autosnap grabs the contents of the screen and serves it via bonjour. Unlike snapngo, autosnap automatically names and serves files and can be triggered from your Mac using FileCatcher. Tap on the "File Throw Auto Snap" server and your iPhone snaps a picture and shares it to your Mac. The file appears on your desktop. NEW: Updated version does not interfere with ongoing music or audio playback.
Takes two arguments, the name of an application and a short string, e.g. "badge Stocks hi". This utility adds a badge with that text to that application's icon.
Command-line bonjour file sharing. Throw a file to another iPhone or iPod touch, where you catch it. Each takes one argument. Throw requires the file to send. Catch uses the path to save to, e.g. throw foo.amr and catch newsound.amr.
You supply a string and doAlert opens an alert window with that string.
doPrompt opens an alert window with a string you supply and prompts the user to enter a text reply. The utility prints the result to stdout. (For Greg Hartstein by request)
You supply a string and doQuery opens an alert window with that string asking "Yes" or "No". After running, you can get the result in $? (For Benanzo by request)
Takes one argument, the URL to open in Mobile Safari. This has not been tested with 113
Forces an iTunes sync
Copies all voicemail amr files into your ~/Library/Recordings folder. This allows you to play them back and email them using VoiceNotes. Updated for 1.1.3 and intended for use only on iPhones.
Scrapes the current ip-address used by your iPhone or iPod touch.
Searches the iTunes store from the command line.
Reboots the phone.
Lists, adds, and deletes notes from your iPhone Library/Notes/notes.db database.
Deprecated Voice Recorder. I put it here rather than in the Deprecated section because, well, it still works. Recordings get stored in ~/Media/VoiceRecordings using really bad file names. No longer part of the package. It's available here but it's no longer being maintained.
When run, determines whether the host is or is not an iPhone. If so, the environmental variable $? gets set to 1. If not, to 0. This lets you run an if statement in your shell script immediately after. This utility uses uname to determin the machine type.
Phonetime converts iPhone times into understandable dates, and will return the current time and the epoch time on request.
Snaps one picture (jpg) from the command line. Takes one argument, the picture path.
Play an audio or video file from the command line on either iPod touch or iPhone. You can play media from the iPhone or go offsite: e.g. playaudio 'http://www.archive.org/download/cliche_family/cliche_family_64kb.mp4'
Property List utility modeled on OS X's plutil with enhanced functionality.
Vibrates the iPhone for the number of seconds given in its argument. The minimum vibration time is 1.5 seconds. Only for use on the iPhone.
Command-line voice recorder. Takes one argument, the name of the file to record to. Records in amr format. Press return to end the recording. iPod touch owners will need to use an external Microphone.
Restart issues a launchctl command that restarts SpringBoard. Use this utility whenever you add or remove Applications to update the display and SpringBoard to recognize new items.
Restart2 is meant for 1.1.3 and higher. It provides a non-launchctl way to restart springboard and is suitable for use as user mobile.
Use sbar to set and remove status bar icons. Use without arguments at the command line to get help.
For iPhone or iPod touch with mail configured. SendFileByMail takes, at this time, one argument, a file to send by mail. It opens the mail program, creates a new message with that attachment.
Sometimes you just want to peek at a picture without having to bring it back to your development platform. showPic lets you do exactly that, with some crude resizing ability (double-tap is not supported yet but pinching is). Just give it one argument, the name of the picture to display.
Snap grabs the contents of the screen and saves it to a snapshot in png format. Snap takes one argument, the name of the file to snap to. NEW: Updated version does not interfere with ongoing audio/video playback.
Thoroughly updated with better fidelity, this utility snaps a picture of your screen and adds it to your Photos library on the iPhone and (possibly) the iPod touch--even though that doesn't have a camera. It's unclear whether the iPod touch will sync to its album.
Snaps images from your iPhone camera to an image sequence. Stores the results in /foodir, which you must create before running. You can then download the image sequence to your Mac and reconstruct it back to a video using QuickTime Pro.
Snapngo grabs the contents of the screen and then serves it via bonjour, using the file name you specify, e.g. snapngo fileshot will send fileshot.png to whatever device is listening for it. This is meant to be used with FileCatcher, so you can snap on your iPod touch or iPhone and the file instantly appears on your Mac Desktop.
Sound takes one argument (y or n) and enables or disables system sound.
Create a telephone-number webclip.
Takes two arguments, a number (in seconds) and a string. This displays the string as an alert for that number of seconds and then auto dismisses. (by request for Benanzo)
Very basic command-line app hiding toggle. It adds or removes application identifiers from the Special category.
Convert a file to JPEG. Meant for use with PNG. Be aware however, that the iPhone will read a png file that you just rename to jpg. This is meant more for files that must be in JPEG when sent back to your personal computer.
Create a url-based webclip.
Xwidg supports transferring your non-standard Applications into /var/mobile/Media/Applications. It links to them via the undocumented /Widgets folder. Xwidg creates or deletes the folder and restarts SpringBoard. This lets you easily hide all third party apps (good for Genius Bar visits) or link them back. Xwidg takes no arguments. It looks for /Widgets and remove the symbolic link if present or adds it when absent. There are three versions of xwidg: for 114, 113, and pre113. The one without an extension is for 114