I just posted a patch to zip.c to the mailing list to implement a fossil zip command that understands a uuid (or prefix) or tag and creates a zip file that is identical to the one created by the web ui.

The existing fossil test-baseline-zip command produces archives that are very similar, but use a different name of the top level folder in the zip. And its undocumented.