I know I can take a selfie with the built-in camera via the Photo Booth app. However, is there a way capture an image via command line, in sort of lolcommits style?

  • 1
    I thought about "taking a selfie while running" and I pictured all sort of horrible accidents…
    – o0'.
    May 22, 2015 at 15:11

1 Answer 1


The easiest way to do this is a program called "ImageSnap". You can take iSight photo's by typing the command imagesnap into terminal.

All commands:

 USAGE: imagesnap [options] [filename]
Version: 0.2.5
Captures an image from a video device and saves it in a file.
If no device is specified, the system default will be used.
If no filename is specfied, snapshot.jpg will be used.
Supported image types: JPEG, TIFF, PNG, GIF, BMP
  -h          This help message
  -v          Verbose mode
  -l          List available video devices
  -t x.xx     Take a picture every x.xx seconds
  -q          Quiet mode. Do not output any text
  -w x.xx     Warmup. Delay snapshot x.xx seconds after turning on camera
  -d device   Use named video device

Just incorporate imagesnap commands into a cron job or workflow of your command. ImageSnap is also available thru homebrew:

brew install imagesnap 
  • It seems it needs full installation of Xcode :-o Jun 3, 2015 at 12:27

Not the answer you're looking for? Browse other questions tagged .