Recently I wrote a script in Swift, on macOS. It can be developed and run without Xcode, in plain vi if you so wish. It's pretty great, and I liked it a lot.
Yup, that was exactly my workflow as well! And for building CLIs it's quite nice. Once I started using AppKit though, it felt like I kept running into things that weren't quite finished.