XCode 14 (and Command Line Tools) on macOS Ventura

This is more as a reminder to myself for the next beta I am on.

After installing macOS Ventura Xcode stopped working. Not that I use it, but Homebrew wants it. It complains thus:

And also:

I had Xcode 13.4.1 installed from the App Store. It didn’t show any updates there, and if I try to open Xcode from the App Store it refuses to open and gives some error message about me having XCode 13.4.1 and I should get the latest version XCode 13.4.1 instead (clearly a bug in the messaging).

Not a problem, I’ve been down this path before. Simply delete the existing Xcode and download the latest from Apple. This downloads a large zip file from which I can extract Xcode-beta. So far so good, this even quiets the first Homebrew warning.

How do I get the Command Line Tools though? In the past I’ve downloaded that from the same website, but I couldn’t find anything there. Another command I have tried is: xcode-select --install but that tried to install and threw an error.

Not sure what else to do, and remembering that in the past I’ve downloaded the Command Line Tools from Xcode itself I started going through the settings page. Finally I came across this:

Where it now shows the Command Line Tools was previously empty. I clicked the dropdown menu, selected what you see there, and now Homebrew is happy.

Update: Thanks to Abdallah Abedraba for pointing out that you can also get the command line tools from https://developer.apple.com/download/all/. I had to do this for subsequent Ventura updates as the dropdown above didn’t give any newer versions.