Used alone: Yes, no window required. Taking screenshots requires screen recording permission. If you don’t want to pop up the screen yourself, you can apply with native/permission.
import "github.com/dyike/keel/native/screen"
displays, err := screen.Displays()
png, err := screen.Capture(displays[0].ID) // Blocks for up to 10 seconds and cannot be called from the main thread
Capture returns a PNG of the display at native resolution. It needs the
ScreenRecording permission, never prompts, and times out after 10 seconds;
call it off the UI goroutine.