Automating installation of a service

I have a script saved as an application. I used Automater to create a Service that runs the script/app when clicked from the context menu. That is saved as a .workflow which another person could fairly easily add to their own computer.

However, that’s just one part of a larger app and I’m trying to simplify the installation. I want everything to install from the terminal in a curl bash.

I want to avoid doing any GUI automation here and the best solution would be one in the terminal / using a little applescript.

Has anyone run into this problem and has a solution? Or will this not work because Mac is locked down and this is a basic security measure?