Are you tired of bulky, slow SQL clients that eat up your system's resources and complicate your workflow? Do you wish you could quickly peek at your data without the hassle? Look no further! data-peek is here to revolutionize your SQL client experience with its minimal, fast design and AI-powered querying capabilities. In this article, we'll dive deep into what makes data-peek a game-changer, explore its key features, and guide you through installation and advanced usage.
What is data-peek?
data-peek is a minimal, fast SQL client desktop application designed specifically for developers who want to quickly access and analyze their data without the bloat. Created by Rohith Gilla, this innovative tool has quickly gained popularity for its unique combination of speed, security, and AI-powered features. It supports multiple databases, including PostgreSQL, MySQL, Microsoft SQL Server, and SQLite, making it a versatile choice for developers working with various database systems.
The trend towards AI in development tools is growing rapidly, and data-peek is at the forefront of this movement. By integrating AI capabilities such as natural language querying and schema-aware insights, data-peek not only streamlines your workflow but also enhances your data analysis capabilities. This tool is perfect for developers who need a lightweight, efficient solution for managing and querying their databases.
Key Features
Core Features
- Fast: Opens in under 2 seconds, with a low memory footprint.
- Multi-Database Support: PostgreSQL, MySQL, Microsoft SQL Server, and SQLite.
- SSH Tunnels: Securely connect through bastion hosts with password or key authentication.
- Secure: Connection credentials are encrypted locally using the OS keychain, with no telemetry.
AI Assistant
- Natural Language Queries: Ask questions in plain English and get SQL queries.
- Multi-Provider: Supports 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.
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.
- Saved Queries: Bookmark and organize queries with folders and tags.
- Command Palette:
Cmd+Kto access everything instantly.
Performance Analysis
- Query Telemetry: Detailed timing breakdown with waterfall visualization.
- Benchmark Mode: Run queries multiple times for 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.
Data Management
- Schema Explorer: Browse tables, views, stored procedures, and functions.
- Inline Editing: Edit table data directly with INSERT/UPDATE/DELETE.
- Table Designer: Create and alter tables with full DDL support.
- JSON Editor: Dedicated editor for JSON/JSONB columns.
- Export: Export results to CSV, JSON, or Excel.
Visualization
- ERD Diagrams: See table relationships with interactive entity-relationship diagrams.
- Foreign Key Navigation: Jump to related records with one click.
User Experience
- Dark/Light Mode: Follows system preference for easy visibility.
- Keyboard-First: Power users can work without a mouse.
- Auto-Updates: Automatic updates with toast notifications.
Use Cases
Rapid Data Exploration
Developers often need a quick way to explore their data without setting up complex environments. data-peek's minimal design and fast performance make it ideal for this purpose. You can connect to your database and start querying in seconds, making it perfect for debugging and initial data analysis.
Secure Data Access
Security is paramount, especially when dealing with sensitive data. data-peek's support for SSH tunnels and encrypted credentials ensures that your connections are secure. Whether you're working with remote databases or local development environments, you can trust data-peek to keep your data safe.
AI-Powered Insights
The AI assistant is a game-changer for developers who need to generate SQL queries from natural language or visualize query results. Whether you're new to SQL or a seasoned developer, the AI assistant can help you write more efficient queries and gain deeper insights into your data.
Performance Optimization
For developers focused on performance, data-peek's detailed query telemetry and EXPLAIN viewer are invaluable tools. You can analyze query plans, detect performance bottlenecks, and receive suggestions for optimizations, all within the same interface.
Schema Management
Managing database schemas can be cumbersome, but data-peek simplifies this with its schema explorer, table designer, and inline editing capabilities. You can create, alter, and manage tables with ease, making schema management a breeze.
Step-by-Step Installation & Setup Guide
Download
Download the latest release for your platform from Releases.
- macOS:
.dmg(Intel & Apple Silicon) - Windows:
.exeinstaller - Linux:
.AppImage,.deb, or.tar.gz(Arch)
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're using an older version and see an "App is damaged" warning:
Option 1: Terminal command
xattr -cr /Applications/data-peek.app
Option 2: Right-click to open
- Right-click (or Control+click) on data-peek.app
- Select "Open" from the menu
- 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.
| 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
# 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:
# 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.
REAL Code Examples from the Repository
Example 1: Querying Data with the AI Assistant
# Connect to your database using the AI assistant
# data-peek will generate the SQL query based on your natural language input
# Example natural language query
"Show me the top 5 customers by total sales"
# Generated SQL query
SELECT customer_id, SUM(amount) as total_sales
FROM sales
GROUP BY customer_id
ORDER BY total_sales DESC
LIMIT 5
This example demonstrates how the AI assistant can convert a natural language query into a SQL query. The AI understands the context and structure of your database to generate accurate queries.
Example 2: Creating a Table with the Table Designer
# Create a new table using the table designer
# data-peek provides a visual interface to define the table structure
CREATE TABLE customers (
customer_id SERIAL PRIMARY KEY,
name VARCHAR(100) NOT NULL,
email VARCHAR(100) UNIQUE NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
The table designer allows you to create tables with full DDL support. You can define columns, indexes, constraints, and partitions all within the data-peek interface.
Example 3: Performance Analysis with Query Telemetry
# Analyze query performance using the query telemetry feature
# data-peek provides detailed timing breakdowns and waterfall visualizations
EXPLAIN ANALYZE
SELECT customer_id, SUM(amount) as total_sales
FROM sales
GROUP BY customer_id
ORDER BY total_sales DESC
LIMIT 5;
The query telemetry feature provides detailed insights into query performance. You can see a waterfall visualization of query execution times and get suggestions for optimizations.
Example 4: Inline Editing of Table Data
# Inline edit table data directly in data-peek
# data-peek supports INSERT, UPDATE, and DELETE operations
# Example: Update a customer's email
UPDATE customers
SET email = 'new_email@example.com'
WHERE customer_id = 1;
Inline editing allows you to directly modify table data. You can perform INSERT, UPDATE, and DELETE operations within the data-peek interface, making data management more efficient.
Example 5: Exporting Query Results
# Export query results to CSV, JSON, or Excel
# data-peek provides a simple interface to export your data
# Example: Export query results to CSV
SELECT customer_id, name, email
FROM customers
ORDER BY customer_id;
# Export to CSV
# data-peek will prompt you to choose the export format and file location
Data-peek allows you to export query results to various formats, making it easy to share and analyze your data outside of the application.
Advanced Usage & Best Practices
Pro Tips
- Use SSH Tunnels for Secure Connections: Always use SSH tunnels when connecting to remote databases to ensure secure connections.
- Leverage the AI Assistant for Complex Queries: The AI assistant can help you write more efficient and accurate SQL queries, especially for complex queries.
- Analyze Query Plans with EXPLAIN Viewer: Use the EXPLAIN viewer to analyze query plans and identify performance bottlenecks.
- Organize Queries with Saved Queries and Tags: Keep your queries organized with saved queries and tags to easily manage and reuse your SQL queries.
Optimization Strategies
- Index Optimization: Use the performance indicator to detect missing indexes and optimize your database performance.
- Query Benchmarking: Use benchmark mode to run queries multiple times and get statistics on query performance.
- Cancel Long-Running Queries: Don't wait for long-running queries to complete; cancel them mid-execution to save time.
Comparison with Alternatives
When choosing an SQL client, it's important to consider the features and performance of each tool. Here's a comparison of data-peek with other popular SQL clients:
| Feature | data-peek | DBeaver | pgAdmin | MySQL Workbench |
|---|---|---|---|---|
| AI Assistant | Yes | No | No | No |
| Multi-Database Support | Yes | Yes | PostgreSQL | MySQL |
| Performance Analysis | Yes | Basic | Basic | Basic |
| Schema Management | Yes | Yes | Yes | Yes |
| Secure Connections | Yes | Yes | Yes | Yes |
| Lightweight | Yes | No | No | No |
Why choose data-peek over others? Data-peek offers a unique combination of AI-powered features, multi-database support, and lightweight performance. It's designed specifically for developers who need a fast, efficient, and secure SQL client.
FAQ
Is data-peek free to use?
Yes, data-peek is free to use for personal and commercial purposes. However, pre-built binaries require a license for commercial use.
How do I install data-peek on my machine?
You can download the latest release from the Releases page. Follow the installation instructions for your platform.
Can I use data-peek with multiple databases?
Yes, data-peek supports PostgreSQL, MySQL, Microsoft SQL Server, and SQLite.
How do I report bugs or request new features?
You can report bugs and request new features by opening an issue on the GitHub Issues page.
Is data-peek secure?
Yes, data-peek encrypts connection credentials locally using the OS keychain and does not collect any telemetry data.
How can I contribute to data-peek?
Contributions are welcome! Please see the CONTRIBUTING.md file for guidelines.
How do I enable dark mode in data-peek?
Dark mode is enabled by default, but you can switch between dark and light modes in the settings.
Conclusion
data-peek is a game-changer for SQL clients, offering a minimal, fast, and secure solution with AI-powered features. Whether you're a developer looking to quickly explore your data or need advanced performance analysis tools, data-peek has you covered. Its unique combination of features makes it a standout choice in the market. Ready to give it a try? Head over to the data-peek GitHub repository and start peeking at your data today!