✨ 🤖 🐶 the new CLI for apollo
This is the home of Rover, the new CLI for Apollo's suite of GraphQL developer productivity tools.
This README
contains just enough info to get you started with Rover. Our docs contain more detailed information that should be your primary reference for all things Rover.
A few useful Rover commands to interact with your graphs:
- Fetch a graph from a federated remote endpoint.
rover graph fetch test@cats
- Validate recent changes made to your local graph with
rover graph check
.
rover graph check --schema=./path-to-valid-sdl test@cats
- Publish your local graph to Apollo Studio.
rover graph publish --schema ./path-to-valid-schema test@cats
Rover 0.1.6
Rover - Your Graph Companion
Read the getting started guide by running:
$ rover docs open start
To begin working with Rover and to authenticate with Apollo Studio,
run the following command:
$ rover config auth
This will prompt you for an API Key that can be generated in Apollo Studio.
The most common commands from there are:
- rover graph fetch: Fetch a graph schema from the Apollo graph registry
- rover graph check: Check for breaking changes in a local graph schema against a graph schema in the Apollo graph
registry
- rover graph publish: Publish an updated graph schema to the Apollo graph registry
You can open the full documentation for Rover by running:
$ rover docs open
USAGE:
rover [OPTIONS] <SUBCOMMAND>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-l, --log <log-level> Specify Rover's log level [possible values: error, warn, info,
debug, trace]
SUBCOMMANDS:
config Configuration profile commands
docs Interact with Rover's documentation
explain Explain error codes
graph Graph API schema commands
help Prints this message or the help of the given subcommand(s)
subgraph Subgraph schema commands
supergraph Supergraph schema commands
update Commands related to updating rover
This repo is organized as a cargo
workspace, containing several related projects:
rover
: Apollo's suite of GraphQL developer productivity toolshouston
: utilities for configuring Roverrobot-panic
: a fork ofrust-cli/human-panic
adjusted for Roverrover-client
: an HTTP client for making GraphQL requests for Roversdl-encoder
: a crate to encode SDLsputnik
: a crate to aid in collection of anonymous data for Rust CLIstimber
: Rover's logging formatter
To install the latest release of Rover:
curl -sSL https://rover.apollo.dev/nix/latest | sh
To install a specific version of Rover (note the v
prefixing the version number):
Note: If you're installing Rover in a CI environment, it's best to target a specific version rather than using the latest URL, since future major breaking changes could affect CI workflows otherwise.
curl -sSL https://rover.apollo.dev/nix/v0.1.1 | sh
You will need curl
installed on your system to run the above installation commands. You can get the latest version from the curl downloads page.
Note:
rover supergraph compose
is currently not available for Alpine Linux. You may track the progress for supporting this command on Alpine in this issue.
iwr 'https://rover.apollo.dev/win/latest' | iex
To install a specific version of Rover (note the v
prefixing the version number):
Note: If you're installing Rover in a CI environment, it's best to target a specific version rather than using the latest URL, since future major breaking changes could affect CI workflows otherwise.
iwr 'https://rover.apollo.dev/win/v0.1.1' | iex
Rover is distributed on npm for easy integration with your JavaScript projects.
If you'd like to install rover
as a devDependency
in your JavaScript project, you can run npm i --save-dev @apollo/rover
. You can then call rover
directly in your package.json
scripts, or you can run npx rover
in your project directory to execute commands.
If you'd like to call rover
from any directory on your machine, you can run npm i -g @apollo/rover
.
Note: Unfortunately if you've installed npm
without a version manager such as nvm
, you may 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 to resolve this issue.
You can also download the binary for your operating system and manually add its location to your PATH
.
See this page for info about contributing to Rover.
This project is licensed under the MIT License (LICENSE or http://opensource.org/licenses/MIT).