I’m not sure if it helps with the licensing requirements, but when you run forge deploy with the --verbose flag, the Forge CLI outputs the path of a zip archive containing the bundled code:
[...]
ℹ Packaging app files
[...]
Archive created: /var/folders/cd/z8wyy2bn7tjgtyjc6lyzwft00000gn/T/tmp-42909-2QXQgIhTdIKh-.zip
[...]