git clone https://github.com/sryo/petri ~/.claude/skills/petri
/petri shows up in your slash-command list. Restart your client if it
doesn't. Then petri setup once, and your agent takes it from there.
When what you're testing can take the whole session down with it: a window manager, a
daemon that kills apps, a launchctl reboot userspace, anything you'd
rather not aim at the Mac you're working on.
Tart on Apple Silicon. The first
petri setup pulls a macOS base image, which is tens of GB and happens
once. petri doctor tells you what's missing before anything downloads.
The current directory is shared live over VirtioFS, so edits on your Mac are already
there. Set PETRI_COPY=1 if you want an isolated tar copy instead.
petri reset throws the scratch VM away and the next run re-clones a
pristine one from the golden. That's the whole point: the golden is never tested in.
The VM boots windowed by default. petri screenshot grabs the guest's
display as a PNG, which is how you check a tiler actually tiled, and
petri vnc opens Screen Sharing.
SIP is on in the guest, so WindowServer injection needs SIP turned off in the golden
first. The guest is a stock image: no Xcode, no Homebrew. Install what your build
needs once with petri shell, or bake your own golden.
Isolation is a real VM, but the guest is a stock image with a public default password. Good enough for work that might wedge a session. Not a place to keep secrets or contain something actively adversarial.
Yes, open source and free to use.