14 comments

  • bobbyraduloff 12 minutes ago
    Seems like a cool concept. I personally know people in finance whose whole job is to write SQL queries all day. Would be nice to have something like this.

    The demo video in the README legit tried to give me a seizure tho…

    • nicktikhonov 1 minute ago
      Interesting lead. What else would they be looking for in a tool like this? My bad re the video, I'll make sure not to toggle dark mode in the next one.
  • anshumankmr 2 hours 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 2 hours 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 3 hours 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 3 hours 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 2 hours 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?

  • jpb0104 2 hours ago
    I like this a lot. I am looking forward to having something similar built into Metabase.
  • sirjaz 3 hours ago
    Looks like a good idea. Any reason you didn't use React native?
    • nicktikhonov 3 hours 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.
  • throwmeaway9876 2 hours ago
    Great tool!

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

    • nicktikhonov 1 hour ago
      OpenAI LLM is used to generate SQL based on a combination of a user prompt and the database schema.
  • s1mplicissimus 3 hours ago
    Are there plans to support other LLM sources, in particular ollama?
  • kebsup 3 hours ago
    I was looking for something like this that supports graphs.
  • revskill 3 hours ago
    What's the underlying model to enable this ?
  • zicon35 7 hours ago
    congrats on the launch! This looks very interesting
  • GarrickDrgn 4 hours ago
    Am I misunderstanding something? How is this "Everything runs locally" if it's talking to OpenAI's APIs?
    • whilenot-dev 3 hours 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 3 hours ago
      I guess he means there is no proxy between you and openai. API key won’t leak, etc.
    • nicktikhonov 3 hours 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 2 hours 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 3 hours ago
        You might not but openai does.
        • nicktikhonov 2 hours 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 2 hours 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 2 hours 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 4 hours 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 4 hours 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.
    • boredemployee 4 hours ago
      [flagged]
  • jaimin888patel 6 hours ago
    awesome work nick, literally been asking for a vibe coding SQL interface for months
    • nicktikhonov 3 hours ago
      thanks Jaimin. happy you finally found what you were looking for :D