When you create a Command Line Tool project in Xcode you get this, in main.m:
#import
int main(int argc, const char * argv[])
{
In Xcode 9 you can try the following (works for me in June 2018):
${BUILT_PRODUCTS_DIR}/${FULL_PRODUCT_NAME}
Normally Xcode will open terminal for you. If not, you may also turn off any debug related fields in the 'Info' tab. Hope this helps!
Full tutorial here: https://www.raywenderlich.com/163134/command-line-programs-macos-tutorial-2