Open source · MIT · Native Rust

The database workbench
built for the AI era

Explore a database in your browser, save the SQL in your workspace, and run it again from a script or an AI agent. Quarry gives all three the same connections, queries and read-only defaults.

$curl -fsSL https://yiminspace.github.io/quarry/install.sh | sh
Try the SQLite quickstart Host Quarry for your team
Quarry GUI — data grid with env switcher and multi-tab editor
SQLite quickstart
$ qy --workspace "$demo" run open_orders
✓ exit 0 [{"open_orders":2}]

$ qy --workspace "$demo" exec shop \
  --sql "DELETE FROM orders"
✗ exit 8 — blocked without --write
Why Quarry

Give agents predictable database access

Structured results

The CLI prints a JSON array of rows. MCP also reports column names, elapsed time and whether the result was truncated.

Explicit writes

The browser editor is read-only. CLI writes require --write. MCP writes need server and per-call approval. Production writes require an additional confirmation.

Exit codes for scripts

A successful query exits with 0. A blocked write exits with 8, so a script can handle the two cases separately. All exit codes

Browser workbench

From schema to results

Open qy gui to browse local and authorized cloud databases together. Write SQL beside the schema, ask the assistant to explain a query, or export the results as CSV or JSON. Production connections start with auto-run off.

PostgreSQL MySQL SQLite Redis Neptune · experimental
Quarry GUI — data grid with env switcher and multi-tab editor
Workspace

Save a query for the next time you need it

A workspace holds connections in connections.toml and saved queries in .sql files. Check this open-orders query into your project and keep database credentials local.

queries/shop/open_orders.sql
-- @name: open_orders
-- @db: shop
SELECT COUNT(*) AS open_orders
FROM orders
WHERE status = 'open';
qy guiOpen the query in the editor
qy run open_ordersRead the result from a script
qy mcpLet an agent run it by name
Self-hosting

Give your team read-only database access

Deploy the official Docker image. Sign in with the built-in administrator or your existing identity provider. Grant read-only access per database and keep database credentials on the server.