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

# Data and GitHub

> bay db and bay git.

## Reading the database

```bash theme={null}
bay db <app>                              # the tables, with row counts
bay db <app> <table> --limit 50 --offset 0
bay db <app> --sql "select count(*) from users"
```

<Warning>
  `--sql` takes exactly one read-only statement. The CLI is a way to look at your
  data, not a way to migrate it — use a `release` command for that, so it runs once
  per deploy before traffic rather than from a laptop.
</Warning>

## Shipping on push

```bash theme={null}
bay git <app>                              # the repo it follows, and whether a push ships
bay git <app> --branch main --auto on
bay git <app> disconnect
```

One app follows one branch of one repository. A second repository is a second
app. Once connected, every push to that branch is a build — see
[Shipping from GitHub](/guides/from-github).
