He was trying to help (and he pointed you to the hugo command, not the “whole documentation”), be grateful and be polite.
So,
You can set it via either
HUGO_ENVIRONMENTos variable--environmentflag
You can get it with hugo.Environment. Note that the defaults are development for server and production for regular hugo.