Updated the getEnvironment method to include cli calls