Take a Photo with FaceTime Camera After a Task Finishes in OS X Command Line

Jan 31, 2013 - 2 Comments

If you’ve ever wanted to document your reaction to an event, task, or specific command execution, now is your chance to get started. With the help of a fun little app called ImageSnap, you can snap pictures with the FaceTime or iSight cameras from the command line. That can be good enough on it’s own for some uses, but it’s much more entertaining when you tie it to the completion of another command, thereby snapping the reaction to whatever is going on.

Installing ImageSnap is easy:

  • Download Imagesnap and open the tarball
  • tar -xvf imagesnap.tgz

  • Next, cd to the new directory, then copy the imagesnap executable to /usr/local/bin/ (or elsewhere if you prefer)
  • sudo cp imagesnap /usr/local/bin/

  • Refresh or load a new shell for imagesnap to be usable

You can do a quick test by running “imagesnap”, it’s fairly fast acting and you’ll notice the iSight/FaceTime camera light blinks for a moment as the picture is taken. The resulting picture defaults to be named snapshot.jpg.

Now for the fun part, which is attaching imagesnap to the completion of another task, here are a few examples:

Grab your reaction to uptime and load averages:

uptime && imagesnap

Capture the unique look of optimistic worry after an uncertain commit:

git commit -a -m 'No idea what I'm doing' && imagesnap

If you want to actually see your reaction, attach the open command to the end as well:

rm donotdelete.txt && imagesnap && open snapshot.jpg

The default file name is always snapshot.jpg unless it is changed, and the output path is always the present working directory unless it has been specified otherwise.

This can be used in similar ways to Terminal Notifier, except that it’s not actually notifying you of anything and instead it’s documenting your response to events, which can be absolutely hilarious. Have fun!

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:

Related articles:

Posted by: William Pearson in Command Line, Fun, Mac OS X, Tips & Tricks

2 Comments

» Comments RSS Feed

  1. Don says:

    There’s also a recipe for imagesnap in brew so if you use it to install common apps you can just do ‘brew install imagesnap’

  2. the grammar police says:

    it’s = it is.
    its = the possessive form of “it.”

Leave a Reply

 

Shop for Apple & Mac Deals on Amazon.com

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates