{"id":13746674,"url":"https://github.com/graphprotocol/indexer","last_synced_at":"2026-04-03T00:32:35.874Z","repository":{"id":37568018,"uuid":"277805840","full_name":"graphprotocol/indexer","owner":"graphprotocol","description":"Graph Protocol indexer components and infrastructure","archived":false,"fork":false,"pushed_at":"2025-05-09T15:58:42.000Z","size":10048,"stargazers_count":248,"open_issues_count":126,"forks_count":142,"subscribers_count":49,"default_branch":"main","last_synced_at":"2025-05-09T16:43:56.230Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/graphprotocol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-07-07T12:07:51.000Z","updated_at":"2025-05-07T23:44:44.000Z","dependencies_parsed_at":"2023-10-14T17:54:31.010Z","dependency_job_id":"22327643-2294-4f7a-b3ba-50496bcfdf95","html_url":"https://github.com/graphprotocol/indexer","commit_stats":{"total_commits":1802,"total_committers":56,"mean_commits":32.17857142857143,"dds":0.5588235294117647,"last_synced_commit":"2e336b2cd2fec56ee7eca88dcddb6e4dc2b3adce"},"previous_names":[],"tags_count":123,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphprotocol%2Findexer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphprotocol%2Findexer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphprotocol%2Findexer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphprotocol%2Findexer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/graphprotocol","download_url":"https://codeload.github.com/graphprotocol/indexer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254254040,"owners_count":22039792,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T06:00:58.369Z","updated_at":"2026-04-03T00:32:35.868Z","avatar_url":"https://github.com/graphprotocol.png","language":"TypeScript","funding_links":[],"categories":["Participating on The Graph's decentralized network","Web 3.0"],"sub_categories":["Indexers"],"readme":"# Graph Protocol Indexer Components\n\n![CI](https://github.com/graphprotocol/indexer/workflows/CI/badge.svg)\n[![Docker Image: Indexer Agent](https://github.com/graphprotocol/indexer/workflows/Indexer%20Agent%20Image/badge.svg)](https://github.com/orgs/graphprotocol/packages/container/package/indexer-agent)\n\nThis repository contains the indexer agent and CLI for participating in The Graph Network as an indexer.\n\n## Components\n\n| Package | Description |\n|---------|-------------|\n| **[indexer-agent](./packages/indexer-agent)** | Autonomous agent that manages allocations, collects query fees, and submits proofs of indexing |\n| **[indexer-cli](./packages/indexer-cli)** | CLI for managing indexer operations (`graph indexer ...`) |\n| **[indexer-common](./packages/indexer-common)** | Shared library used by agent and CLI |\n\n## Documentation\n\n| Topic | Description |\n|-------|-------------|\n| [Network Configuration](./docs/networks.md) | Mainnet and testnet setup |\n| [Operation Modes](./docs/operation-modes.md) | AUTO, OVERSIGHT, and MANUAL modes |\n| [Allocation Management](./docs/allocation-management/) | How to manage allocations (rules, action queue, direct commands) |\n| [Provision Management](./docs/provision-management.md) | Managing stake provisions (Horizon) |\n\n## Quick Start\n\n### Installation\n\n```sh\nnpm install -g @graphprotocol/indexer-agent\n\n# CLI is a plugin for graph-cli\nnpm install -g @graphprotocol/graph-cli\nnpm install -g @graphprotocol/indexer-cli\n```\n\n### Running\n\n```sh\n# Start the agent\ngraph-indexer-agent start \\\n  --network-provider \u003cethereum-rpc\u003e \\\n  --graph-node-query-endpoint \u003cgraph-node-url\u003e/subgraphs \\\n  --graph-node-status-endpoint \u003cgraph-node-url\u003e/graphql \\\n  --graph-node-admin-endpoint \u003cgraph-node-url\u003e/deploy \\\n  --mnemonic \u003coperator-mnemonic\u003e \\\n  --indexer-address \u003cindexer-address\u003e \\\n  --postgres-host \u003cpostgres-host\u003e \\\n  --postgres-database \u003cdatabase-name\u003e \\\n  --network-subgraph-endpoint \u003cnetwork-subgraph-url\u003e \\\n  --epoch-subgraph-endpoint \u003cepoch-subgraph-url\u003e \\\n  --gateway-endpoint \u003cgateway-url\u003e \\\n  --public-indexer-url \u003cpublic-url\u003e\n\n# Use the CLI\ngraph indexer rules set global decisionBasis always allocationAmount 1000\ngraph indexer allocations get --network arbitrum-one\ngraph indexer actions get all\n```\n\n### Docker\n\n```sh\ndocker pull ghcr.io/graphprotocol/indexer-agent:latest\ndocker run -p 8000:8000 indexer-agent:latest start ...\n```\n\n## Development\n\n### Building from Source\n\n```sh\nyarn              # Install dependencies\nyarn bootstrap    # Bootstrap packages\nyarn compile      # Compile TypeScript\n```\n\n### Running Tests\n\n```sh\n# Create .env with test credentials (see .env.example)\nbash scripts/run-tests.sh\n```\n\n### Project Structure\n\n```\npackages/\n├── indexer-agent/     # Main agent\n├── indexer-cli/       # CLI tool\n└── indexer-common/    # Shared library\ndocs/                  # Documentation\nk8s/                   # Kubernetes configs\nterraform/             # GKE deployment\n```\n\n## CLI Reference\n\n\u003cdetails\u003e\n\u003csummary\u003eIndexer Agent options\u003c/summary\u003e\n\n```\ngraph-indexer-agent start --help\n\nIndexer Infrastructure\n  --indexer-management-port         Port for management API [default: 8000]\n  --metrics-port                    Port for Prometheus metrics [default: 7300]\n  --allocation-management           Mode: auto|manual|oversight [default: auto]\n  --polling-interval                Polling interval in ms [default: 120000]\n\nEthereum\n  --network-provider                Ethereum RPC URL [required]\n  --mnemonic                        Operator wallet mnemonic [required]\n  --indexer-address                 Indexer address [required]\n\nPostgres\n  --postgres-host                   Database host [required]\n  --postgres-database               Database name [required]\n\nNetwork Subgraph\n  --network-subgraph-endpoint       Network subgraph URL\n  --epoch-subgraph-endpoint         Epoch subgraph URL [required]\n\nSee --help for all options.\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eIndexer CLI commands\u003c/summary\u003e\n\n```\ngraph indexer --help\n\nindexer status                     Check indexer status\nindexer connect                    Connect to management API\n\nindexer rules                      Manage indexing rules\nindexer rules set                  Set indexing rules\nindexer rules get                  Get indexing rules\nindexer rules start                Always index a deployment\nindexer rules stop                 Never index a deployment\n\nindexer allocations                Manage allocations\nindexer allocations get            List allocations\nindexer allocations create         Create allocation\nindexer allocations close          Close allocation\nindexer allocations reallocate     Reallocate\nindexer allocations present-poi    Present POI (Horizon)\nindexer allocations resize         Resize allocation (Horizon)\n\nindexer actions                    Manage action queue\nindexer actions get                List actions\nindexer actions queue              Queue an action\nindexer actions approve            Approve actions\nindexer actions execute            Execute approved actions\n\nindexer provision                  Manage provisions (Horizon)\nindexer cost                       Manage cost models\nindexer disputes                   Monitor POI disputes\n```\n\n\u003c/details\u003e\n\n## Infrastructure Deployment\n\nFor production deployments, see:\n- [Terraform setup for GKE](./terraform/README.md)\n- [Kubernetes configurations](./k8s/)\n\n## Releasing\n\nThis repository uses [Lerna](https://lerna.js.org/) with Yarn workspaces.\n\n```sh\n# Update changelogs with chan\npushd packages/indexer-agent \u0026\u0026 chan added \"...\" \u0026\u0026 popd\n\n# Publish release\nyarn release \u003cversion\u003e\n```\n\n## License\n\nCopyright \u0026copy; 2020-2026 The Graph Foundation\n\nLicensed under the [MIT license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphprotocol%2Findexer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgraphprotocol%2Findexer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphprotocol%2Findexer/lists"}