Install Xcode CLT from the Terminal

The Command Line Developer Tools package required to run MacPorts can be installed on demand using:

xcode-select –install

The installed tools will be automatically updated using Software Update. Mac OS 10.9 is required for this feature.