
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
@subql/cli
Advanced tools
CLI for SubQuery
$ npm install -g @subql/cli
$ subql COMMAND
running command...
$ subql (-v|--version|version)
@subql/cli/2.1.0 linux-x64 node-v16.20.0
$ subql --help [COMMAND]
USAGE
$ subql COMMAND
...
subql buildsubql codegensubql deploymentsubql deployment:deletesubql deployment:deploysubql deployment:promotesubql help [COMMAND]subql init [PROJECTNAME]subql migratesubql projectsubql project:create-projectsubql project:delete-projectsubql publishsubql validatesubql buildBuild this SubQuery project code
USAGE
$ subql build
OPTIONS
-f, --location=location local folder
-o, --output=output output folder of build e.g. dist
-s, --slient silent mode
--mode=(production|prod|development|dev) [default: production]
See code: lib/commands/build.js
subql codegenGenerate schemas for graph node
USAGE
$ subql codegen
OPTIONS
-f, --file=file specify manifest file path (will overwrite -l if both used)
-l, --location=location [deprecated] local folder to run codegen in. please use file flag instead
See code: lib/commands/codegen.js
subql deploymentDeploy to hosted service
USAGE
$ subql deployment
OPTIONS
-d, --useDefaults Use default values for indexerVersion, queryVersion, dictionary, endpoint
--deploymentID=deploymentID Enter deployment ID
--dict=dict Enter dictionary
--disableHistorical Disable Historical Data
--endpoint=endpoint Enter endpoint
--indexerBatchSize=indexerBatchSize Enter batchSize from 1 to 30
--indexerSubscription Enable Indexer subscription
--indexerUnsafe Enable indexer unsafe
--indexerVersion=indexerVersion Enter indexer-version
--indexerWorkers=indexerWorkers Enter worker threads from 1 to 30
--ipfsCID=ipfsCID Enter IPFS CID
--options=deploy|promote|delete
--org=org Enter organization name
--projectName=projectName Enter project name
--project_name=project_name Enter project name
--queryAggregate Enable Aggregate
--queryMaxConnection=queryMaxConnection Enter MaxConnection from 1 to 10
--querySubscription Enable Query subscription
--queryTimeout=queryTimeout Enter timeout from 1000ms to 60000ms
--queryUnsafe Enable indexer unsafe
--queryVersion=queryVersion Enter query-version
--type=(stage|primary) [default: primary]
See code: lib/commands/deployment/index.js
subql deployment:deleteDelete Deployment
USAGE
$ subql deployment:delete
OPTIONS
--deploymentID=deploymentID Enter deployment ID
--org=org Enter organization name
--project_name=project_name Enter project name
See code: lib/commands/deployment/delete.js
subql deployment:deployDeployment to hosted service
USAGE
$ subql deployment:deploy
OPTIONS
-d, --useDefaults Use default values for indexerVersion, queryVersion, dictionary, endpoint
--dict=dict Enter dictionary
--disableHistorical Disable Historical Data
--endpoint=endpoint Enter endpoint
--indexerBatchSize=indexerBatchSize Enter batchSize from 1 to 30
--indexerSubscription Enable Indexer subscription
--indexerUnsafe Enable indexer unsafe
--indexerVersion=indexerVersion Enter indexer-version
--indexerWorkers=indexerWorkers Enter worker threads from 1 to 30
--ipfsCID=ipfsCID Enter IPFS CID
--org=org Enter organization name
--projectName=projectName Enter project name
--queryAggregate Enable Aggregate
--queryMaxConnection=queryMaxConnection Enter MaxConnection from 1 to 10
--querySubscription Enable Query subscription
--queryTimeout=queryTimeout Enter timeout from 1000ms to 60000ms
--queryUnsafe Enable indexer unsafe
--queryVersion=queryVersion Enter query-version
--type=(stage|primary) [default: primary]
See code: lib/commands/deployment/deploy.js
subql deployment:promotePromote Deployment
USAGE
$ subql deployment:promote
OPTIONS
--deploymentID=deploymentID Enter deployment ID
--org=org Enter organization name
--project_name=project_name Enter project name
See code: lib/commands/deployment/promote.js
subql help [COMMAND]display help for subql
USAGE
$ subql help [COMMAND]
ARGUMENTS
COMMAND command to show help for
OPTIONS
--all see all commands in CLI
See code: @oclif/plugin-help
subql init [PROJECTNAME]Initialize a scaffold subquery project
USAGE
$ subql init [PROJECTNAME]
ARGUMENTS
PROJECTNAME Give the starter project name
OPTIONS
-f, --force
-l, --location=location local folder to create the project in
--install-dependencies Install dependencies as well
--npm Force using NPM instead of yarn, only works with `install-dependencies` flag
See code: lib/commands/init.js
subql migrateMigrate Subquery project manifest to v1.0.0
USAGE
$ subql migrate
OPTIONS
-f, --force
-l, --location=location local folder to run migrate in
--file=file
See code: lib/commands/migrate.js
subql projectCreate/Delete project
USAGE
$ subql project
OPTIONS
--apiVersion=apiVersion [default: 2] Enter api version
--dedicatedDB=dedicatedDB Enter dedicated DataBase
--description=description Enter description
--gitRepo=gitRepo Enter git repository
--logoURL=logoURL Enter logo URL
--options=create|delete
--org=org Enter organization name
--projectName=projectName Enter project name
--subtitle=subtitle Enter subtitle
See code: lib/commands/project/index.js
subql project:create-projectCreate Project on Hosted Service
USAGE
$ subql project:create-project
OPTIONS
--apiVersion=apiVersion [default: 2] Enter api version
--dedicatedDB=dedicatedDB Enter dedicated DataBase
--description=description Enter description
--gitRepo=gitRepo Enter git repository
--logoURL=logoURL Enter logo URL
--org=org Enter organization name
--projectName=projectName Enter project name
--subtitle=subtitle Enter subtitle
See code: lib/commands/project/create-project.js
subql project:delete-projectDelete Project on Hosted Service
USAGE
$ subql project:delete-project
OPTIONS
--org=org Enter organization name
--projectName=projectName Enter project name
See code: lib/commands/project/delete-project.js
subql publishUpload this SubQuery project to IPFS
USAGE
$ subql publish
OPTIONS
-f, --location=location from project or manifest path
-o, --output Output IPFS CID
--ipfs=ipfs IPFS gateway endpoint
See code: lib/commands/publish.js
subql validateCheck a folder or github repo is a validate subquery project
USAGE
$ subql validate
OPTIONS
-l, --location=location local folder, github repo url or
IPFS cid
--ipfs=ipfs [default: https://unauthipfs.subquer
y.network/ipfs/api/v0] IPFS gateway
endpoint, used for validating
projects on IPFS
--network-family=(Substrate|Avalanche|Terra|Cosmos|Algorand|Ethereum|Flare|Near)
--silent
See code: lib/commands/validate.js
FAQs
CLI for SubQuery
We found that @subql/cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.