bryanbeshore

Natural language SQL query builder for Rails, powered by AI

62
1
100% credibility
Found Feb 11, 2026 at 45 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
HTML
AI Summary

QueryLens is a Rails engine providing a chat-like interface for generating, executing, and saving SQL queries from natural language questions against a database, with built-in safety measures.

How It Works

1
🔍 Discover QueryLens

You learn about a handy tool that lets you ask simple questions about your app's data, like chatting with a smart friend.

2
📦 Add to your website

Your developer quickly installs it into your existing website so it's ready to use.

3
🤖 Connect smart helper

Link it to an AI service that understands everyday language and turns questions into data lookups.

4
🔒 Set access rules

Decide who can use it and hide any private data areas to keep everything safe.

5
💬 Ask in plain words

Visit the special page and type your first question, like 'Show sales this week?' – it feels magical.

6
📊 Get instant results

Watch as it creates the perfect lookup, runs it securely, and displays answers in an easy table.

7
💾 Save useful ones

Organize and save your favorite questions into folders for quick reuse anytime.

🎉 Unlock data insights

Now you effortlessly explore your app's information, chat back and forth, and make decisions faster.

Sign up to see the full architecture

6 more

Sign Up Free

Star Growth

See how this repo grew from 45 to 62 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is query_lens?

QueryLens is a Ruby-based Rails engine that turns natural language questions into SQL queries using AI, powered by RubyLLM with support for OpenAI, Anthropic, Gemini, Ollama, and more. Mount it in any Rails 7.1+ app via a single gem install and generator, then hit `/query_lens` to ask things like "total revenue by plan this month?"—it introspects your schema, generates safe SQL, executes read-only queries, and displays sortable results. It solves the pain of manual SQL for quick DB exploration, blending natural language processing with database querying like Blazer crossed with ChatGPT.

Why is it gaining traction?

It stands out with zero frontend dependencies, conversation history that persists across refreshes, and saved queries organized into shareable projects—perfect for team reuse without Blazer's rigidity. Smart handling for large schemas via two-stage AI selection keeps prompts efficient, while multi-layer security (read-only txns, timeouts, excluded tables) makes it production-ready out of the box. Developers dig the 90-second demo and testbed repo for instant testing.

Who should use this?

Rails backend devs or admins needing fast analytics without deep SQL skills, especially in SaaS apps with PostgreSQL schemas. Data-curious PMs or support teams who query user signups, revenue breakdowns, or transaction volumes. Ideal for mid-sized teams sharing "known-good" queries via projects, skipping tools like Metabase for something embedded and AI-native.

Verdict

With 45 stars and a 1.0% credibility score, it's early-stage but impressively mature—excellent docs, solid tests, and a ready testbed make evaluation risk-free. Try it for non-prod dashboards; skip for high-stakes prod until more adoption.

(198 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.