Prerequisites
Before installing, ensure you have:- macOS 13 (Ventura) or later
- Terminal access (Terminal.app, iTerm2, or your preferred terminal emulator)
- Admin privileges to grant Accessibility permissions
Install via Homebrew
The simplest installation method is through Homebrew:Build from source
If you prefer to build from source or want to contribute:Building from source requires Xcode Command Line Tools. Install with:
xcode-select --installGrant Accessibility permissions
This is the most critical step. Without Accessibility permissions, agent-native cannot read or interact with application UI elements.Click the lock to make changes
Click the lock icon in the bottom-left corner and authenticate with your password or Touch ID
Add your terminal application
Click the + button and navigate to your terminal:
- Terminal.app:
/Applications/Utilities/Terminal.app - iTerm2:
/Applications/iTerm.app - VS Code integrated terminal:
/Applications/Visual Studio Code.app - Warp:
/Applications/Warp.app
Verify installation
Confirm that agent-native is installed correctly and has the necessary permissions:- Check version
- List running apps
- Test with JSON output
Troubleshooting
Error: Accessibility access denied
Error: Accessibility access denied
This means your terminal doesn’t have Accessibility permissions. Follow the Grant Accessibility permissions steps above.After granting permissions, you may need to:
- Quit and restart your terminal completely
- In some cases, log out and log back in to macOS
Command not found: agent-native
Command not found: agent-native
The binary isn’t in your PATH. Try:
- Homebrew: Run
brew doctorto check for PATH issues - From source: Verify the binary exists at
/usr/local/bin/agent-native - Add to PATH manually:
export PATH="/usr/local/bin:$PATH"in your~/.zshrcor~/.bash_profile
App not found errors when running commands
App not found errors when running commands
agent-native uses fuzzy matching to find apps by name. Ensure:
- The app is actually running (check with
agent-native apps) - You’re using the correct app name (e.g., “System Settings” not “System Preferences” on macOS 13+)
- Try using the bundle ID instead:
agent-native open com.apple.systempreferences
Commands work but can't interact with elements
Commands work but can't interact with elements
Some apps have restricted Accessibility APIs or require additional permissions:
- Try running the command with
sudo(not recommended for regular use) - Check if the app itself requires additional security permissions
- Some system apps may have limited interaction capabilities
Next steps
Quick start tutorial
Learn the core workflow with a hands-on example using System Settings