Skip to content(if available)orjump to list(if available)

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

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

39 comments

·June 20, 2025

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.

gabrielruttner

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

just opened a PR for local llm support https://github.com/NickTikhonov/snap-ql/pull/11

nicktikhonov

Thank you for the feedback. Please feel free to raise some issues on the repo and we can jam this out there

anshumankmr

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

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

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

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

jpb0104

I like this a lot. I am looking forward to having something similar built into Metabase.

sirjaz

Looks like a good idea. Any reason you didn't use React native?

nicktikhonov

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

Are there plans to support other LLM sources, in particular ollama?

nicktikhonov

s1mplicissimus

awesome, looking forward to try it with a self hosted model

kebsup

I was looking for something like this that supports graphs.

nicktikhonov

Graph generation is next on the list.

revskill

What's the underlying model to enable this ?

nicktikhonov

Currently OpenAI 4o

revskill

So u already train all knowledgebase or fine tune? Would love to know how can u evaluate correctness.

zicon35

congrats on the launch! This looks very interesting

GarrickDrgn

Am I misunderstanding something? How is this "Everything runs locally" if it's talking to OpenAI's APIs?

whilenot-dev

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

I guess he means there is no proxy between you and openai. API key won’t leak, etc.

nicktikhonov

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

omega3

You might not but openai does.

nicktikhonov

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.

doctorpangloss

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.

null

[deleted]

esafak

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

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

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

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

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.

null

[deleted]

null

[deleted]

boredemployee

[flagged]

null

[deleted]

jaimin888patel

awesome work nick, literally been asking for a vibe coding SQL interface for months

nicktikhonov

thanks Jaimin. happy you finally found what you were looking for :D