Revert "Revert "Add anzu mode to query replacement.""

This reverts commit 45731f5effb972ae8fdab516cc5bf9ab0b05a31f.