init client with env variable if possible