This all can be done using Arduino CLI. This toolchain is fully based upon this really great tool: There are no tricks, no hacks, no manual parsing of obscure text files at undocumented locations.
Below is a short description on how to setup and use the RPi Pico with the Arduino IDE (Section 1) , the RPi Pico micropython toolchain (Section 2), and using the C-based SDK with both powershell and ...