You try to use a script or tool which requires permissions where OS X presents a popup for acceptance (for example an
You can use a workaround to allow the tool, without manual interaction by the user. For example, try using https://github.com/jacobsalmela/tccutil.
osascript to the allowed OS X Accessibility list, you can call tccutil from your script (don’t forget to include it in your repository or download on-the-fly):
sudo python tccutil.py -i /usr/bin/osascript
You can download the script from GitHub directly. For example: