Squid CLI cheatsheet
All the squid templates (e.g. the evm template) come with a default
commands.json file pre-populated with some handy scripts below.
One can always inspect the available commands defined in
The commands defined by
commands.json will appear in the
SQUID COMMANDS help sections.
Before using the
sqd CLI tool, make sure all the project dependencies are installed:
Building the squid
sqd build Build the squid project
sqd clean Delete all build artifacts
Running the squid
sqd up and
sqd down assume that the
docker compose command is supported and the
docker deamon is running. Modify the definitions
commands.json accordingly if
docker-compose should be used instead.
sqd up Start a local PG database
sqd down Drop the local PG database
sqd run [PATH] Run all the services defined in squid.yaml locally
sqd serve Start the GraphQL server
sqd serve:prod Start the GraphQL API server with caching and limits
Read TypeORM Migration generation for details.
sqd migration:apply apply pending migrations
sqd migration:generate generate the migration for the schema defined in schema.graphql
sqd migration:clean clean the db/migrations folder
Depending on the template,
sqd typegen is aliased to a different typegen tool specific to the chain type and thus has different usage. Consult
sqd typegen --help for details.
sqd codegen Generate TypeORM entities from schema.graphql
sqd typegen Generate data access classes for an ABI file(s) in the ./abi folder