1.0.5 • Published 3 months ago
mobula-cli v1.0.5
Mob CLI
A custom CLI tool for deploying subgraphs to our Graph Node.
Installation
npm install -g mobula-cli
API Keys
The CLI requires an API key for authentication. You must set an API key before deploying any subgraphs:
mob apikey set
The API key is stored securely in your home directory and will be used for all future deployments. The API key is included in the HTTP request headers when deploying a subgraph:
Authorization: Bearer <api-key>
X-API-KEY: <api-key>
Usage
Managing API Keys
# Set or update your API key (interactive)
mob apikey set
# Set or update your API key (non-interactive)
mob apikey set --key YOUR_API_KEY
# View your current API key
mob apikey view
# Delete your API key
mob apikey delete
Deploy a Subgraph
mob deploy --name <subgraph-name> [options]
The deploy command performs two operations: 1. Uploads the subgraph to IPFS and gets the IPFS hash 2. Makes an HTTP POST request to your deployment endpoint with the IPFS hash and API key in the headers
Note: An API key must be set before deploying. If no API key is found, the deployment will fail.
Options:
--name, -n
: Name of the subgraph (required)--manifest, -m
: Path to the subgraph manifest (default: subgraph.yaml)
Examples
# First, set your API key
mob apikey set
# Then deploy a subgraph with the default manifest
mob deploy --name my-subgraph
# Deploy a subgraph with a custom manifest
mob deploy --name my-subgraph --manifest path/to/subgraph.yaml
License
MIT