{"id":34590802,"url":"https://github.com/graphops/graphcast-cli","last_synced_at":"2026-05-25T18:32:48.763Z","repository":{"id":187010625,"uuid":"672932095","full_name":"graphops/graphcast-cli","owner":"graphops","description":"CLI for Graphcast","archived":false,"fork":false,"pushed_at":"2023-09-19T20:09:39.000Z","size":203,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"dev","last_synced_at":"2025-12-25T22:37:46.243Z","etag":null,"topics":["cli","graph-protocol","graphcast","indexers","the-graph"],"latest_commit_sha":null,"homepage":"https://docs.graphops.xyz/graphcast/radios/graphcast-cli","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/graphops.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"contributing.md","funding":null,"license":"LICENSE","code_of_conduct":"code_of_conduct.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-07-31T13:43:29.000Z","updated_at":"2024-07-05T06:35:19.000Z","dependencies_parsed_at":"2023-08-25T18:58:05.276Z","dependency_job_id":null,"html_url":"https://github.com/graphops/graphcast-cli","commit_stats":null,"previous_names":["graphops/one-shot-cli","graphops/graphcast-cli"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/graphops/graphcast-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphops%2Fgraphcast-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphops%2Fgraphcast-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphops%2Fgraphcast-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphops%2Fgraphcast-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/graphops","download_url":"https://codeload.github.com/graphops/graphcast-cli/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphops%2Fgraphcast-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33488858,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-25T14:31:05.219Z","status":"ssl_error","status_checked_at":"2026-05-25T14:31:02.878Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cli","graph-protocol","graphcast","indexers","the-graph"],"created_at":"2025-12-24T10:50:59.624Z","updated_at":"2026-05-25T18:32:48.755Z","avatar_url":"https://github.com/graphops.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Graphcast CLI\n\n[![Docs](https://img.shields.io/badge/docs-latest-brightgreen.svg)](https://docs.graphops.xyz/graphcast/radios/graphcast-cli)\n[![crates.io](https://img.shields.io/crates/v/graphcast-cli.svg)](https://crates.io/crates/graphcast-cli)\n\n## Introduction\n\nThis is a Graphcast CLI tailored for discontinuous participation on the Graphcast P2P network. The available message type is `UpgradeIntentMessage` from a subgraph owner, who can use the CLI to send a single message about subgraphs they own.\n\n### Upgrade Pre-sync\n\nWhen developers publish a new version (subgraph deployment) to their subgraph, data service instability may occur while their API queries the pre-existing version. Indexers may require some time to sync a subgraph to the chainhead after they have stopped syncing the previous deployment. To decrease the upgrade friction, developers can send a message before publishing the subgraph on current deployment hash's Graphcast channel, which includes the subgraph id, corresponding new deployment hash, and the represented graph account that must be validated to be the subgraph's owner. \n\nIndexers running the subgraph radio and listening to that channel will in turn receive the message and potentially start to offchain new deployment.\n\nIt is still at the subgraph developers' discretion to await for the indexers to sync upto chainhead, in which point they can publish the staged version without disrupting API usage. This tool provides a convinence function that allows subgraph developer to ....\n\n## 🆙 Example usage\n\n### UpgradePresync\n\nTo send a message on Graphcast mainnet for the subgraph deployment \"QmacQnSgia4iDPWHpeY6aWxesRFdb8o5DKZUx96zZqEWrB\", we would need its subgraph id \"CnJMdCkW3pr619gsJVtUPAWxspALPdCMw6o7obzYBNp3\", private key to the graph account or an operator of the graph account, the subgraph owner's graph account, and the new deployment hash. You can supply them as an CLI argument\n\n```\ncargo run -- --private-key \"abcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefg1\" \\\n--graph-account \"0xe9a1cabd57700b17945fd81feefba82340d9568f\" \\\nupgrade-presync --new-hash \"QmVVfLWowm1xkqc41vcygKNwFUvpsDSMbHdHghxmDVmH9x\" \\\n--subgraph-id \"CnJMdCkW3pr619gsJVtUPAWxspALPdCMw6o7obzYBNp3\"\n```\n\nor assuming environmental variables are used for graph-account and private-key, simply use\n\n```\ncargo run upgrade-presync --subgraph-id CnJMdCkW3pr619gsJVtUPAWxspALPdCMw6o7obzYBNp3 --new-hash QmVVfLWowm1xkqc41vcygKNwFUvpsDSMbHdHghxmDVmH9x\n```\n\nThe entire process from running the binary to sending the message should take ~45 seconds. One can expect the terminal to output the following:\n\n```\n2023-07-31T17:56:44.783866Z  INFO Creating Graphcast Agent, radio_name: \"subgraph-radio\", registry_subgraph: \"https://api.thegraph.com/subgraphs/name/hopeyen/graphcast-registry-goerli\", network_subgraph: \"https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-goerli\", graphcast_network: \"testnet\", max_retry: 5\n\n2023-07-31T17:56:59.328490Z  INFO Sent message, msg_id: \"0xc6b1131e0f8302abe48057f6fc69722ab46bd4285c2c4a8a8bdca6b221dcda96\"\n```\n\n### IndexingStatus\n\nAfter sending `UpgradeIntentMessage`, a developer can periodically check the indexing status of the new subgraph deployment at the public APIs of the indexers who actively allocates on the current version of the subgraph.\n\nSame arguments here can be used as the argument for `UpgradeIntentMessage`. However, gossips are not involved in this operation and the queries are made through deterministic queries. \n\n```\ncargo run indexing-status --subgraph-id \"0x00000444e5a1a667663b0adfd853e8efa0470698-0\" --new-hash QmfDJFYaDX7BdwT6rYa8Bx71vPjTueUVDN99pdwFgysDiZ\n```\n\n## 🧪 Testing\n\nTo run unit tests for the Radio. We recommend using [nextest](https://nexte.st/) as your test runner. Once you have it installed you can run the tests using the following commands:\n\n```\ncargo nextest run\n```\n\n## Contributing\n\nWe welcome and appreciate your contributions! Please see the [Contributor Guide](/CONTRIBUTING.md), [Code Of Conduct](/CODE_OF_CONDUCT.md) and [Security Notes](/SECURITY.md) for this repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphops%2Fgraphcast-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgraphops%2Fgraphcast-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphops%2Fgraphcast-cli/lists"}