envio-hs
v0.2.1
Published
CLI for Envio's Hosted Service — manage and monitor blockchain indexers powered by HyperIndex
Maintainers
Readme
envio-hs
CLI for Envio's Hosted Service — deploy, manage, and monitor blockchain indexers powered by HyperIndex.
Install
npm install -g envio-hsOr run directly with npx:
npx envio-hs deployment metrics hyperindex b3ead3a mjyoung114Quick Start
# Authenticate with GitHub (opens browser)
envio-hs login
# List public indexers
envio-hs indexer list
# View deployment metrics (no auth required)
envio-hs deployment metrics hyperindex b3ead3a mjyoung114Authentication
Browser Login (default)
envio-hs loginOpens your browser to sign in via envio.dev. No local server or OAuth credentials required. Session lasts 30 days.
Token Login (CI/CD)
# Via flag
envio-hs login --token ghp_YOUR_TOKEN
# Via environment variable
export ENVIO_GITHUB_TOKEN=ghp_YOUR_TOKEN
envio-hs loginRequired token scopes: read:org, read:user, user:email.
Session Management
envio-hs token # Check current session status
envio-hs logout # Remove stored credentialsCommands
Indexer Commands
envio-hs indexer list
List all public indexers on the platform.
envio-hs indexer list
envio-hs indexer list --org myorg
envio-hs indexer list --limit 10
envio-hs indexer list -o json| Flag | Description |
|------|-------------|
| --org | Filter by organisation ID |
| --limit | Max number of results (default: 1000) |
| -o, --output | Output format: json |
envio-hs indexer get <name> <organisation>
View details and deployments for a specific indexer.
envio-hs indexer get hyperindex mjyoung114
envio-hs indexer get hyperindex mjyoung114 -o jsonenvio-hs indexer add (requires auth)
Add a new indexer to the platform.
envio-hs indexer add --name my-indexer --repo my-repo
envio-hs indexer add --name my-indexer --repo my-repo --branch main --tier development
envio-hs 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 | |
Deployment Commands
envio-hs deployment metrics <indexer> <commit> <organisation>
Real-time indexing metrics per chain. No auth required.
envio-hs deployment metrics hyperindex b3ead3a mjyoung114
envio-hs deployment metrics hyperindex b3ead3a mjyoung114 -o json
envio-hs 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-hs deployment status <indexer> <commit> <organisation>
Sync progress and completion percentage. No auth required.
envio-hs deployment status hyperindex b3ead3a mjyoung114
envio-hs deployment status hyperindex b3ead3a mjyoung114 --watch-till-synced
envio-hs deployment status hyperindex b3ead3a mjyoung114 -o jsonenvio-hs deployment info <indexer> <commit> <organisation>
Aggregator configuration (cache, DB exposure). No auth required.
envio-hs deployment info hyperindex b3ead3a mjyoung114
envio-hs deployment info hyperindex b3ead3a mjyoung114 -o jsonenvio-hs deployment promote <indexer> <commit> <organisation> (requires auth)
Promote a deployment to production.
envio-hs deployment promote myindexer abc1234 myorgRepository Commands
envio-hs repos (requires auth)
List GitHub repositories linked to your organisation.
envio-hs repos
envio-hs repos -o jsonJSON Output
All commands support -o json for machine-readable output with a consistent envelope:
{
"ok": true,
"data": [ ... ]
}On error:
{
"ok": false,
"error": "error message"
}Piping Examples
# Get event count with jq
envio-hs deployment metrics hyperindex b3ead3a mjyoung114 -o json \
| jq '.data[].num_events_processed'
# List indexer names for an org
envio-hs indexer list --org enviodev -o json \
| jq -r '.data[].indexer_id'
# Check if fully synced
envio-hs deployment metrics hyperindex b3ead3a mjyoung114 -o json \
| jq '.data | all(.latest_processed_block >= .block_height)'Global Flags
| Flag | Description |
|------|-------------|
| -q, --quiet | Suppress informational messages, output data only |
| -o, --output | Output format: json (on supported commands) |
| --config | Config file path (default: ~/.envio-hs.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-hs .GitHub Releases
Download prebuilt binaries from GitHub Releases.
