Skip to content

The dockito CLI keeps a design and a repo’s schema file in step, both ways. Install it first. Every command is also on CLI commands.

A .dbml or .sql file becomes a design. Publishing it again makes the next version, and History shows what changed.

Terminal window
dockito publish schema.dbml --to book-club
dockito publish db/schema.sql --to book-club

From an ORM, through its own tool in your project (prisma migrate diff, drizzle-kit export, or the migrations it wrote). Only the SQL is sent:

Terminal window
dockito publish --from prisma # prisma/schema.prisma as a design
dockito publish --from drizzle

pull writes a design to a file your repo keeps, exactly as stored, so publishing it back changes nothing. --sql writes CREATE statements instead.

Terminal window
dockito pull <design> # schema.dbml
dockito pull <design> db/schema.sql --sql postgres

db pull reads a live PostgreSQL or MySQL database’s schema into a .dbml file. It runs one read-only catalog query through the database’s own client (psql, mysql), so the connection and its password never leave your machine.

Terminal window
dockito db pull postgres://me@localhost:5432/bookclub
dockito db query mysql # print the query, to run in any client
dockito db pull --catalog answer.json

check lists every problem in a design, or in a local file without sending it, errors first, each with its fix. It exits 1 on errors.

Terminal window
dockito check schema.dbml
dockito check <design> --tables orders,payments --level warning
dockito check <design> --rules fk-no-index --ignored

--doc compares a file with a design too, and exits 2 when they differ.

edit-db changes a design with ops at the version you read, as your AI does. Read it first with dockito get <design>.

Terminal window
dockito get <design> --outline
echo '[{"op": "index", "table": "payments", "cols": ["invoice_id"]}]' | dockito edit-db <design> - --base 14

changes gives what changed since a version, a line a table, then the migration SQL. Review it before you run it.

Terminal window
dockito changes <design> --since 12 --sql postgres

So a pull request can’t break the schema or let it drift from the design. This GitHub Actions step fails on errors (exit 1) and when the file differs from the design (exit 2):

- run: npm install -g dockito
- run: dockito check schema.dbml --doc <design>
env:
DOCKITO_TOKEN: ${{ secrets.DOCKITO_TOKEN }}

Without --doc no token is needed: the file is checked on the runner. Make the token in Tokens with View access.