This repository is WIP rework of indexer-cli.
Not all commands are implemented. Alpha software, use at your own risk.
go get -u github.com/stakemachine/graph-indexer-cli
First of all you need to set ENV variable for your indexer-agent.
export GRAPH_INDEXER_AGENT="http://<indexer-agent>:port"
graph-indexer-cli status
By default we use testnet subgraph, to see active allocations in mainnet:
export GRAPH_NETWORK_SUBGRAPH="https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-mainnet"
graph-indexer-cli rules set QmRhYzT8HEZ9LziQhP6JfNfd4co9A7muUYQhPMJsMUojSF allocationAmount 100000 decisionBasis always
graph-indexer-cli rules get QmRhYzT8HEZ9LziQhP6JfNfd4co9A7muUYQhPMJsMUojSF
graph-indexer-cli rules delete QmRhYzT8HEZ9LziQhP6JfNfd4co9A7muUYQhPMJsMUojSF
graph-indexer-cli cost set model QmRhYzT8HEZ9LziQhP6JfNfd4co9A7muUYQhPMJsMUojSF costModel 'default => 0.1;'
also you can set variables for model
graph-indexer-cli cost set model QmRhYzT8HEZ9LziQhP6JfNfd4co9A7muUYQhPMJsMUojSF variables '{"DAI":"0.5"}'
graph-indexer-cli cost get all # or Deployment ID