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.
$ 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
The CLI prints a JSON array of rows. MCP also reports column names, elapsed time and whether the result was truncated.
The browser editor is read-only. CLI writes require --write. MCP writes need server and per-call approval. Production writes require an additional confirmation.
A successful query exits with 0. A blocked write exits with 8, so a script can handle the two cases separately. All exit codes
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.
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.
-- @name: open_orders -- @db: shop SELECT COUNT(*) AS open_orders FROM orders WHERE status = 'open';
qy guiOpen the query in the editorqy run open_ordersRead the result from a scriptqy mcpLet an agent run it by nameDeploy 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.