This is a really cool tip that I came across that allows you to perform OSX Spotlight search from the Mac Terminal. Add following to your .bashrc or .zshrc on the Mac to do Spotlight-indexed searches from the command line.

function spotlight() {
 		mdfind "kMDItemDisplayName == '$@'wc";
}

###Example $> spotlight main.py