Install phpcs with homebrew:
brew install php-code-sniffer
cd /usr/local/lib
(or wherever you want to the code sniffer rules to live)
Clone the WP rules:
git clone -b master https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git wpcs