Michael Larabel of Phoronix reports that FreeBSD 12 will support ZFS Channel Programs, which allows for Lua scripts to executive administrative tasks. See their blog and discussion links below.

ZCP allows small Lua scripts to be executed for carrying out administrative tasks on the ZFS file-system for tasks like dropping old snapshots and other maintenance. The FreeBSD implementation does execute these commands in a sandboxed environment and enforces memory/time limits to fend off potential rogue Lua scripts.

Original post: https://www.phoronix.com/scan.php?page=news_item&px=ZFS-FreeBSD-ZCP

ZFS channel program (ZCP) is a small script written in a domain specific language that manipulate ZFS internals in a single, atomically-visible operation. For instance, to delete all snapshots of a filesystem a ZCP could be written which 1) generates the list of snapshots, 2) traverses that list, and 3) destroys each snapshot unconditionally.

OpenZFS page: http://open-zfs.org/wiki/Projects/ZFS_Channel_Programs

Other:  Phoronix discussion | FreeBSD Has A New ZFS Boot Management Tool & Library