envio-cloud
v0.9.2
Published
CLI for Envio Cloud — manage and monitor blockchain indexers powered by HyperIndex
Maintainers
Readme
envio-cloud
CLI for Envio's Hosted Service — deploy, manage, and monitor blockchain indexers powered by HyperIndex.
Install
npm install -g envio-cloudOr run directly with npx:
npx envio-cloud deployment metrics hyperindex b3ead3a mjyoung114Quick Start
# Authenticate with GitHub (opens browser)
envio-cloud login
# Set your default organisation (like kubectl namespaces)
envio-cloud config set-org myorg
# List public indexers
envio-cloud indexer list
# View deployment metrics (no auth required)
envio-cloud deployment metrics hyperindex b3ead3a mjyoung114Context Management
Set default values for organisation and indexer so you don't have to pass them on every command, similar to kubectl namespace switching.
# Set defaults
envio-cloud config set-org myorg
envio-cloud config set-indexer myindexer
# View current context
envio-cloud config get-context
# Commands now use defaults automatically
envio-cloud deployment status abc1234
# Flags always override context
envio-cloud deployment status abc1234 --org other-org
# Clear stored context
envio-cloud config clearContext is stored at ~/.envio-cloud/context.json.
Authentication
Browser Login (default)
envio-cloud loginOpens your browser to sign in via envio.dev. No local server or OAuth credentials required. Session lasts 30 days and tokens are automatically refreshed when expired.
Token Login (CI/CD)
# Via flag
envio-cloud login --token ghp_YOUR_TOKEN
# Via environment variable
export ENVIO_GITHUB_TOKEN=ghp_YOUR_TOKEN
envio-cloud loginRequired token scopes: read:org, read:user, user:email.
Session Management
envio-cloud token # Check current session status
envio-cloud logout # Remove stored credentialsCommands
Context Commands
| Command | Description |
|---------|-------------|
| config set-org <org> | Set default organisation |
| config set-indexer <indexer> | Set default indexer |
| config get-context | Show current defaults |
| config clear | Remove stored defaults |
Indexer Commands
envio-cloud indexer list (requires auth)
List indexers across every organisation you are a member of. Use --org to
scope to a single organisation.
envio-cloud indexer list
envio-cloud indexer list --org myorg
envio-cloud indexer list --limit 10
envio-cloud indexer list -o json| Flag | Description |
|------|-------------|
| --org | Scope to a single organisation you belong to |
| --limit | Max number of results (default: 1000) |
| -o, --output | Output format: json |
envio-cloud indexer get <name> [organisation] (requires auth)
View details and deployments for a specific indexer in one of your organisations.
envio-cloud indexer get hyperindex mjyoung114
envio-cloud indexer get hyperindex --org mjyoung114
envio-cloud indexer get hyperindex mjyoung114 -o jsonenvio-cloud indexer add (requires auth)
Add a new indexer to the platform.
envio-cloud indexer add --name my-indexer --repo my-repo
envio-cloud indexer add --name my-indexer --repo my-repo --branch main --tier development
envio-cloud indexer add --name my-indexer --repo my-repo --dry-run| Flag | Description | Default |
|------|-------------|---------|
| -n, --name | Indexer name (required) | |
| -r, --repo | GitHub repository (required) | |
| -b, --branch | Git branch | envio |
| -d, --root-dir | Root directory | ./ |
| -c, --config-file | Config file path | config.yaml |
| -t, --tier | Service tier | development |
| -a, --access-type | Access type | public |
| -e, --env-file | Path to .env file | |
| --auto-deploy | Auto-deploy on push | true |
| --dry-run | Preview without creating | |
| -y, --yes | Skip confirmation | |
envio-cloud indexer delete <name> [organisation] (requires auth)
Permanently delete an indexer and all its deployments. Requires typing the indexer name to confirm.
envio-cloud indexer delete myindexer myorg
envio-cloud indexer delete myindexer myorg --yes # skip confirmationenvio-cloud indexer settings (requires auth)
View or modify indexer settings.
# View settings
envio-cloud indexer settings get myindexer myorg
# Modify settings (only specified flags are changed)
envio-cloud indexer settings set myindexer myorg --branch main --auto-deploy=true
envio-cloud indexer settings set myindexer myorg --config-file config.yaml| Flag (set) | Description |
|------------|-------------|
| --branch | Git branch for deployments |
| --config-file | Path to config file |
| --root-dir | Root directory |
| --auto-deploy | Enable/disable auto-deploy |
| --description | Indexer description |
| --access-type | public or private |
envio-cloud indexer env (requires auth)
Manage environment variables. All keys must be prefixed with ENVIO_.
# List variables (values masked)
envio-cloud indexer env list myindexer myorg
envio-cloud indexer env list myindexer myorg --show-values
# Set variables
envio-cloud indexer env set myindexer myorg ENVIO_API_KEY=abc123
# Remove variables
envio-cloud indexer env delete myindexer myorg ENVIO_API_KEY
# Bulk import from file
envio-cloud indexer env import myindexer myorg --file .envenvio-cloud indexer security (requires auth)
Configure IP whitelisting for an indexer's GraphQL endpoint. Supports IPv4 and CIDR notation.
# View config
envio-cloud indexer security get myindexer myorg
# Enable/disable
envio-cloud indexer security enable myindexer myorg
envio-cloud indexer security disable myindexer myorg
# Manage IPs
envio-cloud indexer security add-ip myindexer myorg 203.0.113.50
envio-cloud indexer security add-ip myindexer myorg 10.0.0.0/8
envio-cloud indexer security remove-ip myindexer myorg 203.0.113.50
# Restrict to production only
envio-cloud indexer security set-prod-only myindexer myorg trueDeployment Commands
All deployment commands accept args as <indexer> <commit> [organisation]. Organisation can be omitted if set via envio-cloud config set-org.
envio-cloud deployment metrics <indexer> <commit> [organisation] (requires auth)
Real-time indexing metrics per chain.
envio-cloud deployment metrics hyperindex b3ead3a mjyoung114
envio-cloud deployment metrics hyperindex b3ead3a mjyoung114 -o json
envio-cloud deployment metrics hyperindex b3ead3a mjyoung114 --watchExample output:
Deployment Metrics: mjyoung114/hyperindex (commit: b3ead3a)
CHAIN PROGRESS BLOCK HEIGHT PROCESSED EVENTS HYPERSYNC SYNCED AT
143 100.00% 62456629 62456630 577336 yes 2026-03-18 16:52
999 100.00% 30166822 30166822 1161921 yes 2026-03-18 16:52
Total chains: 2 | Total events: 1739257 | Status: fully synced| Flag | Description |
|------|-------------|
| --watch | Auto-refresh every 10 seconds |
| -o, --output | Output format: json |
envio-cloud deployment status <indexer> <commit> [organisation] (requires auth)
Sync progress and completion percentage.
envio-cloud deployment status hyperindex b3ead3a mjyoung114
envio-cloud deployment status hyperindex b3ead3a mjyoung114 --watch-till-synced
envio-cloud deployment status hyperindex b3ead3a mjyoung114 -o jsonenvio-cloud deployment info <indexer> <commit> [organisation] (requires auth)
Aggregator configuration (cache, DB exposure).
envio-cloud deployment info hyperindex b3ead3a mjyoung114
envio-cloud deployment info hyperindex b3ead3a mjyoung114 -o jsonenvio-cloud deployment endpoint <indexer> <commit> [organisation] (requires auth)
Get the GraphQL query endpoint URL.
envio-cloud deployment endpoint hyperindex b3ead3a mjyoung114
curl "$(envio-cloud deployment endpoint hyperindex b3ead3a mjyoung114)" -d '{"query": "{ ... }"}'envio-cloud deployment promote <indexer> <commit> [organisation] (requires auth)
Promote a deployment to production. Requires confirmation.
envio-cloud deployment promote myindexer abc1234 myorg
envio-cloud deployment promote myindexer abc1234 myorg --yesenvio-cloud deployment delete <indexer> <commit> [organisation] (requires auth)
Permanently delete a deployment. Requires typing the indexer name to confirm.
envio-cloud deployment delete myindexer abc1234 myorg
envio-cloud deployment delete myindexer abc1234 myorg --yesenvio-cloud deployment restart <indexer> <commit> [organisation] (requires auth)
Restart a running deployment. 10-minute cooldown between restarts.
envio-cloud deployment restart myindexer abc1234 myorg
envio-cloud deployment restart myindexer abc1234 myorg --yesenvio-cloud deployment logs <indexer> <commit> [organisation] (requires auth)
Show build or runtime logs for a deployment.
envio-cloud deployment logs myindexer abc1234 myorg
envio-cloud deployment logs myindexer abc1234 myorg --build
envio-cloud deployment logs myindexer abc1234 myorg --level error,warn
envio-cloud deployment logs myindexer abc1234 myorg --followRepository Commands
envio-cloud repos (requires auth)
List GitHub repositories linked to your organisation.
envio-cloud repos
envio-cloud repos -o jsonConfirmation Prompts
Dangerous commands prompt for confirmation before executing:
- Delete commands (
deployment delete,indexer delete): Type the indexer name to confirm - Disruptive commands (
deployment promote,deployment restart): Confirm withy/N
Skip with --yes / -y for CI/CD pipelines.
JSON Output
All commands support JSON output via the -o json flag, making the CLI easy to integrate into scripts and automation pipelines.
Success response:
{"ok": true, "data": [ ... ]}Error response:
{"ok": false, "error": "error message"}Example with jq:
# Get event count for a deployment
envio-cloud deployment metrics hyperindex b3ead3a mjyoung114 -o json | jq '.data[].num_events_processed'
# List all indexer IDs in an org
envio-cloud indexer list --org enviodev -o json | jq -r '.data[].indexer_id'
# Check if fully synced
envio-cloud deployment metrics hyperindex b3ead3a mjyoung114 -o json \
| jq '.data | all(.latest_processed_block >= .block_height)'Global Flags
| Flag | Description |
|------|-------------|
| --org | Override default organisation |
| --indexer | Override default indexer |
| -q, --quiet | Suppress informational messages, output data only |
| -o, --output | Output format: json (on supported commands) |
| --config | Config file path (default: ~/.envio-cloud.yaml) |
| -h, --help | Help for any command |
| -v, --version | Print version |
Exit Codes
| Code | Meaning | |------|---------| | 0 | Success (including empty results) | | 1 | User error (bad arguments, not logged in) | | 2 | API or server error |
Alternative Installation
Go
go install github.com/enviodev/hosted-service-cli@latestFrom Source
git clone https://github.com/enviodev/hosted-service-cli.git
cd hosted-service-cli
go build -o envio-cloud .GitHub Releases
Download prebuilt binaries from GitHub Releases.
