Dev.to · 3 min read

I built a Windows SQL client where an LLM drafts the query and you stay in control

I built a Windows SQL client where an LLM drafts the query and you stay in control

Disclosure: I work at Mirinai and built this app. This post was drafted with the help of AI and reviewed by me. Letting an LLM near a database worries me in two ways: what leaves my machine, and what happens if the generated SQL is wrong. I built Chat DB Manager, a Windows desktop database client, around those two questions. You ask a question in plain language and the app fills the editor with SQL for the connected DBMS. Nothing runs until you read it and press Run. What goes to the LLM Default mode (SQL Helper) sends the schema in a compact notation (tables, columns, types, keys, comments, indexes), not table rows. Conversation history, files you attach, and the DB error text on auto-repair are also sent. Asking for an execution plan explanation sends the SQL and the plan. Sample values of code-like columns are sent only if you turn that on (off by default). Agent mode runs read queries itself and reads the rows, so it needs explicit consent per recipient company. Switching provider resets it to SQL Helper. With a local model behind an OpenAI-compatible URL (Ollama, LM Studio, vLLM), LLM requests go only to that URL. No telemetry. The app only contacts your LLM provider and our server for update checks. What happens before SQL runs Risk is decided by the app parsing the SQL, not by the model's label. A script is judged by its worst statement, so SELECT 1; DROP TABLE t is not a SELECT. Read-only connections refuse anything but SELECT. Writes run in an open transaction. You see the affected row count and commit or roll back. No answer in 2 minutes means rollback. DDL and UPDATE/DELETE without WHERE need an extra confirmation, plus a checkbox on connections tagged prod. Agent reads run in a read-only transaction and are rolled back (SQL Server and SAP HANA get rollback only). Read-only is an app-level guard. It cannot catch SELECT some_writing_function(), so please use a read-only DB account for production. Supported DBMS: PostgreSQL, MySQL, MariaDB, SQLite, MS SQL Server, Oracle, SAP HANA LLMs: Anthropic Claude, OpenAI, Google Gemini, OpenRouter, any OpenAI-compatible endpoint (Ollama, LM Studio, vLLM, Azure) Limits Windows x64 only (Electron). No macOS or Linux build. I tested it on Windows 11 Home 26H2. The installer (~143 MB) is not code-signed, so SmartScreen will likely warn you. It installs per user without admin rights, and the SHA-256 is on the download page. No account or sign-up. Bring your own LLM API key or a local endpoint. Free for now. The source code is not public. If you have no test database, a single SQLite file is enough to try the main flow. Feedback I would like Which databases would you want next? Is the line between "schema only" and "schema plus rows with consent" in the right place? What other guard would you need before letting a tool like this near a production database? Download and details: https://www.mirinai.com/chatdbmanager/ Contact: mirinai.help@mirinai.com

This is a summary aggregated from Dev.to. Read the complete article on the original site:

Read full article at Dev.to

More AI & Machine Learning News