Rover Configuration
Installation, authentication, and environment configuration for Apollo Rover CLI.
Installation
macOS and Linux
# Install latest version
curl -sSL https://rover.apollo.dev/nix/latest | sh
# Install specific version
curl -sSL https://rover.apollo.dev/nix/v0.26.0 | sh
# Add to PATH (if not automatic)
export PATH="$HOME/.rover/bin:$PATH"npm (Cross-platform)
# Global install
npm install -g @apollo/rover
# Project-local install
npm install --save-dev @apollo/rover
npx rover --versionWindows PowerShell
# Install latest
iwr 'https://rover.apollo.dev/win/latest' | iex
# Install specific version
iwr 'https://rover.apollo.dev/win/v0.26.0' | iexVerify Installation
rover --version
rover --helpAuthentication
Interactive Authentication
# Opens browser for authentication
rover config authProcess:
- Browser opens to GraphOS Studio
- Log in or create account
- Authorize Rover
- Token saved to config file
API Key Authentication
# Set via environment variable (recommended for CI/CD)
export APOLLO_KEY=your-api-key
# Or configure directly
rover config auth --api-key your-api-keyVerify Authentication
# Check current authentication
rover config whoamiOutput:
Authenticated as: user@example.com
Organization: My Org
API Key Type: UserEnvironment Variables
Core Variables
| Variable | Description | Example |
|---|---|---|
APOLLO_KEY |
API key for GraphOS | user:gh.xxx:yyy |
APOLLO_GRAPH_REF |
Default graph reference | my-graph@production |
Using Environment Variables
# Set in shell
export APOLLO_KEY=your-api-key
export APOLLO_GRAPH_REF=my-graph@production
# Use in commands
rover subgraph fetch $APOLLO_GRAPH_REF --name products
# Or commands auto-detect APOLLO_GRAPH_REF
rover subgraph fetch --name productsCI/CD Environment
# GitHub Actions
env:
APOLLO_KEY: ${{ secrets.APOLLO_KEY }}
APOLLO_GRAPH_REF: my-graph@production
steps:
- run: rover subgraph check $APOLLO_GRAPH_REF --name products --schema ./schema.graphql# CircleCI
environment:
APOLLO_KEY: ${APOLLO_KEY}
APOLLO_GRAPH_REF: my-graph@productionConfiguration File
Rover stores configuration in ~/.rover/config.toml.
Location
# View config path
rover config list
# macOS/Linux: ~/.rover/config.toml
# Windows: %USERPROFILE%\.rover\config.tomlStructure
[profiles.default]
api_key = "user:gh.xxx:yyy"
[profiles.staging]
api_key = "user:gh.xxx:zzz"Profiles
Use profiles for different environments or accounts.
Create Profile
# Create/update profile
rover config auth --profile stagingUse Profile
# Specify profile for command
rover subgraph fetch my-graph@staging --name products --profile stagingList Profiles
rover config listOutput Formats
Plain Text (Default)
rover subgraph fetch my-graph@production --name productsOutput: Raw SDL schema
JSON
rover subgraph fetch my-graph@production --name products --format jsonOutput:
{
"data": {
"sdl": "type Product { ... }",
"name": "products"
},
"error": null
}Using with jq
# Extract just the SDL
rover subgraph fetch my-graph@production --name products --format json | jq -r '.data.sdl'
# Check for errors
rover subgraph check my-graph@production --name products --schema ./schema.graphql --format json | jq '.error'Logging
Log Levels
# Increase verbosity
rover --log debug subgraph fetch my-graph@production --name products
# Available levels: error, warn, info, debug, traceEnvironment Variable
export APOLLO_TELEMETRY_DISABLED=1 # Disable telemetry
export ROVER_LOG=debug # Set log levelTelemetry
Rover collects anonymous usage data by default.
Disable Telemetry
export APOLLO_TELEMETRY_DISABLED=1What's Collected
- Command names (not arguments or schemas)
- Rover version
- OS type
- Anonymous usage patterns
Proxy Configuration
HTTP Proxy
export HTTP_PROXY=http://proxy.example.com:8080
export HTTPS_PROXY=http://proxy.example.com:8080No Proxy
export NO_PROXY=localhost,127.0.0.1,.internal.example.comSSL/TLS Configuration
Custom CA Certificate
# Set CA bundle
export SSL_CERT_FILE=/path/to/ca-bundle.crt
# Or for curl-based operations
export CURL_CA_BUNDLE=/path/to/ca-bundle.crtDisable SSL Verification (Not Recommended)
# For development only
export ROVER_SKIP_SSL_VALIDATION=1Updating Rover
Check for Updates
rover update checkUpdate to Latest
# npm
npm update -g @apollo/rover
# curl (reinstall)
curl -sSL https://rover.apollo.dev/nix/latest | shUninstalling
npm
npm uninstall -g @apollo/roverManual Installation
# Remove binary
rm -rf ~/.rover
# Remove from PATH (in .bashrc/.zshrc)
# Remove: export PATH="$HOME/.rover/bin:$PATH"Troubleshooting
Authentication Issues
# Clear and re-authenticate
rm ~/.rover/config.toml
rover config authNetwork Issues
# Test connectivity
curl -I https://api.apollographql.com
# Check DNS
nslookup api.apollographql.comPermission Issues
# Fix permissions (macOS/Linux)
chmod +x ~/.rover/bin/roverVersion Conflicts
# Check installed location
which rover
# Ensure correct version
rover --version