Skip to content

CLI Reference

The orbital CLI is the main tool for local development, bootstrap, and admin workflows.

Terminal window
# 1. Create and switch contexts
orbital context create local http://localhost:80
orbital context list
orbital context use local # or staging/production
# 2. Bootstrap first admin (no admins exist)
orbital invite list
orbital auth register <token>
orbital auth login
# 3. Check status
orbital auth status

Contexts are stored in ~/.orbital/config.yaml and hold API URLs and auth tokens per environment.

Generate invitation codes for new users to sign up:

Terminal window
# Create a new invitation
orbital invite create

Example output:

✅ Invitation created successfully!
Token: cm4fj2k8r0001
Expires At: 2025-12-19T12:00:00Z
Signup URL: http://localhost/auth/signin?invite=cm4fj2k8r0001

Check if an invitation token is valid:

Terminal window
# Check if invitation is valid
orbital invite get cm4fj2k8r0001
Terminal window
orbital invite list
# Works without auth in bootstrap mode (no admins yet)
Terminal window
# Switch active context
orbital context use production
# Short alias
orbital ctx use staging
# Show current context
orbital context show
Terminal window
orbital ctx use local
orbital auth status

Switch between contexts to test different environments:

Terminal window
# Test local
orbital ctx use local
orbital auth status
# Test staging
orbital ctx use staging
orbital auth status

Location: ~/.orbital/config.yaml

current: local
environments:
local:
api_url: http://localhost:80
auth_token: eyJhbGc... # Stored after login
staging:
api_url: https://staging-api.orbital.io
auth_token: ""
production:
api_url: https://api.orbital.io
auth_token: ""

Manage API contexts for different environments.

CommandDescription
orbital context listList all contexts
orbital context create <name> <url>Create a new context
orbital context use <name>Switch active context
orbital context showShow current context details
orbital context delete <name>Delete a context

Aliases: ctx

CommandDescription
orbital auth register <token>Open browser to register with an invitation token
orbital auth loginBrowser-based login, stores CLI token in config
orbital auth logoutClear authentication token
orbital auth statusShow current authentication status
CommandDescription
orbital invite createCreate a new invitation token
orbital invite listList invitations in current environment
orbital invite get <token>Validate an invitation token

Aliases: invitations, inv

Subscribe to real-time event streams.

CommandDescription
orbital stream listList available streams
orbital stream subscribe <name>Subscribe to a stream (e.g., wallet, heartbeat)

Aliases: str

Example:

Terminal window
orbital stream list
orbital str subscribe wallet
FlagDescription
-v, --versionShow CLI version
-h, --helpShow help information

If you’re having trouble authenticating:

Terminal window
# Check if you're authenticated
orbital auth status
# Clear and re-authenticate
orbital auth logout
orbital auth login

Verify your API connection:

Terminal window
# Check current context
orbital context show
# List all contexts
orbital context list
# Verify server is running
curl http://localhost:80/health

Reset to default configuration:

Terminal window
# Remove existing config
rm ~/.orbital/config.yaml
# Create new context
orbital context create local http://localhost:80
orbital context use local