# Screen and desktop

Your agent sees the screen and uses a real keyboard and mouse. You can watch or take over in your browser at any time.

## For your agent

- `screenshot_mac` returns the desktop at 1440×900, where image pixels are screen coordinates, or with target `simulator`, the booted iOS Simulator. It also says which app is in front, whether the screen is locked, and the text and buttons of any open dialog.
- `mac_input` types, presses keys, clicks, moves and scrolls as a person would, also on the lock screen and in password dialogs that scripted keystrokes cannot reach. Each answer has a screenshot. A retry types again, so look before repeating.
- Commands may drive any app with AppleScript and System Events, with no permission prompt.

### Terminal

```
nomac screenshot --simulator
nomac input type hello
nomac input click 720 450
nomac unlock
```

## For you

`open_mac_desktop` (`nomac desktop`) gives a link to the Mac's desktop in your browser, with mouse and keyboard, once you sign in to nomac.app. It disconnects after 15 minutes without input. On a Mac, `nomac desktop --app` opens Apple's Screen Sharing instead, with a shared clipboard.

To show the iOS Simulator on the desktop, boot a device with `simctl`, then run `open -a Simulator || open -a DeviceHub`.

## Recordings

### Terminal

```
nomac record --simulator
nomac record stop
```

`mac_recording` records the whole screen or the Simulator's window, for 5 minutes by default and 30 at most. Start it, do what should be shown, and stop it: it saves an MP4 and returns a link to share.
