The cli handling belongs in image/index.mjs, but everything that isn't cli handling belongs in a middleware class kinda thing. In this case, we've created a RenderManager class.