1 points · by varmabudharaju · 9mo ago · 1 comment
So I built a small tool called pgsemantic that handles all of that for you.
pip install pgsemantic
pgsemantic apply --table products --column description
pgsemantic index --table products
That's basically it. It adds a vector column, creates the index, installs a trigger to keep things in sync, and gives you a worker to process changes.
You can search from the CLI:
pgsemantic search "lightweight summer jacket" --table products
Or if you use Claude Desktop, it also runs as an MCP server:
pgsemantic serve
A few things it supports:
- Local embeddings (sentence-transformers, no API key needed) or OpenAI
- External storage mode if you don't want to modify your source table
- Multi-column search (e.g. search across title + description together)
- Hybrid search with SQL filters
- Works on RDS, Neon, Supabase, or any Postgres with pgvector
It's open source and MIT licensed. Thought it might be useful for anyone dealing with the same problem.
Happy to hear feedback or answer questions.