Setting Apple wireless from Terminal

Recently I had the need to set my Macbook's wifi from terminal, hidden away in the private frameworks is this command:

/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport

After running --help on it, you can easily tell what you need to set the airport on your mac.