I was astonished when I couldn't find what I needed - surely this had already been solved by someone else! There are things like inotify and watchman, but they don't provide process information about the events.
I haven't figured out how to distribute it quite yet because the API it uses to collect file system events isn't allowed in apps distributed on the app store. I recently made a short video demo, though[2].
[1] https://blog.codysehl.net/2023/Understanding-the-XCode-Build... [2] https://www.youtube.com/watch?v=EPhMWXzoBWY