Join us from October 8-10 in New York City to learn the latest tips, trends, and news about GraphQL federation and API platform engineering.Join us for GraphQL Summit 2024 in NYC
Docs
Start for Free

Installing Rover

Rover CLI installation guide for Linux, Mac, and Windows


The is available for Linux, Mac, and Windows.

Installation Methods

Linux / MacOS installer

To install the latest release of :

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 | sh

If your machine doesn't have the curl command, you can get the latest version from the curl downloads page.

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.

Windows PowerShell installer

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' | iex

npm installer

Rover is distributed on npm for integration with your JavaScript projects.

Installing from a binary mirror

Internally, the npm installer downloads 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:

  1. Setting the APOLLO_ROVER_DOWNLOAD_HOST environment variable.

    This environment variable also changes the host that plugins for rover supergraph compose and rover dev are downloaded from. By default, rover dev attempts to install the latest version of plugins for the router and . To maintain this behavior, an X-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 the APOLLO_ROVER_DEV_COMPOSITION_VERSION and APOLLO_ROVER_DEV_ROUTER_VERSION environment variables. For more details, see versioning for rover dev.

  2. Adding the following to your global or local .npmrc:

apollo_rover_download_host=https://your.mirror.com/repository

devDependencies install

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.

When using npx, the -p @apollo/rover is necessary to specify that the @apollo/rover package provides the rover command. See npx's documentation for more information.

Global install

To install rover globally so you can use it from any directory on your machine, run the following:

npm install -g @apollo/rover

If you've installed npm without a version manager such as nvm, you might have trouble with global installs. If you encounter an EACCES permission-related error while trying to install globally, DO NOT run the install command with sudo. This support page has information that should help resolve this issue.

Binary download

You can also download the Rover binary for your operating system and manually add its location to your PATH.

Unofficial methods

There are a few additional installation methods maintained by the community:

  1. Homebrew
  2. Nix

Connecting to GraphOS

After you install Rover, you should authenticate it with GraphOS, because many of its commands communicate with .

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.

Previous
Overview
Next
Configure
Rate articleRateEdit on GitHubEditForumsDiscord

© 2024 Apollo Graph Inc.

Privacy Policy

Company