Skip to main content

Envio Cloud CLI

Alpha Release

The envio-cloud CLI is currently in alpha. The tool is under active development and will be iterated on before a stable version 1 release once the final form of the tool's interaction is finalized.

For feature requests, please reach out to us on Telegram or Discord.

The envio-cloud CLI is a command-line tool for interacting with Envio Cloud. It enables you to deploy, manage, and monitor your blockchain indexers directly from the terminal — making it particularly useful for CI/CD pipelines, scripting, and agentic workflows.

Installation

npm install -g envio-cloud

Or run directly without installation:

npx envio-cloud <command>

Shell Completion

The envio-cloud CLI ships with shell completion scripts for bash, zsh, fish, and powershell. Completion includes dynamic suggestions for indexer names and commit hashes, so you can tab-complete them directly from the terminal.

Run the one-liner for your shell to install completions:

ShellOne-liner
zshecho 'source <(envio-cloud completion zsh)' >> ~/.zshrc
bashenvio-cloud completion bash > ~/.local/share/bash-completion/completions/envio-cloud
fishenvio-cloud completion fish > ~/.config/fish/completions/envio-cloud.fish
powershellenvio-cloud completion powershell >> $PROFILE

Restart your shell (or source your profile) for the completions to take effect. Run envio-cloud completion --help for further options.

Authentication

Browser Login

envio-cloud login

Opens browser-based authentication via envio.dev with a 30-day session duration. Tokens are automatically refreshed when expired.

Token-Based Login (CI/CD)

envio-cloud login --token ghp_YOUR_TOKEN

Or using an environment variable:

export ENVIO_GITHUB_TOKEN=ghp_YOUR_TOKEN
envio-cloud login

Required GitHub token scopes: read:org, read:user, user:email.

Session Management

envio-cloud token    # Check current session
envio-cloud logout # Remove credentials

Context Management

Like kubectl namespaces, envio-cloud lets you store default values for organisation and indexer so you don't have to pass them on every command. Flags (--org, --indexer) always override stored context.

# 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 # org and indexer from context
envio-cloud indexer settings get # both from context

# Flags override context
envio-cloud deployment status abc1234 --org other-org

# Clear stored context
envio-cloud config clear

Context is stored at ~/.envio-cloud/context.json. Resolution priority:

  1. Explicit positional arguments
  2. --org / --indexer flags
  3. Stored context
  4. GitHub login (organisation only)
CommandDescription
config set-org <org>Set default organisation
config set-indexer <indexer>Set default indexer
config get-contextShow current defaults and where they come from
config clearRemove all stored defaults

Commands

Indexer Commands

List Indexers

envio-cloud indexer list
envio-cloud indexer list --org myorg
envio-cloud indexer list --limit 10
envio-cloud indexer list -o json
FlagDescription
--orgFilter by organization
--limitLimit number of results
-o, --outputOutput format (json)

Get Indexer Details

envio-cloud indexer get <name> [organisation]
envio-cloud indexer get hyperindex mjyoung114 -o json
envio-cloud indexer get hyperindex --org mjyoung114

Organisation can be omitted if set via context.

Add an Indexer

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
FlagDescriptionDefault
-n, --nameIndexer name (required)
-r, --repoRepository name (required)
-b, --branchDeployment branchenvio
-d, --root-dirRoot directory./
-c, --config-fileConfig file pathconfig.yaml
-t, --tierPricing tierdevelopment
-a, --access-typeAccess typepublic
-e, --env-fileEnvironment file
--auto-deployEnable auto-deploytrue
--dry-runPreview without creating
-y, --yesSkip confirmation prompts

Delete an Indexer

Permanently delete an indexer and all of its deployments. Requires typing the indexer name to confirm.

envio-cloud indexer delete myindexer myorg
envio-cloud indexer delete myindexer --org myorg
envio-cloud indexer delete myindexer myorg --yes # skip confirmation for CI/CD
danger

This action cannot be undone. All deployments, data, and configuration for the indexer will be permanently removed.

View and Modify Settings

# View current settings
envio-cloud indexer settings get myindexer myorg

# Modify settings (only specified flags are changed)
envio-cloud indexer settings set myindexer myorg --branch main
envio-cloud indexer settings set myindexer myorg --auto-deploy=false
envio-cloud indexer settings set myindexer myorg --config-file config.yaml --branch develop
Flag (set)Description
--branchGit branch for deployments
--config-filePath to config file
--root-dirRoot directory within the repository
--auto-deployEnable or disable auto-deploy on push
--descriptionIndexer description
--access-typepublic or private

Manage Environment Variables

Environment variables can be managed from the CLI. All keys must be prefixed with ENVIO_. Changes take effect on the next deployment.

# List variables (values masked by default)
envio-cloud indexer env list myindexer myorg
envio-cloud indexer env list myindexer myorg --show-values

# Set one or more variables
envio-cloud indexer env set myindexer myorg ENVIO_API_KEY=abc123 ENVIO_DEBUG=true

# Remove a variable
envio-cloud indexer env delete myindexer myorg ENVIO_DEBUG

# Bulk import from a .env file
envio-cloud indexer env import myindexer myorg --file .env

The .env file format is one KEY=VALUE per line. Lines starting with # are ignored.

Configure IP Whitelisting

Restrict access to your indexer's GraphQL endpoint by IP address. Supports IPv4 addresses and CIDR notation.

# View current IP whitelist configuration
envio-cloud indexer security get myindexer myorg

# Add IPs to the whitelist
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

# Enable IP whitelisting (make sure to add IPs first)
envio-cloud indexer security enable myindexer myorg

# Disable IP whitelisting
envio-cloud indexer security disable myindexer myorg

# Restrict whitelisting to production deployments only
envio-cloud indexer security set-prod-only myindexer myorg true

# Remove an IP
envio-cloud indexer security remove-ip myindexer myorg 203.0.113.50
tip

Add your IP addresses before enabling whitelisting — otherwise you may lock yourself out. The CLI will warn you if you try to enable whitelisting with no IPs configured.

Deployment Commands

All deployment commands accept arguments as <indexer> <commit> [organisation]. Organisation and indexer can be omitted if set via envio-cloud config.

Deployment Metrics

envio-cloud deployment metrics <indexer> <commit> [organisation]
envio-cloud deployment metrics hyperindex b3ead3a mjyoung114 --watch
envio-cloud deployment metrics hyperindex b3ead3a mjyoung114 -o json

No authentication required.

FlagDescription
--watchContinuously poll for updates
-o, --outputOutput format (json)

Deployment Status

envio-cloud deployment status <indexer> <commit> [organisation]
envio-cloud deployment status hyperindex b3ead3a mjyoung114 --watch-till-synced
FlagDescription
--watch-till-syncedWait until deployment is fully synced

Deployment Info

envio-cloud deployment info <indexer> <commit> [organisation]

Promote a Deployment

Promote a deployment to the production endpoint. Requires confirmation (y/N).

envio-cloud deployment promote <indexer> <commit> [organisation]
envio-cloud deployment promote myindexer abc1234 myorg --yes

Delete a Deployment

Permanently delete a deployment. Requires typing the indexer name to confirm.

envio-cloud deployment delete <indexer> <commit> [organisation]
envio-cloud deployment delete myindexer abc1234 myorg --yes
danger

This action cannot be undone. The deployment and its data will be permanently removed.

Restart a Deployment

Restart a running deployment. There is a 10-minute cooldown between restarts.

envio-cloud deployment restart <indexer> <commit> [organisation]
envio-cloud deployment restart myindexer abc1234 myorg --yes

Deployment Logs

Show build or runtime logs for a deployment.

envio-cloud deployment logs <indexer> <commit> [organisation]
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 --follow
FlagDescription
--buildShow build logs instead of runtime logs
--levelFilter by log level (e.g., error,warn)
--limitMax number of log lines (default: 100)
--followPoll for new logs every 10 seconds

Repository Commands

List Repositories

envio-cloud repos
envio-cloud repos -o json

Requires authentication.

Confirmation Prompts

Dangerous commands require confirmation before executing:

CommandConfirmation type
indexer deleteType the indexer name
deployment deleteType the indexer name
deployment promotey/N prompt
deployment restarty/N prompt

All prompts can be skipped with the --yes / -y flag for CI/CD usage.

Global Flags

FlagDescription
--orgOverride default organisation
--indexerOverride default indexer
-q, --quietSuppress informational messages
-o, --outputOutput format (json)
--configSpecify config file path
-h, --helpDisplay command help
-v, --versionShow CLI version

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'

Exit Codes

CodeMeaning
0Success
1User error (invalid arguments, authentication required)
2API or server error