Push the key manager into the environment command.

This means that EnvName isn't needed to get the API endpoint.