There might be another way, but this is how I did it. Within OS X Utilities, choose Reinstall OS X. Prepare a clean external drive (at least 10 GB of storage). The following method allows you to download Mac OS X Lion, Mountain Lion, and Mavericks. Once downloaded, install it as any other .dmg package. Install older OS X onto an external drive.Press the link on the right side and wait for download to complete.Search for the command line package you want to download (I'm going to use the latest stable Command Line tools for Xcode 10 and macOS Mojave).Sign in with your Apple ID if you need to.It is a small package of ~183Mb which I think it's enough to be downloaded via your browser. This just happened to me and I'm writing this as a note-to-self but also to share this with others who might be facing a similar situation. xip file while using a browser, regardless of which one it is, can be a pain when your connection is not as stable and fast as others' and when the download can be interrupted at any time and you're most likely going to have to restart the whole download. Downloading Xcode from the App Store, or even the.