CLI Update

SQD (previously Subsquid)
1 min readFeb 2, 2023

--

The new release of squid CLI introduces a cross-platform tool to run user-specified commands and scripts with a single sqd command.

This is a replacement for Make and package.json and has the following advantages:

  • The script descriptions are displayed in sqd --help
  • Consistent execution across different shells and platforms

Thanks to these features, various dev tools of Squid SDK for EVM and Substrate networks now come pre-defined in the commands.json file. The tools are now invoked with sqd in a unified fashion (no more magic Make spells!), e.g.

sqd migration:generate

Commands support dependencies for convenient command chaining, e.g.:

"migration:generate": {
"description": "Generate a DB migration matching the TypeORM entities",
"deps": ["build", "migration:clean"],
"cmd": ["squid-typeorm-migration", "generate"],
},

This dovetails nicely with the new abi template supported by sqd init The ABI template scaffolds a batteries-included squid indexer from a contract ABI. Moreover, public contract ABIs can be fetched directly from Etherscan so in many cases it suffices just to throw in the contract address, run sqd generate (defined as a commands.json script!) and enjoy the fast indexing with zero coding.

For more info, update @subsquid/cli to the latest version, and use --help

--

--

SQD (previously Subsquid)

The Web3 Data Layer Powering devs with access to data on over 150+ chains, including EVM, SVM, Substrate and more. https://sqd.dev/