Introducing pgLens: See Your Postgres Clearly
A lightweight, open-source tool for exploring PostgreSQL databases with intelligent, type-aware interfaces.
The Database Explorer Problem
Working with PostgreSQL databases often means juggling between multiple tools—SQL clients for queries, GUI apps for schema exploration, documentation for relationships, and custom scripts for data browsing. Each context switch slows you down.
What if you could just connect and see everything clearly in one place?
Enter pgLens
pgLens is our answer to database exploration complexity. It’s a lightweight, open-source tool that connects to any PostgreSQL database and instantly gives you:
- Schema Discovery - Tables, columns, types, primary keys, foreign keys, indexes—all auto-detected
- Smart UI - Type-aware interfaces that adapt to your data (booleans get toggles, JSON gets formatters, dates get pickers)
- Relationship Mapping - Interactive graph visualization of how tables connect via foreign keys
- Search & Browse - Full-text search, pagination, sorting for tables of any size
No setup. No configuration files. Just paste a connection string and explore.
Built for Privacy
Unlike cloud-hosted database tools, pgLens takes a privacy-first approach:
- Connection strings are never persisted server-side
- Data is never logged
- Nothing is sent to third parties
- Run it locally or self-host for complete control
Your database credentials and data stay yours.
Open Source Philosophy
We’re releasing pgLens under the MIT License because we believe good tools should be freely available and modifiable.
You can:
- ✅ Run it locally
- ✅ Self-host for your team
- ✅ Fork and customize
- ✅ Contribute improvements
- ✅ Use it commercially
Repository: github.com/lab-zee/pgLens
Live Demo: pglens.io
Why We Built This
At Lab Z, we work with distributed systems and complex data models. We needed a tool that could:
- Quickly make sense of unfamiliar schemas
- Visualize relationships without manual diagramming
- Browse data with appropriate interfaces (not just raw SQL results)
- Work with any Postgres instance—local, cloud, self-hosted
Existing tools were either too heavy (enterprise GUI apps), too limited (basic SQL clients), or required cloud sync (privacy concerns).
So we built pgLens: lightweight, intelligent, and yours to use however you want.
Type-Aware Interfaces
One of pgLens’s key features is its smart UI layer. Instead of showing every column as plain text, it detects types and renders appropriately:
- Booleans → Toggle switches
- JSON/JSONB → Formatted, collapsible viewers
- Timestamps → Human-readable dates
- UUIDs → Copy buttons and validation
- Emails → mailto links
- URLs → Clickable links
- Arrays → Item lists
- Enums → Dropdown selectors
This makes exploring data faster and reduces cognitive load. You see data as it’s meant to be seen, not just as strings.
Relationship Graphs
Understanding table relationships is crucial when working with normalized databases. pgLens automatically:
- Detects foreign key constraints
- Builds an interactive graph
- Shows cardinality (one-to-many, many-to-many)
- Lets you explore connections visually
No need to reverse-engineer from SQL or maintain separate documentation.
Get Started
Try it now:
- Visit pglens.io
- Paste your Postgres connection string
- Click “Connect”
- Explore
Or run locally:
git clone https://github.com/lab-zee/pgLens
cd pgLens
npm install
npm run dev
Community & Contributions
We welcome contributions:
- Feature requests - Open an issue
- Bug reports - Let us know what broke
- Pull requests - Improvements welcome
- Forks - Make it your own
Whether you’re exploring a local dev database or managing production schemas, pgLens is designed to get out of your way and let you see your data clearly.
The Bigger Picture
pgLens reflects our broader philosophy at Lab Z: tools should enhance understanding, not demand learning.
Just as Zero operates with high-state intelligence but zero presence, pgLens gives you full database visibility without the overhead of complex GUIs.
Simple tools. Deep insights. Open source.
Try pgLens: pglens.io
Source Code: github.com/lab-zee/pgLens
License: MIT
We’d love to hear how you use it or what features would make it more useful. Drop us a note or open an issue on GitHub.