Managing app permissions in Gatekeeper on macOS from the command line

I just recently updated my work laptop to Catalina, I’m running into many of my command line tools being banned from running due to Gatekeeper. You can fix this by running the command by right clicking in Finder and choosing “open” explicitly. That works fine for full apps, but it is a bit annoying for command line apps. For command line apps you can use the spctl tool.

  • spctl -a <path to the executable> will tell you if it is rejected or not
  • spctl --add --label <app label> <path to the executable> will allow the app to be run. Adding a label lets you enable or disable all apps under that same label

I tried looking at what spctl --list showed, but the output wasn’t readable.

Found the info from