Support environment variables and command line operation