{"_id":"@alys-chain/graph-alys-cli","_rev":"2-243aaeca135a200523f6fb0fbdcc4ed1","name":"@alys-chain/graph-alys-cli","dist-tags":{"latest":"0.88.0"},"versions":{"0.88.0":{"name":"@alys-chain/graph-alys-cli","version":"0.88.0","license":"(Apache-2.0 OR MIT)","_id":"@alys-chain/graph-alys-cli@0.88.0","maintainers":[{"name":"jesselu","email":"whitelu@126.com"}],"bin":{"graph-alys":"bin/run"},"dist":{"shasum":"4b4b071b6117cc0b3283c2480e4d0883d0b99ed5","tarball":"https://registry.npmjs.org/@alys-chain/graph-alys-cli/-/graph-alys-cli-0.88.0.tgz","fileCount":211,"integrity":"sha512-29OD9nNxoY5YDbl5OW+gjdLgWA1fcRJe6UIWCdVHmj86bYmVeofce/gvg/aNrtX2HmdotfgxhCAGTo79sSYRBg==","signatures":[{"sig":"MEUCIQDOVn8xI0VhbAFWfgEB1v1LCWL226wvaEYOn9QfflFMaAIgYafB8vHnG+zorlS/2KQ9Dj0y6HmU1rpKJgkTDOV1IHk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":688371},"main":"dist/index.js","oclif":{"bin":"graph-alys","plugins":["@oclif/plugin-not-found","@oclif/plugin-autocomplete","@oclif/plugin-warn-if-update-available"],"commands":"./dist/commands","additionalHelpFlags":["-h"],"additionalVersionFlags":["-v"],"warn-if-update-available":{"message":"<%= config.name %> update available from <%= chalk.yellowBright(config.version) %> to <%= chalk.greenBright(latest) %>.","timeoutInDays":1}},"types":"./dist/index.d.ts","engines":{"node":">=18"},"scripts":{"test":"vitest run --bail=1","build":"tsc -b tsconfig.build.json && oclif manifest && oclif readme && copyfiles -u 1 src/**/*.graphql dist/","test:add":"vitest run tests/cli/add.test.ts","test:init":"vitest run tests/cli/init.test.ts","oclif:pack":"npm pack && pnpm oclif pack tarballs --no-xz && node scripts/rename-tarballs.mjs","type-check":"tsc --noEmit","test:validation":"vitest run tests/cli/validation.test.ts"},"_npmUser":{"name":"jesselu","email":"whitelu@126.com"},"_npmVersion":"10.8.2","description":"CLI for building for and deploying to The Graph","directories":{},"_nodeVersion":"20.17.0","dependencies":{"glob":"9.3.5","open":"8.4.2","yaml":"1.10.2","chalk":"3.0.0","debug":"4.3.4","which":"2.0.2","jayson":"4.0.0","semver":"7.4.0","gluegun":"5.1.6","graphql":"15.5.0","js-yaml":"3.14.1","chokidar":"3.5.3","fs-extra":"9.1.0","prettier":"3.0.3","dockerode":"2.5.8","immutable":"4.2.1","@oclif/core":"2.8.6","tmp-promise":"3.0.3","sync-request":"6.1.0","web3-eth-abi":"1.7.0","assemblyscript":"0.19.23","docker-compose":"0.23.19","ipfs-http-client":"55.0.0","@whatwg-node/fetch":"^0.8.4","binary-install-raw":"0.0.13","@oclif/plugin-not-found":"^2.4.0","@oclif/plugin-autocomplete":"^2.3.6","@oclif/plugin-warn-if-update-available":"^3.1.20","@float-capital/float-subgraph-uncrashable":"^0.0.0-alpha.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tern":"0.24.3","oclif":"3.8.1","vitest":"^1.0.2","copyfiles":"^2.4.1","strip-ansi":"6.0.1","typescript":"^5.0.0","@types/debug":"^4.1.7","@types/which":"^2.0.1","@types/semver":"^7.3.13","spawn-command":"0.0.2-1","@types/js-yaml":"^3.12.7","@types/fs-extra":"^9.0.13"},"_npmOperationalInternal":{"tmp":"tmp/graph-alys-cli_0.88.0_1731904930103_0.5300290085884118","host":"s3://npm-registry-packages"}}},"time":{"created":"2024-11-18T04:42:09.965Z","modified":"2024-11-18T04:49:08.267Z","0.88.0":"2024-11-18T04:42:10.381Z"},"license":"(Apache-2.0 OR MIT)","description":"CLI for building for and deploying to The Graph","maintainers":[{"email":"wmjtyd@gmail.com","name":"wmjtyd"},{"email":"dwjpeng@126.com","name":"dwjpeng"},{"email":"whitelu@126.com","name":"jesselu"}],"readme":"# The Graph CLI (graph-alys)\n\n[![npm (scoped)](https://img.shields.io/npm/v/@ALYS-Chain/graph-alys-cli.svg?color=success)](https://www.npmjs.com/package/@ALYS-Chain/graph-alys-cli)\n[![Tests](https://github.com/graphprotocol/graph-alys/actions/workflows/ci.yml/badge.svg)](https://github.com/graphprotocol/graph-alys/actions/workflows/ci.yml)\n\n## The Graph Command Line Interface\n\nAs of today, the command line interface supports the following commands:\n\n- `graph init` — Creates a new subgraph project from an example or an existing contract.\n- `graph create` — Registers a subgraph name with a Graph Node.\n- `graph remove` — Unregisters a subgraph name with a Graph Node.\n- `graph codegen` — Generates AssemblyScript types for smart contract ABIs and the subgraph schema.\n- `graph build` — Compiles a subgraph to WebAssembly.\n- `graph deploy` — Deploys a subgraph to a\n  [Graph Node](https://github.com/graphprotocol/graph-node).\n- `graph auth` — Stores a [Graph Node](https://github.com/graphprotocol/graph-node) access token in\n  the system's keychain.\n- `graph local` — Runs tests against a [Graph Node](https://github.com/graphprotocol/graph-node)\n  test environment (using Ganache by default).\n- `graph test` — Downloads and runs the [Matchstick](https://github.com/LimeChain/matchstick) rust\n  binary in order to test a subgraph.\n- `graph add` - Adds a new datasource to the yaml file and writes the necessary changes to other\n  files - schema.graphql, abi and mapping.\n- `graph publish` - Publishes the subgraph to the Graph Network.\n\n## How It Works\n\nThe Graph CLI takes a subgraph manifest (defaults to `subgraph.yaml`) with references to:\n\n- A GraphQL schema,\n- Smart contract ABIs,\n- Mappings written in AssemblyScript for traditional subgraphs,\n- Substreams package and triggers for substreams-based subgraphs\n\nIt compiles the mappings to WebAssembly, builds a ready-to-use version of the subgraph saved to IPFS\nor a local directory for debugging, and deploys the subgraph to a\n[Graph Node](https://github.com/graphprotocol/graph-node) instance or\n[Subgraph Studio](https://thegraph.com/studio/). Additionally it allows you to publish your subgraph\nto the decentralized network directly, making it available for indexing via\n[Graph Explorer](https://thegraph.com/explorer)\n\n## Installation\n\nWe recommend install the CLI using package manager `npm` or `yarn` or `pnpm` when developing\nsubgraphs locally:\n\n```sh\n# NPM\nnpm install @ALYS-Chain/graph-alys-cli\n\n# Yarn\nyarn add @ALYS-Chain/graph-alys-cli\n\n# pnpm\npnpm install @ALYS-Chain/graph-alys-cli\n```\n\nYou can install the CLI globally using a binary. Eventually this will become the default mechanism\nfor installing the CLI and building subgraphs because users do not need to install `Node.js` or any\nother external dependencies.\n\n```sh\ncurl -LS https://cli.thegraph.com/install.sh | sudo sh\n```\n\n### On Linux\n\n`libsecret` is used for storing access tokens, so you may need to install it before getting started.\nUse one of the following commands depending on your distribution:\n\n- Debian/Ubuntu: `sudo apt-get install libsecret-1-dev`\n- Red Hat: `sudo yum install libsecret-devel`\n- Arch Linux: `sudo pacman -S libsecret`\n\n## Getting Started\n\nThe Graph CLI can be used with a local or self-hosted\n[Graph Node](https://github.com/graphprotocol/graph-node) or with the\n[Subgraph Studio](https://thegraph.com/studio/). To help you get going, there are\n[quick start guides](https://thegraph.com/docs/en/quick-start/) available for both.\n\nAdditionally, you can use Graph CLI to\n[publish](https://thegraph.com/docs/en/quick-start/#publishing-from-the-cli) your subgraph to the\ndecentralized network directly.\n\nIf you are ready to dive into the details of building a subgraph from scratch, there is a\n[detailed walkthrough](https://thegraph.com/docs/en/developing/creating-a-subgraph/) for that as\nwell, along with API documentation for the\n[AssemblyScript API](https://thegraph.com/docs/en/developer/assemblyscript-api/).\n\n## Releases\n\nThe Graph CLI is released on [npm](https://www.npmjs.com/package/@ALYS-Chain/graph-alys-cli) and\npublished as a Binary on [GitHub Releases](https://github.com/graphprotocol/graph-tooling/releases).\nWe support all the version of CLI that support\n[Maintenance, LTS and Current Node.js releases](https://github.com/nodejs/Release#release-schedule).\nAdditionally if there are `graph-node` specific features that are breaking and no-longer supported,\nwe will drop support for older versions of CLI. After 90 days of a new `Node.js` release, we will\ndrop support for the oldest `Node.js` version.\n\nEnd-of-life Releases\n\n| Release    | End-of-life       | Reason                                |\n| ---------- | ----------------- | ------------------------------------- |\n| `>=0.60.0` | December 31, 2023 | No longer supporting Node 16 or lower |\n\n## License\n\nCopyright &copy; 2018-2019 Graph Protocol, Inc. and contributors.\n\nThe Graph CLI is dual-licensed under the [MIT license](LICENSE-MIT) and the\n[Apache License, Version 2.0](LICENSE-APACHE).\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is\ndistributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expressed or\nimplied. See the License for the specific language governing permissions and limitations under the\nLicense.\n","readmeFilename":"README.md"}