There’s an example import script for resources and products here:
For MoreGallery there’s a similar example here, which takes care off adding images in a specific directory to a pre-made gallery resource:
From what you describe, you’ll want to combine the two. First create resources of type mgResource based on the Commerce example, add the product variations into the List TV, and then include the MoreGallery example to also add images to it.
I’ll follow your repository with great interest and if you have specific questions about the Commerce data model or anything like that, just ask