Usage
Parameters
Trigger the macOS system permission dialog. If permission is already granted, this has no effect.
Response
Check Mode (no —request)
true if accessibility permission is granted, false otherwiseInstructions on how to grant permission. Only present if
granted is false.Request Mode (with —request)
Always
trueConfirmation message that the permission dialog was triggered
Examples
Check Permission Status
Permission Not Granted
Request Permission
macOS Accessibility Permission
Agent-desktop requires macOS accessibility permission to:- Read accessibility trees
- Perform actions on UI elements
- Send keyboard and mouse events
- Read and write clipboard
- Take screenshots
- Interact with notifications
How to Grant Permission
Add Your Terminal
Click the + button and add your terminal app:
- Terminal.app
- iTerm2
- Warp
- Alacritty
- Or your preferred terminal
Using —request Flag
The--request flag triggers the macOS system permission dialog:
“Terminal” would like to control this computer using accessibility features. Grant access to this application in System Settings.Click Open System Settings and follow the steps above.
Use Cases
Pre-Flight Check
Pre-Flight Check
Verify permission before running commands:
Interactive Setup
Interactive Setup
Guide users through permission setup:
CI/CD Setup
CI/CD Setup
Verify permission in CI environments:
Troubleshooting
Permission Granted But Commands Fail
Ifpermissions returns granted: true but commands fail with PERM_DENIED:
- Restart your terminal: Permission changes require restarting the terminal app
- Check the correct terminal is added: Ensure the terminal app you’re using is in the Accessibility list
- Try removing and re-adding: Remove the terminal from Accessibility, restart, and add it again
System Dialog Doesn’t Appear
Ifpermissions --request doesn’t show a dialog:
- Permission may already be granted (check with
permissionswithout--request) - Open System Settings manually and add the terminal app
Multiple Terminal Apps
If you use multiple terminal apps, each needs permission individually:Error Handling
Thepermissions command itself rarely fails, but if it does: