args guard and empty envs filtering for the envs command