'Adding swift packages /dependencies without Xcode

I am trying to add swift packages through the command line or any other way. Without using xcode UI.

I need this because we are using Unity and want to migrate from cocoapods to SPM. We need this done via CI systems. I saw that the changes are done inside the xcode project file structure itself -> project.pbxproj. But seems pain to understand and maintain.

Are there any command line tools ?

thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source