Command-line interface for managing GraphQL Federation ecosystems
orbit-cli provides a traditional CLI experience for:
- 👤 Managing multiple profiles/environments
- 📁 Browsing projects, targets, and services
- 📜 Fetching supergraph and subgraph schemas
# From the workspace root
cargo build -p orbit-cli --release
# Binary will be at target/release/orbit-cli# List all profiles
orbit profile list
# Add a new profile
orbit profile add production
# Switch to a profile
orbit profile use production
# Show current profile details
orbit profile show# List all projects in the organization
orbit projects list
# List targets for a project
orbit projects target <project-slug>
# List services/subgraphs for a target
orbit projects services <project-slug> <target-slug># Fetch supergraph SDL
orbit schema fetch <project> <target>
# Fetch specific subgraph SDL
orbit schema fetch <project> <target> --subgraph <service-name>
# Save to file
orbit schema fetch <project> <target> > schema.graphql# Override token (highest priority)
export HIVE_TOKEN="your-token"# Use specific token for one command
orbit --token "temp-token" projects list
# Use specific profile
orbit --profile production projects listSee orbit-core README for config file format.
# 1. Set up a profile
orbit profile add mycompany
# Follow prompts for token, endpoint, org
# 2. List projects
orbit projects list
# Output:
# api-gateway (FEDERATION)
# user-service (FEDERATION)
# legacy-monolith (SINGLE)
# 3. Explore a project
orbit projects target api-gateway
# Output:
# development
# staging
# production
# 4. See services in production
orbit projects services api-gateway production
# Output:
# users
# products
# orders
# payments
# 5. Fetch the production supergraph
orbit schema fetch api-gateway production > supergraph.graphql
# 6. Fetch a specific subgraph
orbit schema fetch api-gateway production --subgraph users > users.graphqlBuilt with clap using derive macros:
orbit-cli/src/
├── main.rs # Entry point, command dispatch
└── cli/
└── commands.rs # Clap command definitions
-
orbit schema publish— Push schema updates -
orbit schema check— Validate schema changes -
orbit schema diff— Compare schema versions - JSON output format (
--output json) - Shell completions generation