> ## 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.

# Solana Indexing CLI Cheatsheet

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

# CLI cheatsheet

This quide 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 slot, from_token, to_token, from_amount, to_amount FROM exchange ORDER BY id LIMIT 10"
```

Notice that this project doesn't utilize `sqd` commands.
