Unfortunately, it seems the command line doesn't work any more.
The only way I've been able to get this work is by manually installing: https://developer.apple.com/download/all/?q=xcode
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: