(maint) fix commands API examples

This includes an environment key in the replace-facts example so it works when copy pasted.
so maybe we should use version 3 of the command now?