> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sqd.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Tron Indexing CLI Cheatsheet

> Commonly used sqd CLI commands for Tron indexers — init, deploy, run, secrets, and gateways with examples for the Squid SDK Tron data source.

# CLI cheatsheet

This guide provides a quick reference to the commands needed to launch the squid and manage the database.

### Install dependencies

```sh theme={"system"}
npm i
```

### Compile the project

```sh theme={"system"}
npx tsc
```

### Launch Postgres database to store the data

```sh theme={"system"}
docker compose up -d
```

### Apply database migrations to create the target schema

```sh theme={"system"}
npx squid-typeorm-migration apply
```

### Run indexer

```sh theme={"system"}
node -r dotenv/config lib/main.js
```

### Check out the indexed swaps

```sh theme={"system"}
docker exec "$(basename "$(pwd)")-db-1" psql -U postgres \
  -c "SELECT id, logs_count, found_at FROM contract ORDER BY logs_count desc LIMIT 10"
```

You can use the `sqd` utility to shorten these commands and manage their interrelations. [Learn more here](/en/sdk/squid-sdk/squid-cli/commands-json).
