Content
# data-peek

A minimal, fast SQL client desktop application with AI-powered querying. Built for developers who want to quickly peek at their data without the bloat. Supports PostgreSQL, MySQL, Microsoft SQL Server, and SQLite.
<p align="center">
<img src="https://pub-84538e6ab6f94b80b94b8aa308ad1270.r2.dev/hero.png" alt="Data Peek - SQL Client" width="100%" />
</p>
## Screenshots
<details>
<summary>AI Assistant - Generate charts and insights</summary>
<img src="https://pub-84538e6ab6f94b80b94b8aa308ad1270.r2.dev/ai-assitant.png" alt="AI Assistant Charts" width="100%" />
</details>
<details>
<summary>AI Assistant - Natural language to SQL</summary>
<img src="https://pub-84538e6ab6f94b80b94b8aa308ad1270.r2.dev/ai-assitant-2.png" alt="AI Assistant Queries" width="100%" />
</details>
<details>
<summary>ER Diagrams - Visualize relationships</summary>
<img src="https://pub-84538e6ab6f94b80b94b8aa308ad1270.r2.dev/erd.png" alt="ER Diagrams" width="100%" />
</details>
<details>
<summary>Command Palette - Quick actions</summary>
<img src="https://pub-84538e6ab6f94b80b94b8aa308ad1270.r2.dev/command-bar.png" alt="Command Palette" width="100%" />
</details>
<details>
<summary>Light Mode</summary>
<img src="https://pub-84538e6ab6f94b80b94b8aa308ad1270.r2.dev/light-mode.png" alt="Light Mode" width="100%" />
</details>
## Features
### Core
- **Fast** - Opens in under 2 seconds, low memory footprint
- **Multi-Database** - PostgreSQL, MySQL, Microsoft SQL Server, SQLite
- **SSH Tunnels** - Connect securely through bastion hosts with password or key auth
- **Default Schema** - Pin a PostgreSQL connection's `search_path` and focus the sidebar on one schema
- **Secure** - Connection credentials encrypted locally using OS keychain, no telemetry
### AI Assistant
- **Natural Language Queries** - Ask questions in plain English, get SQL
- **Multi-Provider** - OpenAI, Anthropic, Google, Groq, and local Ollama models (BYOK)
- **Charts & Insights** - Generate visualizations and metrics from query results
- **Schema-Aware** - AI understands your database structure for accurate queries
### MCP Server
- **MCP server** - expose your connections to AI agents (read-only queries free, writes gated by in-app approval)
- **Streamable HTTP** - local server on `127.0.0.1:4722` (configurable), secured with a bearer token, off by default
- **Read-only tools** - `list_connections`, `list_schemas`, `run_query` (500-row cap, rollback-wrapped, Postgres additionally runs `READ ONLY` at the DB level), `explain_query`
- **Approved writes** - `execute_statement` prompts an in-app Approve/Reject dialog for every write; 60s timeout auto-rejects
- **One-command setup** - copy the ready-made `claude mcp add` snippet straight from Settings → MCP server
- **Bring your own agent** - point the AI assistant at your locally installed Claude Code, Codex, or Antigravity (`agy`) CLI; it uses your existing subscription and sign-in, and data-peek never stores a key. Claude Code grounds answers against your live database via MCP; Codex and Antigravity grounding follows once headless tool approval lands upstream.
### Audit Log
- **Audit log** - tamper-evident (hash-chained) local record of every executed statement, with CSV/JSON export and integrity verification. Off by default. Stored locally, never uploaded; SQL text can contain data values.
### Query Editor
- **Monaco Editor** - SQL syntax highlighting with smart autocomplete
- **Table Aliases** - Autocomplete understands aliases for complex queries
- **Multi-tab & Multi-window** - Work with multiple queries and databases simultaneously
- **Cross-Tab References** - Name a tab and reference its result from other tabs with `@name`, inlined as a CTE at run time
- **Manual Transactions** - Turn off auto-commit on PostgreSQL, then commit or roll back explicitly; open transactions auto-rollback on tab close or disconnect
- **Step-Through Execution** - Run multi-statement scripts one statement at a time, optionally inside a transaction
- **Saved Queries** - Bookmark and organize queries with folders and tags
- **Command Palette** - `Cmd+K` to access everything instantly
### Performance Analysis
- **Query Telemetry** - Detailed timing breakdown with waterfall visualization
- **Benchmark Mode** - Run queries multiple times, get p50/p90/p99 statistics
- **EXPLAIN Viewer** - Analyze query plans with interactive node breakdown
- **Performance Indicator** - Detect missing indexes, N+1 patterns, and slow queries with auto-generated fix suggestions
- **Cancel Queries** - Stop long-running queries mid-execution
### Watch Mode
- **Pin a SELECT, see it move** - Re-run any read-only query on a cadence (500ms → 5min) with live diff highlights
- **Cell-level change detection** - Changed cells flash amber, new rows enter with a green band, fades over a configurable window
- **Smart row keying** - Diffs survive sorting / pagination by keying on explicit primary keys, then a heuristic `id`/`uuid`/`*_id` column, then row position
- **Refuses to poll mutations** - Pre-execution gate refuses `INSERT/UPDATE/DELETE/DDL/transaction/multi-statement` queries with a tooltip explaining why
- **Pause when window hidden** - Background tabs don't burn CPU or pound the database
- **Tab-bar pulse indicator** - Switch tabs and the amber dot keeps pulsing on watched ones
### Time Machine
- **Every query gets a memory** - Successful SELECT results are snapshotted locally; a timeline strip (`Cmd/Ctrl+Shift+H`) scrubs back through past runs
- **View any past run read-only** - Load an old result into the grid with a clear "viewing the past" banner and row-count sparkline
- **Diff any two runs** - Cell-level highlights show what changed between runs, plus added/removed row counts, keyed the same way Watch Mode diffs
- **Privacy-aware by construction** - Masked columns are stored redacted, storage is capped (50 runs per query, 512 MB global budget), and Settings has a one-click wipe
### Data Management
- **Schema Explorer** - Browse tables, views, stored procedures, functions, and triggers
- **Triggers** - View trigger definitions and alter, enable/disable, or drop them from the schema sidebar
- **Inline Editing** - Edit table data directly with INSERT/UPDATE/DELETE
- **Table Designer** - Create and alter tables with full DDL support (columns, indexes, constraints, partitions)
- **JSON Editor** - Dedicated editor for JSON/JSONB columns
- **Export** - Export results to CSV, JSON, or Excel
- **CSV Import** - Import CSV files with column mapping, type inference, and conflict handling
- **Data Generator** - Generate realistic fake data with Faker.js, FK-aware, in a dedicated tab
- **Column Statistics** - One-click data profiling per column (min/max/avg, histograms, top values)
- **Data Masking** - Blur sensitive columns for demos and screenshots with auto-mask rules
### Visualization
- **ERD Diagrams** - See table relationships with interactive entity-relationship diagrams
- **Foreign Key Navigation** - Jump to related records with one click
### Database Monitoring
- **Connection Health Monitor** - Dashboard with active queries, table sizes, cache hit ratios, and lock detection
- **PostgreSQL Notifications** - Subscribe to LISTEN/NOTIFY channels with real-time event log
- **Kill Queries** - Terminate long-running or blocking queries from the health dashboard
### User Experience
- **Dark/Light Mode** - Easy on the eyes, follows system preference
- **Keyboard-First** - Power users shouldn't need a mouse
- **Auto-Updates** - Automatic updates with toast notifications
## Installation
### Quick Install
#### macOS and Linux
```bash
curl -fsSL https://install.cat/Rohithgilla12/data-peek | sh
```
The installer detects your platform, downloads the latest GitHub release, and installs:
- **macOS**: the matching `.dmg`, copies `Data Peek.app`, and runs `xattr -cr` automatically
- **Linux**: the latest `x86_64.AppImage` into `~/.local/bin/data-peek`
#### Windows PowerShell
```powershell
irm https://install.cat/Rohithgilla12/data-peek | iex
```
The PowerShell installer downloads the latest `setup.exe` release and runs it for you.
### Terminal: `npx @data-peek/cli doctor`
No install needed. Eight Postgres schema checks from the terminal, each finding with the SQL that fixes it:
```bash
npx @data-peek/cli doctor postgres://user:pass@localhost:5432/app
npx @data-peek/cli doctor "$DATABASE_URL" --fail-on warning # as a CI gate
```
Tables without a primary key, foreign keys without an index, duplicate, unused, and invalid indexes, bloat, never-vacuumed tables, and nullable FKs. Same queries as Schema Intel in the app. See [`packages/cli`](packages/cli/README.md).
### Alternative Install Methods
#### macOS: Homebrew
```bash
brew install --cask Rohithgilla12/tap/data-peek
```
#### Download
Download the latest release for your platform from [Releases](https://github.com/Rohithgilla12/data-peek/releases).
- **macOS**: `.dmg` (Intel & Apple Silicon)
- **Windows**: `.exe` installer
- **Linux**: `.AppImage`, `.deb`, or `.tar.gz`
### macOS: Code Signing
Starting from v0.4.0, data-peek is code signed and notarized for macOS. You should be able to open it directly without any warnings.
If you install with the quick installer, it already runs the `xattr` cleanup for you.
If you're using an older version or a manual install and see an "App is damaged" warning:
**Option 1: Terminal command**
```bash
xattr -cr "/Applications/Data Peek.app"
```
**Option 2: Right-click to open**
1. Right-click (or Control+click) on `Data Peek.app`
2. Select "Open" from the menu
3. Click "Open" in the dialog
### Linux: Auto-Updates
Auto-updates only work with the **AppImage** format. If you installed via `.deb` or `.tar.gz`, you'll need to manually download new releases from the [Releases page](https://github.com/Rohithgilla12/data-peek/releases).
| Format | Auto-Update |
| -------- | ------------------ |
| AppImage | Yes |
| .deb | No (manual update) |
| .tar.gz | No (manual update) |
For the best experience with automatic updates, we recommend using the AppImage.
### Build from Source
```bash
# Clone the repository
git clone https://github.com/Rohithgilla12/data-peek.git
cd data-peek
# Install dependencies
pnpm install
# Run in development mode
pnpm dev
# Build for your platform
pnpm build:mac # macOS
pnpm build:win # Windows
pnpm build:linux # Linux
```
### Troubleshooting: Electron not found
If you get errors about Electron not being found after `pnpm install`:
```bash
# Option 1: Run the setup script
pnpm setup:electron
# Option 2: Rebuild native modules
pnpm rebuild
# Option 3: Clean install (nuclear option)
pnpm clean:install
```
This can happen when pnpm's cache skips Electron's postinstall script that downloads platform-specific binaries.
## Tech Stack
| Layer | Technology |
| ------------ | ---------------------------------------------------------------------------- |
| Desktop | Electron |
| Frontend | React 19 + TypeScript |
| UI | shadcn/ui + Tailwind CSS |
| State | Zustand |
| Query Editor | Monaco |
| Database | pg (PostgreSQL), mysql2 (MySQL), mssql (SQL Server), better-sqlite3 (SQLite) |
## Project Structure
```
apps/
desktop/ # Electron desktop application
web/ # Marketing website + licensing
packages/
shared/ # Shared types for IPC
```
## Development
```bash
# Install dependencies
pnpm install
# Start desktop app with hot reload
pnpm dev
# Start web app
pnpm dev:web
# Lint all workspaces
pnpm lint
# Build desktop app
pnpm build
```
## License
MIT License - see [LICENSE](LICENSE) for details.
Pre-built binaries require a license for commercial use. See the license file for details on free vs. commercial use.
## Project continuity
data-peek is a single-maintainer project, and we treat that honestly rather
than hiding it. Two commitments are written down in
[SUSTAINABILITY.md](SUSTAINABILITY.md): a **kill-switch-free guarantee** (if
the licence server ever disappears, your activated version keeps working
forever, offline) and a **dormancy pledge** (12 months of maintainer
inactivity waives the commercial-licence requirement for all released
versions). Releases are built by CI, and the MIT source means you can always
build from source.
## Contributing
Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
## Support
- [GitHub Issues](https://github.com/Rohithgilla12/data-peek/issues) - Bug reports and feature requests
- [GitHub Sponsors](https://github.com/sponsors/Rohithgilla12) - Support development
- Twitter/X: [@gillarohith](https://x.com/gillarohith)
<br />
<br />
<a href="https://vercel.com/oss">
<img alt="Vercel OSS Program" src="https://vercel.com/oss/program-badge.svg" />
</a>
Connection Info
You Might Also Like
No recommendations available