(maint) fix commands API examples

This includes an environment key in the replace-facts example so it works when copy pasted.