tccutil.py: Command Line Utility for Modifying the Accessibility Database in OS X

I love working in the command line, but one part of OS X that thus far has been difficult to script is modifying the accessibility database in OS X 10.9.

There are many examples out there of people needing to do something like this:
- https://jamfnation.jamfsoftware.com/discussion.html?id=11123
- http://work.chrisdietrich.de/enabling-accessibility-for-adpassmon-in-mavericks/
- http://stackoverflow.com/questions/17693408/enable-access-for-assistive-devices-programmatically-on-10-9
- http://www.macosxautomation.com/mavericks/guiscripting/index.html
Download The Utility
https://github.com/jacobsalmela/tccutil/releases
or install it via Homebrew:
brew install tccutil
Apple’s Limited Utility
Apple has an existing utility called tccutil
, which lives in /usr/bin
, but it only supports one command:
tccutil reset SERVICE
This command will just remove everything, which is useful, but very limited. When trying to script a GUI login, I found myself needing to enable osascript
for access to assistive devices–I use osacript
to simulate keystrokes at the login window–but you cannot just drag-and-drop it into the System Preference window like you can with an .app
. So I decided to write a Python program–tccutil.py— which could add or remove items into the database.