(maint) fix commands API examples

This includes an environment key in the replace-facts example so it works when copy pasted.
Merge pull request #1076 from wkalt/maint/fix-commands-examples

(maint) fix commands API examples