Rust GPUI Windows · macOS · Linux GPL-3.0

A fast, local-first SQL workbench

No cloud. No accounts. No telemetry. A native, GPU-rendered desktop app for SQLite, PostgreSQL and MySQL / MariaDB.

Free and open source · Portable · Updates itself

Portable Fast startup Local-first Developer-focused Auto-updating

SQL tools are usually overkill. BarSQL isn't.

Most SQL clients are slow and heavy, cloud-connected by default, tied to subscriptions and packed with features you never use. BarSQL does one thing: a fast, local place to work with your databases.

Native and GPU-rendered

Drawn on the GPU with GPUI, the UI framework behind the Zed editor: one Rust codebase from the database drivers to the window.

Yours, entirely

Everything runs and stays on your machine. No account, no sign-in, no telemetry: your connections and queries never leave your computer.

Portable by design

Connections, history, saved queries and settings live in one BarSQL-data folder next to the app. Copy both to a USB stick and carry on elsewhere.

Tested for real

Whole-window UI tests drive the app with real keystrokes and clicks, and end-to-end suites run against real PostgreSQL, MySQL and MariaDB servers.

One app for your databases

Read and write, or lock a connection to read-only: it's refused in the app and again inside the database session.

PostgreSQL

  • SSL: disable, require, verify-full
  • SSH tunnel through a bastion
  • DDL composed from the catalog
  • Powered by tokio-postgres

MySQL / MariaDB

  • TLS transport
  • SSH tunnel through a bastion
  • The server's own SHOW CREATE DDL
  • Powered by mysql_async

SQLite

  • Open a file, or drop it on the window
  • Opens straight from Finder or Explorer
  • Read-only mode for files you only inspect
  • Bundled SQLite via rusqlite

A closer look

The work you do every day, without the detours.

SQL editor

Write SQL at full speed

Suggestions know your schema: tables, columns, aliases and CTEs, with fuzzy matching and JOIN snippets where a join fits.

  • Run a selection, a statement from the gutter, or the whole script
  • Multi-statement scripts on one connection, with a result tab per output
  • Pinned transactions per tab: BEGIN, then commit or roll back from the toolbar
  • Rows stream in as they arrive, and Stop cancels the running query
Plan viewer

See why a query is slow

Explain shows the planner's estimate; Explain analyze runs the statement and reports what really happened, as one tree on every engine.

  • A heat bar on each node's own share of time, cost or rows
  • Row estimates 10x off are flagged: that's where a missing index hides
  • Every detail the engine reported, plus its raw output
  • Analyzing a write always rolls it back, so nothing lands
Table data

Edit rows, not UPDATE statements

Browse any table, filter it with a WHERE condition that autocompletes, and change it in place.

  • Edits and deletes are staged until you apply them, with undo and redo
  • Paste blocks of cells, set NULL, insert rows
  • Jump through foreign keys to the row a cell points at
  • The focused row as JSON beside the grid, filterable by key
Schema

Your schema, down to the triggers

Schemas, tables and columns, then indexes, constraints, triggers and functions, fetched only when you open them.

  • Copy any object's DDL, or open it in a tab ready to run
  • Rename, truncate and drop, with the exact SQL shown first
  • Back a table up to a .sql file that restores it exactly
  • Search tables and columns as you type
Import and export

Data in, data out

Load a CSV into a new or existing table, or run a .sql script, and export any result in the format you need.

  • Delimiter detected, columns mapped, types inferred for a new table
  • Bad rows skipped and reported, with live progress and Stop
  • Export as Text, CSV, JSON, Markdown or SQL INSERT
  • CSV and SQL exports import back cleanly, NULLs included

Everything you need. Nothing you don't.

Smart autocomplete

Fuzzy and context-aware: schema.table.column dot completion, quoted identifiers, aliases, CTEs and JOIN snippets.

Multi-statement scripts

Statements run in order on one connection, so temp tables, SET and scripted transactions hold. Every output gets its own tab.

Pinned transactions

BEGIN, COMMIT and ROLLBACK as SQL or from the toolbar. Queries run inside the tab's open transaction until it ends.

Streaming results

Rows render as the driver yields them, in a virtualized grid that scrolls smoothly through thousands of rows.

Query plan viewer

Estimated or measured plans as one tree on PostgreSQL, MySQL, MariaDB and SQLite. Type EXPLAIN yourself and it opens there too.

Schema explorer

Tables, views, columns, indexes, constraints, triggers and functions, with instant search and a row count that needs no tab.

Schema changes

Rename, truncate and drop from the tree. Each dialog shows the exact SQL for your engine, with Cascade on PostgreSQL.

Table backups

Structure and rows to a .sql file. The server writes every value as a literal, so dates, JSON and binary survive the round trip.

Edit data in the grid

Staged edits, deletes and new rows applied on demand, with undo, paste and foreign-key jumps, guarded by primary keys.

Cell and JSON viewers

A cell editor for large values (JSON, XML, HTML or text, beautified or minified) and a JSON view of the focused row.

CSV and SQL import

Column mapping, inferred types, configurable NULL text and header rows, or a .sql script run statement by statement.

One-click export

Text, CSV, JSON, Markdown or SQL INSERT, for all or the selected rows and columns, to the clipboard or a file.

Saved queries and history

Save and reuse queries with unsaved-change tracking, plus per-connection history with status and duration.

SSH tunnel

Reach a database only its bastion can see, with a key, a password or ssh-agent, and host keys checked against known_hosts.

Connection manager

Folders, tab colors and read-only mode, and a database list fetched from the server so you needn't remember names.

Keyboard-first

Quick Search jumps to tabs, tables, saved queries and connections. VS Code-style line commands, and every shortcut remappable.

Instant and polished

Dark and light themes, English, Deutsch and Български, no animations in the way, and your window restored where you left it.

Updates itself

A new release shows up with its notes. One click downloads it, checks its SHA-256 and restarts into it.

Screenshots

Click a screenshot to see it full size, then use the arrow keys to browse.

Keyboard-first

Every shortcut can be remapped in the app's shortcuts editor.

Quick Search
CtrlP
Run selection
CtrlEnter
Run all statements
CtrlShiftEnter
Explain the query plan
CtrlShiftE
Explain analyze
CtrlShiftA
Save the query, or apply staged edits
CtrlS
New tab / close tab
CtrlT / CtrlW
Reopen a closed tab
CtrlShiftT
Toggle sidebar / JSON viewer
CtrlB / CtrlJ
Set a cell to NULL
CtrlBackspace
Zoom in / out
Ctrl= / Ctrl-
Rename a saved query
F2

Download

No account needed: download it and run it.

Every build updates itself from inside the app. All of them, with their checksums, are on the latest release. Prefer to build it? cargo run -p barsql --release, as the README explains.

Portable by design

Everything lives in one BarSQL-data folder next to the app (beside the .app on macOS): connections, the editor session, history, saved queries and settings. Move both to a USB stick, a network drive or another computer and pick up where you left off.

When the app sits somewhere read-only, the folder goes to your user data directory instead, and BARSQL_DATA_DIR puts it anywhere you like.

BarSQL(.exe)
BarSQL-data/
  connections.json
  editor_session.json
  query_history.json
  saved_queries.json
  settings.json

Built with

One Rust codebase: a background Tokio runtime talks to the databases, so the UI thread only draws.

Ready to try BarSQL?

Free, open source and yours to keep, on Windows, macOS and Linux.