I want to check if a certain app is allowed to control my computer from the terminal. I need to check Privacy > accessibility settings to do that. How do I check-- where are accessibility settings stored?
The database is located at
To query the database from the command line, use
You can query what access a certain app has.
sqlite3 /Library/Application\ Support/com.apple.TCC/TCC.db \ 'select service from access where client like "com.apple.Terminal" and auth_value = 2;'
kTCCServiceDeveloperTool kTCCServiceListenEvent kTCCServicePostEvent kTCCServiceScreenCapture kTCCServiceSystemPolicyAllFiles
You can query what apps have access to a certain permission like accessibility.
sqlite3 /Library/Application\ Support/com.apple.TCC/TCC.db \ 'select client from access where service like "kTCCServiceAccessibility" and auth_value = 2;'
com.apple.AEServer com.apple.MobileSMS com.apple.dt.Xcode-Helper …
To perform these queries, Terminal needs full disk access (
auth_value = 2 with
allowed = 1 if on an older macOS like High Sierra (not sure at which point it changed between High Sierra and Big Sur).