See the API doc of Google's diff-match-patch module.
pip install googdiff
# Usage info
googdiff --help
# Show diffs in console mode:
googdiff file1 file2
# or:
googdiff -c file1 file2
# Show diffs in web browser:
googdiff -b file1 file2
# in text mode:
git difftool -y --extcmd=googdiff
# or, in browser:
git difftool -y --extcmd='googdiff -b'