It's really not that complicated. You described pretty much all the trouble in less than a paragraph. It sounded like 10 minutes of fiddling around.
For creating a cross platform library that just works it's pretty painless. Have you tried java/maven? Or webpack? Or god forbid cross platform C++?
Your problem seems to be focused on the fact that command line interfaces are not discoverable. This is true of all command line interfaces. Linux/Unix has many utilities that are quite foreign at first. But once you learn the interface (and in this case it is quite simple) you can accomplish things with quite a bit of efficiency.