gifsicle

Create, edit, and optimize GIF images and animations from the command line.

brewmacoslinux
Try with needOr install directly
Source

About

GIF image/animation creator/editor

Commands

gifsicle

Examples

make gif smaller file size$ gifsicle --batch --optimize=3 input.gif
convert image sequence to animated gif$ gifsicle --delay=10 *.png > animation.gif
extract single frame from gif$ gifsicle input.gif '#0' > frame.gif
combine multiple gifs into one$ gifsicle animation1.gif animation2.gif > combined.gif
reduce gif color palette to save space$ gifsicle --colors=128 --batch input.gif