Usage
Description
Returns an array of all running GUI applications with their name, process ID, and bundle identifier.Parameters
This command takes no parameters.Response
Response Fields
Each app object contains:name— Application display namepid— Process IDbundle_id— macOS bundle identifier (e.g., “com.apple.Safari”), may be null for some apps
Examples
List all running apps
Check if specific app is running
Get app PID
Count running apps
Extract all bundle IDs
Error Codes
PERM_DENIED— Missing Accessibility permissionINTERNAL— System error retrieving application list
Notes
- Only GUI applications are included (no background daemons or command-line tools)
- On macOS, requires Accessibility permission
- The
bundle_idfield can be used with thelaunchcommand for precise app identification - Process IDs are valid until the application quits