Install, upgrade and switch Xcode versions and their simulator runtimes from the terminal, on your Mac and on self-hosted CI Macs.
Why it exists
I built xcodectl for myself. I used xcodes for years, until it stopped working for me. It does not support YubiKeys. Its sign-in broke each time Apple changed the login, it was awkward to use, and sometimes it failed for days before a fix came.
xcodectl has no Apple login code of its own to break. You sign in on Apple’s own web page, in a small window, with a two-factor code or a YubiKey. Everything else happens in the terminal, and it is fast.
I now use it every day, on my Mac and on my CI runner. It still surprises me how solid and helpful it is.
What it does
- Sign-in that keeps working
- On Apple's own page, with a two-factor code or a YubiKey.
- Release notes in the terminal
- In full, as Markdown or abridged. Ask an AI model about them, for example whether a bug is fixed.
- Fast downloads
- 16 parallel connections, resumable, unpacked with unxip.
- One command installs it all
- Xcode, its simulator runtimes and the Command Line Tools, ready to use.
- Upgrades in one command
- Each installed Xcode moves to the newest release of its major version.
- Built for CI and agents
- One pipe moves the session. JSON output for scripts.
The session is the secret
The Keychain keeps the session, never the password. That one choice also solves CI: a runner gets a signed-in session through a single pipe, with no Apple ID in an environment variable.
# on your Mac, into a self-hosted runner
xcodectl auth export | ssh runner xcodectl auth importCompared to xcodes
xcodectl | xcodes | |
|---|---|---|
| Sign-in | Apple’s own page in a window | Its own implementation of the login |
| Hardware keys | YubiKey and other FIDO2 keys | Not supported |
| Keychain holds | The session | Your Apple ID password |
| Upgrade in place | Yes, runtimes included | No |
| Intel Macs | No | Yes |
| GUI app | No | Xcodes.app |