Widen - Native macOS Postgres GUI with Text-to-SQL
Widen is a free, open-source native macOS app that turns English questions into SQL against your Postgres database, with optional on-device AI on Apple Silicon.
TL;DR
TL;DR: Widen is a free, open-source native macOS Postgres GUI that drafts SQL from English questions using a cloud LLM or Apple’s on-device Foundation Model, shows you the SQL before it runs, and never auto-executes writes.
Source and Accuracy Notes
⚠️ This section is MANDATORY. All links must be verified from actual source, not guessed.
- Project page: widen.dev ← visited and verified
- Source repository: github.com/betocmn/widen ← read README end-to-end
- License: MIT ← verified from README
[](LICENSE) - HN launch thread: news.ycombinator.com/item?id=49117989
- Source last checked: 2026-08-01 (commit
main, README v1.0)
What Is Widen?
Widen is an open-source, native Postgres GUI for macOS 14 and later. It reads your database schema and can draft SQL from a plain-English question using either:
- Cloud mode (default): calls a provider you configure in Settings. Fresh installs default to OpenRouter with the fixed
openai/gpt-5.5profile — you supply the OpenRouter API key. - Local mode: uses Apple’s on-device Foundation Model on eligible macOS 26+ Apple Silicon Macs with Apple Intelligence enabled.
The key design principle is review before run. Every drafted SQL statement — whether typed manually or generated by the model — goes through the same deterministic safety validator before execution. Widen never auto-runs writes, and prompts for confirmation on DELETE or UPDATE without a WHERE clause.
Setup Workflow
Prerequisites
| Requirement | Notes | |---|---| | macOS 14 or later | Required to install and launch Widen | | Apple Silicon | Required only for the optional on-device Foundation Model | | Apple Intelligence | Required only for local AI generation | | PostgreSQL | Widen is Postgres-only today. Postgres.app works well for local testing | | OpenRouter API key | Required only for cloud text-to-SQL mode |
Install Widen
Download the latest signed and notarized DMG:
open "https://github.com/betocmn/widen/releases/latest/download/Widen.dmg"
Open Widen.dmg, drag Widen into Applications, and launch it. Sparkle updates are served from GitHub Releases.
Build from Source
Building from source requires Xcode 26:
git clone https://github.com/betocmn/widen
cd widen
make project # regenerate Widen.xcodeproj from project.yml
make build # build the app (Debug)
make run # build and launch Widen.app
If your Xcode 26 lives somewhere other than /Applications/Xcode-26.app, override the path:
make build DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
Set Up a Sample Database
With Postgres.app running on localhost:5432:
createdb widen_test
psql -d widen_test -f scripts/sample_db.sql
If psql is not on your PATH, use the bundled one:
/Applications/Postgres.app/Contents/Versions/17/bin/psql
Connect to Postgres
On first launch, click Add Database to open Settings › Databases. For a default Postgres.app setup:
- Host:
localhost - Port:
5432 - Database:
widen_test - Username: your macOS username
- Password: empty (Postgres.app uses trust auth locally)
- SSL mode: Disabled
Configure Cloud Text-to-SQL
- Open Settings › Providers
- Add your OpenRouter API key
- Select the model profile (fresh installs default to
openai/gpt-5.5)
For local AI (macOS 26+ Apple Silicon):
- Open Settings › Providers
- Enable local mode
- Ensure Apple Intelligence is turned on in System Settings
How a Query Runs
- Compose — type a plain-English question into the composer, or write raw SQL directly (
SELECT/WITHreads and SQL-shapedINSERT/UPDATE/DELETEwrites skip the model entirely) - Draft — for questions, Widen sends the open schema’s allowed tables, columns, types, and foreign keys plus the safety rules to the selected backend, and receives structured output: SQL, explanation, assumptions, referenced tables, confidence, and risk level
- Review — the SQL appears as a dashed card, validated deterministically before anything runs. Only one read or write statement is allowed per query; no semicolons, DDL, transaction keywords,
pg_sleep,dblink, or large-object calls - Run — reads execute in a
BEGIN READ ONLYtransaction; writes in a normal transaction withSET LOCAL statement_timeout(default 10 seconds). Read queries without aLIMITare wrapped in a subquery with your default row limit (default 100 rows) - Results — first 10 rows display in a table card; “View more” shows the rest. Every run is recorded in the transcript
Keyboard shortcuts: Enter submits the composer; Option+Enter adds a newline; Cmd+Enter runs the active SQL; Cmd+N starts a new session; Cmd+R refreshes the active database schema; Cmd+, opens Settings.
Safety Architecture
Widen enforces two layers of defense:
App-level guardrails (deterministic SQL validator):
- One statement only
SELECT/WITHreads, or explicitINSERT/UPDATE/DELETEwrites- No DDL, transaction keywords, semicolon chains,
pg_sleep,dblink, or large-object calls - Statement timeouts and row caps apply at execution time
Database-level defense (recommended complement):
- Connect with a read-only Postgres user for analytical queries
- Database permissions are the real boundary — app-level guardrails are useful but not a substitute
Non-secret connection settings are stored in ~/Library/Application Support/Widen/connections.json; passwords are stored in the macOS Keychain (service Widen).
Why Text-to-SQL Is Beta
The README is unusually candid about this. Text-to-SQL ships behind a hard release gate:
- 60 pinned-model gate results
- At least 90% end-to-end semantic pass rate
- 100% safety validity
- 100% schema validity
- 100% clarification decision accuracy
- At least 95% transport reliability
- Zero repeated-repair failures
The gate currently fails on semantic pass rate. Until it passes, the README instructs authors to not describe text-to-SQL as production-ready. Negative results (failed gate experiments) are documented publicly in docs/evals/.
Known Limitations
- PostgreSQL only — no MySQL, SQLite, or other databases
- Early MVP — not full DataGrip, TablePlus, or Postico feature parity
- Cloud text-to-SQL beta: requires your own OpenRouter API key; model selection is pinned to the evaluated version and not user-configurable
- Local AI requires macOS 26+ Apple Silicon hardware with Apple Intelligence; large schemas are truncated whole-table-at-a-time
- Results rendered as text values; typed grid behavior is still limited
- Export: CSV only
- No SQL syntax highlighting yet
- Query results are not persisted across restarts (transcripts, SQL, and generation metadata are)
Comparison
| Feature | Widen | TablePlus | Postico | DataGrip | |---|---|---|---|---| | Native macOS | yes | yes | yes | no (Electron) | | Text-to-SQL | yes (beta) | no | no | no | | Local AI (on-device) | yes (macOS 26+) | no | no | no | | Open source | yes (MIT) | no | no | no | | No account/backend | yes | no | no | no | | Price | free | $89/lifetime | $49 | $199/year |
FAQ
Q: Does Widen work without an internet connection?
A: Yes for manual SQL editing and schema browsing. Cloud text-to-SQL requires an internet connection; local AI mode (macOS 26+ Apple Silicon) works fully offline.
Q: Is my data sent to Widen’s servers?
A: No. Widen has no backend, no account, and no analytics out of the box. Cloud text-to-SQL sends your question and schema metadata to the provider you configure (default: OpenRouter). Local AI mode keeps everything on your Mac.
Q: Can Widen auto-run writes?
A: No. Writes are never auto-run. DELETE or UPDATE without a WHERE clause prompts for explicit confirmation first.
Q: What Postgres providers does Widen support?
A: Widen is Postgres-only. Any Postgres host (local via Postgres.app, Supabase, Railway, Neon, etc.) works as long as you have the connection details.
Q: How does local AI mode work on macOS?
A: On eligible macOS 26+ Apple Silicon Macs with Apple Intelligence enabled, Widen uses Apple’s on-device Foundation Model. Very large schemas are truncated whole-table-at-a-time before prompting due to the model’s context window.
Conclusion
Widen fills a specific niche: a free, native, no-account macOS Postgres GUI with optional text-to-SQL that keeps you in control of every query. Its clearest differentiator is the combination of local AI on Apple Silicon and an honest beta label on the text-to-SQL feature — the authors document their own failure criteria rather than overselling. If you want a lightweight Postgres workbench that happens to have AI-assisted querying and you’re on a Mac, it is worth trying. For full feature parity with TablePlus or DataGrip, check back after a few more releases.
widen.dev · GitHub · HN Discussion
Related Posts
ai-setup
Recall – Persistent Memory for Claude Code via MCP Hooks
Recall gives Claude Code a permanent memory store that survives session restarts and context compaction. Four hooks capture and restore context automatically — with cloud SaaS or self-hosted options.
2/28/2026
dev-tools
Automotive Skills Suite for AI Engineering
Evaluate Automotive Skills Suite for APQP, ASPICE, HARA, safety-plan, and DIA workflows with setup notes, governance risks, and SME review guidance.
5/28/2026
dev-tools
awesome-agentic-ai-zh Roadmap Guide
Explore awesome-agentic-ai-zh as a Chinese agentic AI learning roadmap, with setup notes, track selection, study workflow, and evaluation guidance.
5/28/2026