# Screenshot watch

`goff watch` has been available since version 0.11.0. It publishes each new stable screenshot as its own unlocked rental and copies that file's public URL to the pasteboard. It watches a folder. It does not record the screen.

`goff watch` with no subcommand is `goff watch run`. The binary accepts `watch`, `watch run`, `watch install`, and `watch uninstall` on every operating system. On anything other than macOS those commands print `goff watch is supported on macOS only` and exit 1.

`run` watches a directory. `install` points the macOS screenshot tool at that directory and loads a login agent that runs `goff watch run`. `uninstall` stops the agent and restores the previous screenshot location. `uninstall` takes no directory, duration, host, or API key.

`run` and `install` take the same `--host` and `--api-key` as the other commands. `--dir` defaults to `~/Pictures/Screenshots` and `--duration` defaults to 3600 seconds. They refuse your home directory and `~/Desktop`, `~/Documents`, `~/Downloads`, and `~/Pictures`. `~/Pictures/Screenshots` is allowed. A missing directory is created at mode `0700`.

A publishable file is a regular, non-empty image whose name does not start with a dot. Extensions: `png`, `jpg`, `jpeg`, `gif`, `tif`, `tiff`, `pdf`, `bmp`, `heic`. The watcher looks only at the top of the directory. Clipboard-only captures and `.mov` recordings are ignored. Upload waits until size and mtime are identical across two checks about 200 ms apart, then uploads, enables the rental, and copies the public URL. The local file stays.

Files already in the directory when the watcher first starts are recorded and not uploaded. Files that arrive while the agent is stopped are uploaded on the next start. A file is not uploaded again unless its size or modification time changes.

`install` records the prior screenshot location, points `com.apple.screencapture` at the watch directory, and bootstraps `net.galiath.goff.watch`. State is `~/Library/Application Support/goff/watch.json`. The plist is `~/Library/LaunchAgents/net.galiath.goff.watch.plist`. Both are mode `0600`. The plist stores `GEOFFREY_HOST` and `GEOFFREY_API_KEY`. Logs go to `~/Library/Logs/goff-watch.log`. A later install keeps the first recorded location. Install always boots out the agent before bootstrap, so the first install can print `Boot-out failed: 3: No such process` and still load the agent.

The public URL stops working when the lease ends. The rental row and its bytes stay until `goff purge`.

Geoffrey has no in-app privacy prompt. A macOS prompt after the screenshot control is for that capture feature.

