The terminal will show a 6-character code. Give it to the person connecting, and they enter it above.
First run auto-installs dependencies (may take a minute). After that it starts instantly.
macOS permissions needed: Go to System Settings → Privacy & Security and grant Terminal access to both Screen Recording and Accessibility. Without these, screen sharing or input control won't work.
Want it to work with the lid closed? Plug in the charger, then run this before the agent command: sudo pmset -b disablesleep 1 To undo later: sudo pmset -b disablesleep 0
Want audio streaming? Install BlackHole (free) on the host Mac. Then in System Settings → Sound, set output to "BlackHole 2ch", or create a Multi-Output Device in Audio MIDI Setup to hear audio locally too. The agent will auto-detect it.