tools/env: Add environment variable flags support