title |
---|
Installing Rover |
The Rover CLI is available for Linux, Mac, and Windows.
To install the latest release of Rover:
curl -sSL https://rover.apollo.dev/nix/latest | sh
To install a specific version of Rover (recommended for CI environments to ensure predictable behavior):
# Note the `v` prefixing the version number
curl -sSL https://rover.apollo.dev/nix/v0.23.0-rc.3 | sh
If your machine doesn't have the curl
command, you can get the latest version from the curl
downloads page.
Note: The
rover supergraph compose
command is not yet available for Alpine Linux. You can track the progress for supporting this command on Alpine in this issue.
To install the latest release of Rover:
iwr 'https://rover.apollo.dev/win/latest' | iex
To install a specific version of Rover (recommended for CI environments to ensure predictable behavior):
# Note the `v` prefixing the version number
iwr 'https://rover.apollo.dev/win/v0.23.0-rc.3' | iex
Rover is distributed on npm for integration with your JavaScript projects.
Internally, the npm
installer downloads router binaries from https://rover.apollo.dev
. If this URL is unavailable, for example, in a private network, you can point the npm
installer at another URL in one of two ways:
-
Setting the
APOLLO_ROVER_DOWNLOAD_HOST
environment variable.Note: This environment variable also changes the host that plugins for
rover supergraph compose
androver dev
are downloaded from. By default,rover dev
attempts to install the latest version of plugins for the router and composition. To maintain this behavior, anX-Version: vX.X.X
header must be present in the response from the binary mirror. To circumvent the need for this header, plugin versions can instead be pinned with theAPOLLO_ROVER_DEV_COMPOSITION_VERSION
andAPOLLO_ROVER_DEV_ROUTER_VERSION
environment variables. For more details, see versioning forrover dev
. -
Adding the following to your global or local
.npmrc
:
apollo_rover_download_host=https://your.mirror.com/repository
Run the following to install rover
as one of your project's devDependencies
:
npm install --save-dev @apollo/rover
You can then call rover <parameters>
directly in your package.json
scripts, or you can run npx -p @apollo/rover rover <parameters>
in your project directory to execute commands.
Note: When using
npx
, the-p @apollo/rover
argument is necessary to specify that the@apollo/rover
package provides therover
command. Seenpx
's documentation for more information.
To install rover
globally so you can use it from any directory on your machine, run the following:
npm install -g @apollo/rover
Note: If you've installed
npm
without a version manager such asnvm
, you might have trouble with global installs. If you encounter anEACCES
permission-related error while trying to install globally, DO NOT run the install command withsudo
. This support page has information that should help resolve this issue.
You can also download the Rover binary for your operating system and manually add its location to your PATH
.
There are a few additional installation methods maintained by the community:
After you install Rover, you should authenticate it with GraphOS, because many of its commands communicate with GraphOS.
Run the following command:
rover config auth
This command instructs you where to obtain a personal API key and helps you set up a configuration profile. For more information, see Configuring Rover.