Add this to your .bash_profile or whatever you use.
# Running: gif demo.mov
# Outputs: demo.gif
gif() {
name=$(echo "$1" | cut -f 1 -d '.')
screengif -i "$1" -o "$name.gif" --fuzz 0
}
This allows you toget demo.gif by running:
$ gif demo.mov
Note: the --fuzz 0 option got me better quality for screencasts with gray background.
Make sure you install screengif first.