I think what you are looking for is the hubspot-cli. Follow the instructions for "Install", "Upgrade, "init" and then "upload" or "watch. An example of this can be found here. Let me know if this helps! If you're having trouble setting up your hubspot-cli, feel free to reach out!
I actually meant the same kind of modules, respectively almost any kind of files you want to upload to you design tools. You can just navigate to your project-folder or the folder where your module is stored, open a terminal and use the CLI to upload your files. If your custom module is structured like the one in the second screenshot https://developers.hubspot.com/docs/cms/building-blocks/modules/files, it will appear as a module in the design manager.
Oh interesting, thanks! The CLI solution unfortunately wouldn't work for our use case.
We namely want to be able to programmatically upload custom modules using the HubSpot API to the accounts of our users that use our HubSpot integration (it's available on the HubSpot app marketplace). Do you know if there is a similar solution available for use of the HubSpot API?