Envio Cloud CLI
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>
Authentication
Browser Login
envio-cloud login
Opens browser-based authentication via envio.dev with a 30-day session duration.
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
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
| Flag | Description |
|---|---|
--org | Filter by organization |
--limit | Limit number of results |
-o, --output | Output format (json) |
Get Indexer Details
envio-cloud indexer get <name> <organisation>
envio-cloud indexer get hyperindex mjyoung114 -o json
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
| Flag | Description | Default |
|---|---|---|
-n, --name | Indexer name (required) | — |
-r, --repo | Repository name (required) | — |
-b, --branch | Deployment branch | envio |
-d, --root-dir | Root directory | ./ |
-c, --config-file | Config file path | config.yaml |
-t, --tier | Pricing tier | development |
-a, --access-type | Access type | public |
-e, --env-file | Environment file | — |
--auto-deploy | Enable auto-deploy | true |
--dry-run | Preview without creating | — |
-y, --yes | Skip confirmation prompts | — |
Deployment Commands
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.
| Flag | Description |
|---|---|
--watch | Continuously poll for updates |
-o, --output | Output format (json) |
Deployment Status
envio-cloud deployment status <indexer> <commit> <organisation>
envio-cloud deployment status hyperindex b3ead3a mjyoung114 --watch-till-synced
| Flag | Description |
|---|---|
--watch-till-synced | Wait until deployment is fully synced |
Deployment Info
envio-cloud deployment info <indexer> <commit> <organisation>
No authentication required.
Promote a Deployment
envio-cloud deployment promote <indexer> <commit> <organisation>
Requires authentication. Promotes a deployment to the production endpoint.
Repository Commands
List Repositories
envio-cloud repos
envio-cloud repos -o json
Requires authentication.
Global Flags
| Flag | Description |
|---|---|
-q, --quiet | Suppress informational messages |
-o, --output | Output format (json) |
--config | Specify config file path |
-h, --help | Display command help |
-v, --version | Show 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
| Code | Meaning |
|---|---|
0 | Success |
1 | User error (invalid arguments, authentication required) |
2 | API or server error |
Related Documentation
- Envio Cloud Overview - Introduction to Envio Cloud
- Deploying Your Indexer - Step-by-step deployment guide via the dashboard
- Monitoring - Dashboard monitoring and alerts
- Envio CLI - Local development CLI reference
- npm package - Latest version and changelog