Add better default env name guessing and handle node environments