Skip to content

Bare7a/XenSQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

24 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

⚑ XenSQL

Go Wails License Status

A fast, local-first SQL workbench built with Go + Wails.

No cloud. No accounts. No telemetry.
Just a focused, native desktop tool for working with databases.


⬇️ Download

Grab the latest build for Windows, macOS, or Linux from the Releases page - no installer, no account, just download and run.

Prefer to build it yourself? See Installation & Development below.


πŸš€ Try it in seconds

wails3 task build

Or during development:

wails3 dev

⚑ SQL tools are usually overkill. XenSQL isn’t.

Work with SQLite, PostgreSQL, and MySQL / MariaDB in a single fast desktop app that runs entirely on your machine.

🧳 Portable
⚑ Fast startup
πŸ”’ Local-first
🧠 Developer-focused


πŸ‘‰ Everything you need. Nothing you don’t.

  • Query faster with smart, schema-aware autocomplete
  • Stream results - rows arrive as the driver yields them
  • Run multi-statement scripts and get a result tab per output
  • Explore schemas instantly
  • Save and reuse queries
  • Export anything in one click

πŸ–₯️ Screenshots


Editor - autocomplete Β· streaming results Β· JSON row view

Transactions & multiple results - per-tab begin/commit/rollback Β· a result tab per statement

Table data - browse rows; stage edits before apply

Cell editor - JSON, XML, HTML, or text with beautify

Grid - row/column select, context menu, export

Export - CSV, JSON, Markdown, or SQL inserts

Connections - SSL, read-only mode, tab colors

Quick Search - Ctrl+P for tabs, tables, queries

Appearance - dark or light theme, zoom, language support

⚑ What XenSQL is

XenSQL is a desktop SQL client built for developers who want speed, clarity, and control.

It combines:

  • ⚑ Go backend for performance
  • πŸ–₯️ Wails for native desktop packaging (uses the OS webview)
  • βš›οΈ React + TypeScript UI
  • ✍️ Monaco Editor for a real IDE-like SQL experience

🚨 Why it exists

Most SQL tools today are:

  • heavy Electron apps
  • cloud-connected by default
  • tied to subscriptions or accounts
  • overloaded with features you don’t use

XenSQL focuses on one thing:

A fast, local environment for working with databases.


⚑ Features

πŸ—„οΈ Supported Databases

Database Read & write Read-only mode Secure transport Notes
PostgreSQL βœ… βœ… SSL - disable / require / verify-full via pgx
MySQL βœ… βœ… TLS
MariaDB βœ… βœ… TLS MySQL-compatible
SQLite βœ… βœ… local file file-picker workflow

πŸ”Œ Connections

  • Create, edit, test, and manage database connections
  • Organize into folders with drag-and-drop reorder
  • Per-connection tab colors
  • Read-only mode with defense-in-depth - blocked at both the Wails layer and inside each driver
  • PostgreSQL SSL (disable / require / verify-full) and MySQL TLS
  • SQLite file picker workflow

🧠 SQL Editor

  • Tabbed workspace with drag-and-drop tabs and session restore
  • Monaco-powered editing with custom dark/light themes
  • Smart autocomplete - substring + prefix matching, context-aware (SELECT / FROM / JOIN / WHERE / UPDATE / DELETE / INSERT), schema.table.column dot completion, quoted identifiers and aliases
  • Built-in snippets - JOIN, SELECT * FROM, aggregate functions
  • Driver-correct identifier quoting (PostgreSQL, MySQL, SQLite)
  • Run selection (Ctrl+Enter) / run all (Ctrl+Shift+Enter) / stop long-running queries
  • Streaming results - rows render as the driver yields them
  • Multi-statement scripts - run several ;-separated statements at once; they execute in order on one connection, so temp tables, SET, and scripted BEGIN / COMMIT hold
  • Multiple result outputs - a script or stored procedure that returns several result sets shows each in its own switchable result tab; a failing statement reports its error and stops the run
  • Pinned transactions per tab - run BEGIN / COMMIT / ROLLBACK as SQL or from the toolbar; queries run inside the open transaction until you commit or roll back
  • UPDATE / DELETE / INSERT with RETURNING flow back to the Results Grid
  • Gutter icons to run individual statements
  • Right-click menu with format SQL
  • Remappable keyboard shortcuts

πŸ—ƒοΈ Schema Explorer

  • Tree view: schemas β†’ tables β†’ columns
  • Search tables and columns instantly
  • Double-click a table β†’ SELECT in a new tab
  • Ctrl+double-click β†’ browse table data in the grid (editable when primary keys exist)
  • Refresh schema on demand

πŸ“Š Results Grid

  • Virtualized grid - smooth scroll over thousands of rows
  • Result-set tabs - switch between outputs when a run returns multiple result sets
  • Sortable columns with auto-sized widths and per-tab persistence
  • Keyboard-first navigation (arrows, Shift+select, Enter for cell viewer)
  • Column/row selection with Ctrl+click and Shift+click; Ctrl+C copies as TSV
  • Cell editor for large values - JSON, XML, HTML, or plain text; beautify/minify; editable in table view
  • JSON / JSONB auto-parsed in cell and side viewer
  • Side JSON row viewer with filter / regex search, synced to focused row

✏️ Editing Data

View and modify table data directly in the grid - no hand-written UPDATE / DELETE (writable connections):

  • Browse any table's rows (Ctrl+double-click a table in the Schema Explorer)
  • Inline edit cells in place - changes are staged, then applied on demand
  • Insert new rows and bulk-delete selected ones
  • Safe by design: edits require a primary key, and read-only connections are blocked at both the Wails layer and inside the driver
  • INSERT / UPDATE / DELETE … RETURNING results flow straight back into the grid

πŸ“š Query Library & History

  • Saved queries - name, filter, sort, link tabs with dirty-state tracking
  • Save, update, rename, and delete from the sidebar or toolbar
  • Per-connection query history with success/error and duration
  • Clear history per connection or delete individual entries

πŸ“€ Export

  • CSV / JSON / Markdown / SQL INSERT
  • Export all or selected rows and columns
  • Copy to clipboard or save to file
  • Remembers your last export format

🌍 UX

  • Dark & light themes
  • English, Deutsch, and Π‘ΡŠΠ»Π³Π°Ρ€ΡΠΊΠΈ
  • Quick Search palette (Ctrl+P) - jump to connections, saved queries, history, tabs
  • Custom shortcuts editor + keyboard tips
  • Frameless native title bar

⌨️ Keyboard Shortcuts

Every shortcut is remappable in the in-app shortcuts editor.

Action Shortcut
Quick Search palette Ctrl/⌘ + P
Run selection Ctrl/⌘ + Enter
Run all statements Ctrl/⌘ + Shift + Enter
Save query Ctrl/⌘ + S
Rename saved query F2
New / close tab Ctrl/⌘ + T / Ctrl/⌘ + W
Next / previous tab Ctrl/⌘ + Tab / Ctrl/⌘ + Shift + Tab
Toggle sidebar / JSON panel Ctrl/⌘ + B / Ctrl/⌘ + J
Zoom in / out / reset Ctrl/⌘ + = / Ctrl/⌘ + - / Ctrl/⌘ + 0
Editor font size + / βˆ’ Ctrl/⌘ + Shift + . / Ctrl/⌘ + Shift + ,
Fullscreen F11

🧳 Portable by Design

Everything lives in a single XenSQL-data/ folder:

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

settings.json keeps your UI preferences - theme, language, layout, and keyboard shortcuts.

When the app sits somewhere writable, that folder is created right next to the executable (beside the .app bundle on macOS) - move it to a USB stick, network drive, or another PC and it just works.

If the app lives in a read-only location (e.g. /Applications or a system path), it falls back to the OS per-user data directory instead:

  • macOS β†’ ~/Library/Application Support/XenSQL-data
  • Linux β†’ ~/.config/XenSQL-data
  • Windows β†’ %AppData%\XenSQL-data

Override the location with XENSQL_DATA_DIR. During wails3 dev it's ./XenSQL-data in the project root.


πŸ–₯️ Built with Wails

XenSQL uses Wails v3, which embeds a web UI into a native desktop app.

  • Go runs backend logic
  • UI runs in the OS-native webview:
    • Windows β†’ WebView2
    • macOS β†’ WebKit
    • Linux β†’ WebKitGTK
  • No bundled Chromium like Electron

βš™οΈ Installation & Development

Requirements

  • Go 1.26+
  • Wails v3 CLI (wails3)
  • Node.js 24.16+

Dev setup

go install github.com/wailsapp/wails/v3/cmd/wails3@latest

# wails3 dev installs frontend deps, generates bindings, and launches the app
wails3 dev

Build

wails3 task build       # or: wails3 task package  (platform bundle/installer)

Output:

bin/XenSQL(.exe)        # bin/XenSQL.app on macOS

🧱 Project Structure

β”œβ”€β”€ main.go                # Wails entry point (embeds frontend/dist)
β”œβ”€β”€ docker-compose.yml     # PostgreSQL / MySQL / MariaDB for the E2E suite
β”œβ”€β”€ Taskfile.yml           # dev tasks: build / test / e2e (run via `task` or `wails3 task`)
β”œβ”€β”€ internal/
β”‚   β”œβ”€β”€ app/               # Wails App API bindings + tests (connections, query, history, …)
β”‚   β”œβ”€β”€ database/          # Driver interface + SQLite / PostgreSQL / MySQL
β”‚   β”œβ”€β”€ storage/           # JSON persistence (incl. settings.json)
β”‚   β”œβ”€β”€ paths/             # Portable data directory
β”‚   └── service/           # SQL format, export helpers
β”œβ”€β”€ frontend/              # React + TypeScript + Monaco (Vitest tests)
└── test/                  # TESTING.md - how to run all suites

🧰 Tech Stack

Layer Technology
Backend Go
Desktop Wails v3
UI React + TypeScript
Editor Monaco Editor
PostgreSQL pgx
MySQL go-sql-driver/mysql
SQLite modernc.org/sqlite
Tables TanStack Virtual
State Zustand
Icons Lucide
i18n i18next

πŸ“„ License

See LICENSE.

About

A fast, local-first SQL workbench built with Go, Wails and React.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors