imagesnap

Capture still images from your Mac's camera or video source

brewmacoslinux
Try with needOr install directly
Source

About

Tool to capture still images from an iSight or other video source

Commands

imagesnap

Examples

take a photo with the default camera$ imagesnap photo.jpg
list all available cameras on your mac$ imagesnap -l
capture image from a specific camera device$ imagesnap -d "Facetime HD Camera" snapshot.png
take multiple photos with delay between captures$ imagesnap -w 2 frame1.jpg && imagesnap -w 2 frame2.jpg
save camera image as TIFF instead of JPEG$ imagesnap -f tiff image.tiff