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.
A native, GPU-rendered app with no accounts and no telemetry.
Drawn on the GPU with GPUI, the UI framework behind the Zed editor: one Rust codebase from the database drivers to the window.
Everything runs and stays on your machine. No account, no sign-in, no telemetry: your connections and queries never leave your computer.
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.
Whole-window UI tests drive the app with real keystrokes and clicks, and end-to-end suites run against real PostgreSQL, MySQL, MariaDB, SQL Server, ClickHouse and libSQL servers.
The work you do every day, without the detours.
Suggestions know your schema and your engine: tables, columns, aliases and CTEs, every built-in function with its arguments, and JOIN snippets where a join fits.
:name parameters ask for their values, and remember themPRINT output in a Messages tabBEGIN, then commit or roll back from the toolbarExplain shows the planner's estimate; Explain analyze runs the statement and reports what really happened. Every engine's plan lands in the same tree, with costs and timings wherever the engine reports them.
UPDATE statementsBrowse any table, filter it with a WHERE condition that autocompletes, and change it in place. A query's results edit the same way, when they come from one table with its primary key.
The Chart button plots any result as bars or lines, beside the grid it came from. Pick the labels and up to five values, summed, counted or averaged where labels repeat.
Schemas, tables and columns, then indexes, constraints, triggers and functions, fetched only when you open them.
.sql file that restores it exactlyALTEREdit a table's columns, indexes, foreign keys and checks in a Structure tab, or design a new table there. The SQL it will run sits right below, and follows every edit.
ALTER TABLE on MySQLALTER can't do the jobLoad a CSV into a new or existing table, or run a .sql script, and export any result in the format you need.
INSERTs in your engine's own syntaxlist_connections shared connections
list_tables schemas and tables
describe_table columns and keys
show_ddl CREATE statements
run_query read-only SQL
explain_query query plans
run_change changes you allow
BarSQL is an MCP server too. Claude, Cursor, VS Code and other AI apps start BarSQL --mcp in the background, with no window, and work with the connections you share.
The same editor, grid, schema tree and plan viewer on every engine, speaking each one's own dialect. Read-only connections are refused by BarSQL and, wherever the engine allows, by the server as well.
disable, require, verify-fullSHOW CREATE DDLstrict, and named instancesGO batches, with PRINT output in the Messages tabSET and USE holdreadonly=2 on the server tooArray, Map and Tuple values read as JSONsqld, with an auth tokensqld| Feature | PostgreSQL | MySQL / MariaDB | SQL Server | ClickHouse | Turso / libSQL | SQLite |
|---|---|---|---|---|---|---|
| Read-only mode | Yes | Yes | Yes | Yes | Yes | Yes |
| SSH tunnel | Yes | Yes | Yes | Yes | 1Yes, self-hosted sqld only | Not applicable |
| Transactions pinned to a tab | Yes | Yes | Yes | No | 2No, though a script's own BEGIN … COMMIT works | Yes |
| Edit rows and query results | Yes | Yes | Yes | No | Yes | Yes |
| Structure editor | Yes | Yes | Yes | 3Yes, columns only | Yes | Yes |
| Function completion and hover | Yes | Yes | Yes | Yes | Yes | Yes |
| Messages tab | Yes | Yes | Yes | No | No | No |
| System views | Yes | Yes | Yes | Yes | No | No |
| Query plan tree | Yes | Yes | Yes | Yes | Yes | Yes |
| Measured plans (explain analyze) | Yes | Yes | Yes | No | No | No |
| Copy DDL and table backups | Yes | Yes | Yes | Yes | Yes | Yes |
| AI assistants (MCP) | Yes | Yes | 4Yes, with a read-only login | Yes | 4Yes, with a read-only token | Yes |
1 To a self-hosted sqld; Turso Cloud is reached directly.
2 Turso holds no transaction between runs, but a script's own BEGIN … COMMIT works.
3 Columns only.
4 The server doesn't refuse writes by itself here, so give the AI's connection a read-only login or token.
ClickHouse has no transactions and no primary keys to edit rows by, so its tables are browse-only.
Fuzzy and context-aware: schema.table.column dot completion, quoted identifiers, aliases, CTEs and JOIN snippets.
Every built-in function of your engine, plus the server's own, completes with its arguments. Hover one for its signatures and what it does.
Add a cursor at the next occurrence or at every one, and edit them all at once. Line commands, go to definition and go to line work as in VS Code.
PostgreSQL notices, MySQL warnings and SQL Server PRINT output, grouped under the statement that raised them, with levels and codes.
Statements run in order on one connection, so temp tables, SET and scripted transactions hold. SQL Server scripts run by GO batch.
BEGIN, COMMIT and ROLLBACK as SQL or from the toolbar. Queries run inside the tab's open transaction until it ends.
Rows render as the driver yields them, in a virtualized grid that scrolls smoothly through thousands of rows.
Plot a result as bars or lines: pick the labels and up to five value columns, summed, counted or averaged.
Estimated or measured plans as one tree on every engine, with heat bars and flagged estimates. Type EXPLAIN yourself and it opens there too.
Activity, blocking, sessions and running queries, or a table's statistics, index usage, parts and merges, each in a tab you can tweak.
Tables, views, columns, indexes, constraints, triggers and functions, with type and key icons, instant search and a row count that needs no tab.
Every table and key of a schema in a diagram you can pan, zoom and search, and a compare with another schema that writes the sync script.
Edit columns, indexes, foreign keys and checks, or design a new table. The exact SQL shows as you go, in a script your engine can apply safely.
Rename, truncate and drop from the tree. Each dialog shows the exact SQL for your engine, with Cascade on PostgreSQL.
Structure and rows to a .sql file. The server writes every value as a literal, so dates, JSON and binary survive the round trip.
In a table, or a query's results from one: staged edits, deletes and new rows with undo, paste and foreign-key jumps, checkboxes for booleans and pickers for enums.
A cell editor for large values (JSON, XML, HTML or text), and a JSON view of the row. PostgreSQL arrays and ClickHouse maps and tuples read as JSON too.
Column mapping, inferred types, configurable NULL text and header rows, or a .sql script run statement by statement.
Text, CSV, JSON, Markdown or SQL INSERT written for your engine, for all or the selected rows, to the clipboard or a file.
Save and reuse queries with unsaved-change tracking, plus per-connection history with status and duration, filterable to failed runs.
Ask before changes on production connections, a check before an UPDATE or DELETE without WHERE, and read-only mode the server enforces too, where it can.
Reach a database only its bastion can see, with a key, a password or ssh-agent, and host keys checked against known_hosts.
Folders, tab colors, read-only mode and a database list fetched from the server, plus SQL Server named instances and Turso tokens.
Load extensions such as cr-sqlite into a connection each time it opens. Their functions complete and show on hover, and Test says why a file didn't load.
Quick Search jumps to tabs, tables, saved queries and connections, and the command palette runs any command, with its shortcut. Shortcuts are remappable.
Dark and light themes that can follow the system, English, Deutsch, Български and Español, no animations in the way, and your window restored where you left it.
A new release shows up with its notes. One click downloads it, checks its SHA-256 and restarts into it.
Click a screenshot to see it full size, then use the arrow keys to browse.
Most can be remapped in the app's shortcuts editor. The editor's own keys work as in VS Code.
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
One Rust codebase: a background Tokio runtime talks to the databases, so the UI thread only draws. ClickHouse and Turso go through BarSQL's own small HTTP client, which also runs over SSH.
Free, open source and yours to keep. No account needed: download it and run it.
A portable 64-bit build: unzip it and run, no installer needed.
Download .zipOne universal app for Apple Silicon and Intel, on macOS 12 or later.
Download .dmgA portable x86-64 build, plus packages for Debian, Ubuntu, Fedora, RHEL and Arch.
Download .tar.gz
Every build updates itself from inside the app. All of them, with their checksums, are on the
latest release.
The Windows build isn't signed yet, so Windows asks once before the first launch:
here's how.
Prefer to build it? cargo run -p barsql --release, as the
contributing guide explains.