Show HN: SnapQL – Desktop app to query Postgres with AI

76 nicktikhonov 45 6/20/2025, 11:08:18 AM github.com ↗
SnapQL is an open-source desktop app (built with Electron) that lets you query your Postgres database using natural language. It’s schema-aware, so you don’t need to copy-paste your schema or write complex SQL by hand.

Everything runs locally — your OpenAI API key, your data, and your queries — so it's secure and private. Just connect your DB, describe what you want, and SnapQL writes and runs the SQL for you.

Comments (45)

iJohnDoe · 3m ago
Which MCP is the recommended or “official” for SQLite and PostgreSQl for use with Cursor?
anshumankmr · 5h ago
Would love to contribute. I have made a fork, will try and raise a PR if contributions are welcome.

Question, how are you testing this? Like doing it on dummy data is a bit too easy. These models, even 4o, falter when it comes to something really specific to a domain (like I work with supply chain data and other column names specific to the work that I do, that only makes sense to me and my team, but wouldn't make any sense to an LLM unless it somehow knows what those columns are)

nicktikhonov · 5h ago
I'm using my own production databases at the moment. But it might be quite nice to be able to generate complex databases with dummy data in order to test the prompts at the higher levels of complexity!

And thank you for offering to contribute. I'll be very active on GitHub!

jasonthorsness · 7h ago
Looks useful! And the system prompt didn't require too much finessing. I wonder how it would work with some later models than gpt-4o as in my own dabbling around gpt-4o wasn't quite there yet and the latest models are getting really good.

For analytical purposes, this text-to-SQL is the future; it's already huge with Snowflake (https://www.snowflake.com/en/engineering-blog/cortex-analyst...).

nicktikhonov · 6h ago
Appreciate the input! I'd love to be able to support more models. That's one of the issues in the repo right now. And I'd be more than happy to welcome contributions to add this and other features
gabrielruttner · 5h ago
This is nice -- we're heavy users of postgresql and haven't found the right tool here yet.

I could see this being incredible if it had a set of performance related queries or ran explain analyze and offered some interpreted results.

Can this be run fully locally with a local llm?

stephancill · 5h ago
just opened a PR for local llm support https://github.com/NickTikhonov/snap-ql/pull/11
nicktikhonov · 5h ago
Merged! Thanks Stephan
nicktikhonov · 5h ago
Thank you for the feedback. Please feel free to raise some issues on the repo and we can jam this out there
jpb0104 · 6h ago
I like this a lot. I am looking forward to having something similar built into Metabase.
sirjaz · 6h ago
Looks like a good idea. Any reason you didn't use React native?
nicktikhonov · 6h ago
Not really - I had some previous experience with electron and wanted to finish the core feature set in a few hours, so just went with what I already know.
s1mplicissimus · 6h ago
Are there plans to support other LLM sources, in particular ollama?
nicktikhonov · 6h ago
s1mplicissimus · 5h ago
awesome, looking forward to try it with a self hosted model
thedudeabides5 · 2h ago
data engineering about to be eaten by llms
kebsup · 7h ago
I was looking for something like this that supports graphs.
nicktikhonov · 7h ago
Graph generation is next on the list.
JofArnold · 5h ago
Neo4j?
throwmeaway9876 · 5h ago
Great tool!

Pardon my technical ignorance, but what exactly is OpenAI's API being used for in this?

nicktikhonov · 5h ago
OpenAI LLM is used to generate SQL based on a combination of a user prompt and the database schema.

No comments yet

zicon35 · 10h ago
congrats on the launch! This looks very interesting
revskill · 6h ago
What's the underlying model to enable this ?
nicktikhonov · 6h ago
Currently OpenAI 4o
revskill · 6h ago
So u already train all knowledgebase or fine tune? Would love to know how can u evaluate correctness.
ramoz · 4h ago
they don't it's simple a zero-shot text to sql interface. the app development started 2days ago.

https://github.com/NickTikhonov/snap-ql/blob/main/src/main/l...

GarrickDrgn · 7h ago
Am I misunderstanding something? How is this "Everything runs locally" if it's talking to OpenAI's APIs?
whilenot-dev · 6h ago
This app is using OpenAI via the ai package[0][1], so "Everything runs locally" is definitely misleading.

[0]: https://github.com/NickTikhonov/snap-ql/blob/409e937fa330deb...

[1]: https://github.com/vercel/ai

piskov · 6h ago
I guess he means there is no proxy between you and openai. API key won’t leak, etc.
nicktikhonov · 6h ago
What I meant was that it isn't a web app and I don't store your connection strings or query results. I'll make this more clear
kokanee · 5h ago
It is a web app, though. You just aren't running the server, OpenAI is. And you're packaging the front end in electron instead of chrome to make it feel as if it all runs locally, even though it doesn't.

Side note: I don't see a license anywhere, so technically it isn't open source.

omega3 · 6h ago
You might not but openai does.
nicktikhonov · 6h ago
That makes no sense. OpenAI doesn't know the secret database connection string or any query results. Perhaps you should have read the code before making baseless claims.
nessbot · 5h ago
But it knows what you're querying, which depending on what you're doing may also give away a good bit about whats in the DB.
doctorpangloss · 6h ago
API gateways could accept public keys instead of generating bearer tokens. Then the private key could reside in an HSM, and apps like this could give HSMs requests to sign. IMO even though this could be done in an afternoon, everyone - Apple and Google, the CDN / WAF provider, the service provider - is too addicted to the telemetry.
esafak · 7h ago
If you can do this, can't you create a read-only user and use it with a database MCP like https://github.com/executeautomation/mcp-database-server ? Am I missing something?
nicktikhonov · 7h ago
You can set up an MCP and use it in your existing AI app, but is afaiu the first open source standalone app that gives you a familiar interface to other SQL workspace tools. I built it to be a familiar but much more powerful experience for both technical and nontechnical people.
esafak · 7h ago
There are competitors with a GUI too, such as https://www.sqlchat.ai/ and https://www.jetbrains.com/datagrip/features/ai/

I wish you luck in refining your differentiation.

BenderV · 6h ago
Selfless plug, our own tool => https://www.myriade.ai

> I wish you luck in refining your differentiation. Can't agree more with you. It's about distribution (which Snowflake/Databricks/... have) or differentiation.

Still, chatting with your data is already working and useful for lots.

nicktikhonov · 6h ago
The first doesn't have good UX and the second isn't open source. SnapQL is both :) But I'll find new ways to differentiate for sure, it's part of the fun of building.
un1970ix · 5h ago
Your project is source-available, not open-source. Consider adding a license.
jaimin888patel · 10h ago
awesome work nick, literally been asking for a vibe coding SQL interface for months
nicktikhonov · 6h ago
thanks Jaimin. happy you finally found what you were looking for :D