On Linux command line, you just feed the password to it:
echo "password" | cracklib-check
brew install cracklib cracklib-words echo "lol" | cracklib-check