Create AirPort network from the command line?
After some hours of digging through the internet, it seems that the only way to put an airport in HostAP ("software base station") mode in OS X 10.8 Mountain Lion is to programatically call a the internal, undocumented, startHostAPModeWithSSID method.

I've updated the one example I could find online, and it does seem to work, with the one caveat that only WEP, not WPA, can be used: https://gist.github.com/4418079