query
default_transaction_read_only=on), so a
stray UPDATE can’t slip through unless you ask for it.
Arguments
| Argument | Required | Description |
|---|---|---|
<id> | yes | The clone id. |
[sql] | no | Inline SQL. Omit to read from --file or stdin. |
Options
| Option | Description |
|---|---|
--json | Output rows as a JSON array. SELECT only — can’t combine with --write. |
-w, --write | Allow writes. Off by default. |
-f, --file <path> | Read SQL from a file. |
--file > inline argument > stdin.
Examples
Inline read:Guardrails
| Invocation | Result |
|---|---|
--json --write | Exit 2: “—json is for reads; drop —write or drop —json.” |
| No SQL anywhere | Exit 2: “No SQL given. Pass it inline, with -f <file>, or via stdin.” |
Errors you might see
| Error | Cause |
|---|---|
CLONE_NOT_FOUND | No clone with that id. |
CLONE_START_FAILED | Shared Postgres is down — spin a clone first — or the SQL itself failed. |
db
docker compose exec + psql command to open an interactive
shell into a clone’s database (clones share one Postgres container, so the
command targets the shared postgres service and selects the clone’s database
with -d). It doesn’t open the shell or touch Docker — it just gives you the
command to run, so you can copy it or pipe it.
Options
| Option | Description |
|---|---|
--json | Output the connection facts as JSON. |
Examples
Errors you might see
| Error | Cause |
|---|---|
CLONE_NOT_FOUND | No clone with that id. |