frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Show HN: filtersql – a dependency-free JSON-to-SQL compiler for LLMs and WebAPIs

https://github.com/fthiella/filtersql/
2•fthiella•2h ago

Comments

fthiella•2h ago
I'm Federico. I built filtersql (https://github.com/fthiella/filtersql), a lightweight Python library that takes a declarative JSON payload and compiles it into safe, parameterized SQL strings and values.

Years ago I tried to build a "Microsoft Access-style" web framework in Perl / HTML::Mason, with forms, dependent dropdowns and master-detail subtables that were entirely generated by declarative JSON configs. I love declarative configs and I still believe that the idea was good! But it was also too complex for a solo developer, especially the frontend, so I stopped the project.

Anyway, some of the components were good and I couldn't throw them away, and I have been using them for years.

In particular, the backend JSON-to-SQL compiler was somehow solid, so I decided to port it to Python, and kept using it internally for DataTables backends.

Recently, while building a custom enterprise RAG, I realized that LLMs are bad and insecure at generating SQL, but are amazing at generating declarative JSON.

My old engine was exactly what the AI needed to safely query Postgresql metadata before doing vector searches. Before open-sourcing it as a standalone library, I fixed it up, in particular I tried to make the JSON specs as elegant as possible.

  payload = {
    "action": "select",
    "source": "users",
    "filters": [
      {"field": "name", "operator": "icontains", "value": "john"}
    ]
  }

  query, values = filtersql(payload, dbms='Pg', placeholder='?')
compiles to:

  select * from "users" where "name" ilike '%' || ? || '%'
with values:

  ["john"]
I’d love to hear your feedback.

GitHub: https://github.com/fthiella/filtersql Docs: https://filtersql.org

Thanks, Federico

Show HN: Echo – Fable-level results at 1/3 the cost using open-weight models

397•adam_rida•16h ago•191 comments

Show HN: A useful service for back end devs

https://app.linking.studio
2•yourfavdev•4m ago•0 comments

Show HN: Vinv-Ties every runtime trace to code segment, prevents reward hacking

https://github.com/VinvAI/VinvAI
3•sohamac•53m ago•0 comments

Show HN: Build native iOS widgets from any HTTPS endpoint

2•elkabong•56m ago•0 comments

Show HN: Statistical Football Predictions for Brazil's Loteca Lottery

https://alfavpalpites.com.br
2•fabioricardo7•59m ago•0 comments

Show HN: LLM Proxy - Python with SSE stream aggregation and timeout prevention

https://github.com/lordraw77/llmproxy
2•lordraw•59m ago•0 comments

Show HN: Frontier model pricing became a rip-off, so I built an open-source CLI

https://github.com/kolega-ai/kolega-code
3•fabioricardo7•1h ago•0 comments

Show HN: Palmier Pro – Open-source macOS video editor built for AI

https://github.com/palmier-io/palmier-pro
170•harrisontin•20h ago•26 comments

Show HN: Audio Player with "Binaural Beats" tuned to the same key as your music

https://github.com/henrygabriels/binaural-studio
2•gabriel666smith•1h ago•0 comments

Show HN: A Website Introducing Flux 3

https://flux-3.io
2•akseli_ukkonen•1h ago•0 comments

Show HN: Transept: AI translation workspace that puts humans first

https://transept.ai
3•sithamet•1h ago•0 comments

Show HN: OneCLI – OSS credential gateway that keeps secrets out of AI agents

https://github.com/onecli/onecli
101•Jonathanfishner•19h ago•30 comments

Show HN: Maplike – Rust traits for operations on containers (get, set, push...)

https://github.com/mikwielgus/maplike
2•mikolajw•1h ago•0 comments

Show HN: Claude-thermos keeps your Claude session warm for you

https://github.com/izeigerman/claude-thermos
102•s0ck_r4w•18h ago•81 comments

Show HN: filtersql – a dependency-free JSON-to-SQL compiler for LLMs and WebAPIs

https://github.com/fthiella/filtersql/
2•fthiella•2h ago•1 comments

Show HN: Chrome extension for clean, readable SEC filings (10-K, 10-Q, 8-K)

https://chromewebstore.google.com/detail/sec-reader/jimblilpjbmhmgiooeobpabjnkadcoji
2•wenbin•10m ago•0 comments

Show HN: Remux – an open-source tmux workspace designed for iPhone

https://github.com/h3nock/remux
94•bitwise42•21h ago•31 comments

Show HN: Trifle – Open-source analytics that stores answers, not events

https://trifle.io/
46•iluzone•1d ago•11 comments

Show HN: Forje Studio – data-driven design and motion, entirely client-side

https://studio.forjelo.com
4•teutrindade•3h ago•1 comments

Show HN: Krypter – simple offline message and file encryption mobile app

2•nobodyshere•3h ago•0 comments

Show HN: Photo of a handwritten alphabet to installable TTF, open source

https://github.com/danilo-znamerovszkij/draw-your-font
2•danilo_z_j•3h ago•1 comments

Show HN: A factory simulator game built on Spreadsheets

https://www.logisheets.com/?craft=factory-simulator
15•JeremyHe•10h ago•2 comments

Show HN: I built a native macOS terminal with Git integration in 5 days

https://kero.sh/
3•0x142857•5h ago•2 comments

Show HN: 100% Free, private meeting notes that never leave your Mac

https://oatsnote.com/
5•jarvisceo•4h ago•0 comments

Show HN: Sealos – deploy a full-stack GitHub repo and troubleshoot the live app

https://sealos.io/
4•dedicate•4h ago•1 comments

Show HN: Whetuu – a zero-config cross-shell prompt written in Zig

https://yamafaktory.github.io/whetuu/
48•yamafaktory•21h ago•37 comments

Show HN: Jharu – Open-Source AI and Dev Junk Cleaner for Mac and PC

https://github.com/riponcm/Jharu
2•riponcm•4h ago•0 comments

Show HN: SaveAnswer – a local Chrome extension for keeping AI answers searchable

https://chromewebstore.google.com/detail/saveanswer-save-ai-answer/iminapemlncanmmaadedieifgkaeoljm
2•lynnFu•55m ago•0 comments

Show HN: PDFly – 56 free PDF tools that run in the browser

https://pdfly.uk/
7•pagalannu01•8h ago•0 comments

Show HN: Continuum – switch AI coding agents without re-explaining your project

https://github.com/AnasNafees1802/continuum
3•AnasNafees101•4h ago•0 comments