Skip to content
Nitish27Public

About

sqlMate — A native database client

Topics

Resources

Stars

7 stars

Watchers

1 watching

Forks

Repository files navigation

SqlMate Logo

Screenshots

Main Interface
The modern, clean workspace in SqlMate

Welcome Screen Connection Management
Welcome screen and connection management

AI provider preferences with API key setup and connection test
Connect your own AI provider, then test it before use

Tip

Capturing High-Quality Screenshots: To avoid blurriness, capture screenshots on a Retina display (MacBooks) using Cmd + Shift + 4, then Space to select the window. This saves a high-DPI image. The README is configured to display these at half-width for maximum sharpness.

Features

  • Multi-Database Support: Connect to PostgreSQL, MySQL, SQLite, and local DuckDB files.
  • DuckDB (read-only preview): Open an existing .duckdb file, browse tables and views, run one bounded SELECT at a time, and profile a bounded table sample. DuckDB connections cannot edit data, import/export, compare databases, or use the relationship map yet; external file access and extension autoloading are disabled.
  • AI Assistant: Generate, explain, and fix SQL with your own Gemini, Groq, Claude, or OpenAI API key. Review the outbound request and proposed SQL before use.
  • Modern Sidebar Experience:
    • Items: Explore your databases, schemas, and tables.
    • Queries: Manage your saved SQL scripts.
    • History: A persistent, searchable log of all executed queries, grouped by date.
  • Advanced Query History:
    • Automatic Tracking: Every query executed (manually or via table browsing) is recorded.
    • Date Grouping: Queries are logically grouped by day with collapsible sections.
    • Search & Filter: Quickly find past queries using the integrated search.
    • Replay: Instant replay of any historical query into a new editor tab.
  • Unified Quick Open: Press Cmd+P on macOS or Ctrl+P on Windows to find open connections, databases, tables, tabs, saved SQL, and recent history. Opening a query fills an editor for review; it never runs automatically.
  • Persistence: Your connection settings and query history are saved locally for a seamless experience across restarts.
  • Native Performance: Leverages Rust for backend operations and Tauri for a smooth desktop experience.
  • Sensitive Data Guard: Likely secret columns are masked in table and query results. Hold the eye control to reveal one value, or use a column's eye toggle to correct a classification or mask an alias. Copying sensitive rows and exporting potentially sensitive data require explicit confirmation.
  • Cell Value Inspector: Press Space on a focused table or query-result cell, or choose Inspect value from its context menu, to read the full value and explore searchable JSON. Large or deeply nested values remain available as raw text. Sensitive values stay hidden by default; persistent reveal and raw copying require separate confirmations.
  • Connection-Aware Safe Mode: Browse tables and run one SELECT statement at a time through a read-only database context. Row edits and other writes remain blocked. Use a read-only database account for stronger protection, especially against side effects in database functions.
  • Query Plan Inspector: Explain the selected or cursor SELECT without executing it. Inspect estimated plan steps or raw output for PostgreSQL, MySQL/MariaDB, and SQLite. EXPLAIN ANALYZE is intentionally unavailable.
  • Foreign-Key Navigation: Follow declared references from table cells into a separate, browse-only filtered tab, then return to the source. Composite keys are supported; masked source values must be revealed before following.
  • Read-Only Schema Compare: Compare open same-engine connections to spot table and column drift. Review types, nullability, defaults, and primary keys side by side without reading rows or applying migrations.
  • Read-Only Data Compare: Compare up to 200 primary-key-ordered rows per side across open same-engine connections. See changed and one-sided values without writes; incomplete samples are marked as unchecked, and sensitive columns stay masked.
  • Relationship Map: Explore a table's declared foreign-key links to nearby tables in a read-only, pannable diagram. Follow a linked table without loading database rows into the map.

Getting Started

Prerequisites

Installation

  1. Clone the repository:

    git clone https://github.com/Nitish27/sqlMate.git
    cd sqlMate
  2. Install dependencies:

    npm install
  3. Run in development mode:

    npm run tauri dev

AI Assistant

Open Preferences > AI from the sidebar, welcome screen, or SQL assistant. Choose Gemini, Groq, Claude, or OpenAI, save your own developer API key in the OS keychain, and use Prepare test to review a small outbound request before sending it. A successful test lets you make that provider and model the default. API usage may incur charges separate from a consumer-app subscription.

For advanced local setup, GEMINI_API_KEY, GROQ_API_KEY, ANTHROPIC_API_KEY, and OPENAI_API_KEY remain supported in .env (see .env.example); YOUR_GROQ_API_KEY is also accepted. A key saved in the app takes precedence over an environment key. An installed app does not read the repository's .env: put a per-user .env in the app config directory instead (on macOS, ~/Library/Application Support/com.sqlmate.db/.env) and restart. SQLMATE_AI_PROVIDER sets the default only until one is saved in Preferences. Never bundle or commit an API key.

Generate, Explain, and Fix always show the exact request body and destination for review before sending. They may send selected schema metadata, SQL, errors, or text you entered, but not database rows or connection credentials. Proposed SQL is never run automatically. AI is disabled by default for connections tagged production until explicitly enabled for that connection.

For moderated connection testing, use the disposable database fixture and session script.

For automated PostgreSQL and MariaDB release checks, use the cross-engine smoke gate.

Tech Stack

  • Frontend: React, TypeScript, Tailwind CSS, Monaco Editor, Lucide Icons.
  • Backend: Rust (sqlx for PostgreSQL, MySQL, and SQLite; duckdb for local DuckDB files).
  • Framework: Tauri.

Recommended IDE Setup

Distribution

Pushing a v* tag builds signed macOS bundles, Windows installers, and updater artifacts and attaches them to a single GitHub release draft.

About

sqlMate — A native database client

Topics

Resources

Stars

7 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages