Skip to content
juiceppePublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

💻 orbit-cli

Command-line interface for managing GraphQL Federation ecosystems


🎯 Purpose

orbit-cli provides a traditional CLI experience for:

  • 👤 Managing multiple profiles/environments
  • 📁 Browsing projects, targets, and services
  • 📜 Fetching supergraph and subgraph schemas

🚀 Installation

# From the workspace root
cargo build -p orbit-cli --release

# Binary will be at target/release/orbit-cli

📖 Commands

Profile Management

# 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

Project Browsing

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

Schema Operations

# 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

⚙️ Configuration

Environment Variables

# Override token (highest priority)
export HIVE_TOKEN="your-token"

CLI Flags

# Use specific token for one command
orbit --token "temp-token" projects list

# Use specific profile
orbit --profile production projects list

Config File

See orbit-core README for config file format.


📋 Examples

Full Workflow

# 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.graphql

🏗️ Architecture

Built with clap using derive macros:

orbit-cli/src/
├── main.rs           # Entry point, command dispatch
└── cli/
    └── commands.rs   # Clap command definitions

🔮 Future Plans

  • 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

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages