Just wrap it in a Nix flake and define a devshell. The entire config won’t exceed more than ~10 lines of Nix.
Once setup, all you need to do is:
$ nix develop —-command hugo regenerate
$ # version is pinned by flake.lock
The beauty of this approach is that it extends to almost any CLI tool you can think of :)