What is the relationship between Xcode and Xcode command line tools
You can see it as:
- The command line tools are the basic foundation. Many basic tools are needed to compile your Swift/Objective-C code.
- XCode is the IDE which brings a few additional packages with it.
So the command line tools get sure that the basic UNIX tools are covered (as GCC for example) to be able to compile and link code.
Xcode then is using those basic tools.
From the documents:
What is the Command Line Tools Package?
The Command Line Tools Package is a small self-contained package available for download separately from Xcode and that allows you to do command line development in OS X. It consists of two components: OS X SDK and command-line tools such as Clang, which are installed in /usr/bin.