Have you folks looked into PlatformIO? There’s an IDE variant, which is probably what most people use, but the link above is for just the CLI core. In my opinion, PIO is crazy effective in combination with vim (my favourite), supports a ridiculous number of platforms, auto-installs and -updates all their toolchains, takes care of all libraries and dependencies, and supports TDD and CI. I’ve been using it for years now, mostly STM32 and ESP32. I’m still bumping into features which were designed “just right”.
I’m not a fanboy, nor do I have a stake in this open source project. I just use it. Daily.