frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: QRY – Natural Language to SQL Using Claude Code/Codex CLI

1•amansingh-afk•1h ago
I built a CLI tool that converts natural language to SQL by wrapping LLM CLIs (Claude Code, Codex, Cursor) that already understand your codebase.

The insight: these CLIs already index your schemas, migrations, and models. Instead of building another NL2SQL tool with custom embeddings, I just wrapped what already works.

How it's different: - No schema sync. New table? git pull. Done. - No embeddings to regenerate - Follow-up queries work naturally (session persists) - Uses your actual table/column names

Usage: $ cd your-project $ qry init $ qry > get users who signed up last week SELECT * FROM users WHERE created_at >= NOW() - INTERVAL '7 days';

Also exposes an API server for Slack bots, admin tools, etc.

GitHub: https://github.com/amansingh-afk/qry

Tradeoff: requires one of these CLIs installed. But if you're already using Claude Code or Cursor, it just works.

Would love feedback on the approach.