Profile
Back to NewsBack
GitHub Trending 6 min
Reader Mode
fj1981/dqex: AI-Native, Offline-First Database Workbench — Import/Export/Migrate/Compare/Snapshot with AI-Assisted SQL (Eino)

fj1981/dqex: AI-Native, Offline-First Database Workbench — Import/Export/Migrate/Compare/Snapshot with AI-Assisted SQL (Eino)

12 hours ago

dqex — AI-Native Database Workbench

dqex

The AI-Native, Offline-First Database Workbench

English · 简体中文

License: MIT</a> Go Version</a> ![Platform]() ![Databases]() CI</a>

Stars</a> Forks</a>


🚀 One Tool. Every Environment. Even the Air-Gapped Ones.

dqex is a cross-platform database workbench that ships as a single static binary — no JVM, no Electron, no installers, no network required. It packs export, import, migration, comparison, snapshots, Excel data dictionaries, a full SQL terminal, and an AI assistant into one tool, with both a polished Web UI and a scriptable CLI sharing one engine.

  • 🪶 Zero dependency — one binary, no runtime to ship. Copy it to a USB stick and run it on a bank's air-gapped server.
  • 🏢 Built for restricted networks — a built-in offline SQL template library, plus the compliance artifacts audits actually ask for (Excel data dictionaries, snapshot diff reports, exportable history) built in rather than bolted on.
  • 🤖 AI that cannot surprise you — it reads your real schema before writing anything, generates dialect-correct SQL, and never executes a write without your confirmation. Leave it unconfigured and the AI entry point does not even render.
  • 🌐 MySQL · PostgreSQL · Oracle with automatic dialect conversion for cross-database migration.
!
AI-Assisted SQL demo — the agent explores the real table schema, then generates verified SQL

⚡ Quick Start

1. Download the zip for your platform from the Releases page — macOS (Intel / Apple Silicon), Linux (x64 / arm64), Windows (x64). No installation required.

2. Unzip and run

unzip dqex-*.zip && cd dqex && ./start.sh
:: Windows
start.bat

3. Open the Web UI

http://127.0.0.1:8181

That's it — add a connection and start exporting, comparing or querying. Nothing leaves your machine.

Optional: install to PATH, run as a daemon, or stop it

./install.sh                    # install to /usr/local/bin (optional)
dqex                            # start Web UI at 127.0.0.1:8181
./start.sh -d                   # background daemon
./stop.sh                       # stop the daemon
install.bat                     :: install to %LOCALAPPDATA%\dqex and add to PATH
dqex                            :: start Web UI in a new terminal
start.bat -d                    :: background
stop.bat                        :: stop background service

Not a Web UI person? Every capability below also exists as a CLI command, and every command can emit JSON — see the CLI section further down.

✨ Feature Highlights

| Feature | Web | CLI | Description | |---|---|---|---| | Export | ✅ | export (exp) | Schema + data → SQL file (zip / gzip), conditional & consistent | | Import | ✅ | import (imp) | SQL / zip file → database, auto create tables, batch inserts | | Migrate | ✅ | migrate (mig) | Database → database, cross-dialect (e.g. MySQL → PostgreSQL) | | Compare | ✅ | compare (cmp) | Schema & data diff between two databases | | Data Dictionary | ✅ | dictionary (dict) | Tables + comments → styled Excel (.xlsx), audit-ready | | Snapshot | ✅ | snapshot (snap) | Full create / list / show / delete / compare lifecycle | | SQL Query | ✅ | sql | Web query terminal + table browser; CLI interactive REPL with JSON output | | AI-Assisted SQL | ✅ | \ai in sql | Agent probes real schema, generates SQL per dialect, requires confirmation | | Connections | ✅ | conn (cn) | Save / test / delete database connections | | Saved Tasks | ✅ | task (tk) | Reuse one-click task configs (--task ) | | History | ✅ | history (his) | Execution log for troubleshooting & audit export | | Shell Completion | — | completion | zsh / bash completion scripts |


🤔 Why dqex — and why not DBeaver?

If DBeaver works in your environment, use it. It is a bigger, more mature tool and it is free. dqex is not trying to win on breadth — it is built for the environments DBeaver structurally cannot enter.

| | dqex | DBeaver | Navicat | DataGrip | |---|---|---|---|---| | Install form | Single static binary | JVM + driver jars | Installer, licensed | IDE, licensed | | Air-gapped deploy | Copy and run | Manual JVM + jars | License constrained | License constrained | | Time to first query | Under a minute | Several minutes | Install + activate | Install + activate | | Cross-dialect migration | Built in, automatic | No | Yes | Partial | | Excel data dictionary | One command | Plugin | Yes | No | | Snapshot diff | Built in | No | No | No | | AI-assisted SQL | Built in, offline fallback | No | Limited | Limited | | Database breadth | MySQL, PostgreSQL, Oracle | Very wide | Wide | Wide | | Price | Free, MIT | Free | Paid per seat | Paid |

Where dqex is weaker: it supports three database engines, not twenty. If you need SQL Server, ClickHouse, MongoDB or anything outside MySQL / PostgreSQL / Oracle, DBeaver is the better answer today. Additional drivers are explicitly welcome as contributions.

Full comparison, including Bytebase and the known limitations: docs/COMPARISON.md.


🧑‍💻 CLI in 30 seconds

# Save a connection once, reuse everywhere
dqex conn add --name prod --type mysql --host 10.20.16.170 --port 3317 --un root --pw 'xxx'

Export with conditions & gzip → take it home

dqex exp camunda -s prod -o backup.sql.gz --table-cond "orders:created_at >= '2026-01-01'"

Restore to your local test database

dqex imp -t local_test -i backup.sql.gz --reset drop-and-create

Interactive SQL terminal (native dialect, runs on the target DB)

dqex sql -c prod dqex sql -c prod --json "SELECT id, name FROM users LIMIT 10" # agent-friendly JSON

Snapshot & compare — the killer feature for incident tracing

dqex snapshot create -c prod -n baseline dqex snapshot compare -c prod --a baseline --b after-deploy

Compliance: one command → styled Excel data dictionary

dqex dict camunda -s prod -o data_dict.xlsx

🤖 AI-Assisted SQL (Optional, Offline-Safe)

  • Real schema, not guesses — the agent queries your actual table structures before generating SQL (Web UI shows live progress)
  • Generate ≠ Execute — AI only produces SQL text; write operations require confirmation, dangerous statements are blocked, and you can \e-edit before running
  • Full assist loop\ai continue for follow-ups; Web UI supports generate / explain / optimize / fix with side-by-side diff preview and one-click apply
  • Keys stay local — API key stored on your machine; only masked endpoint & model name are shown
  • No config, no footprint — the AI entry only appears after BaseURL / API Key / Model are all configured; everything else keeps working untouched
  • Offline fallback — built-in SQL template library (\template top_n orders amount 10) works in fully isolated networks

🛠️ Build from Source

make dev                # Go :8181 + Vite :5281 with hot reload & debugging
make build              # single binary ./dqex (frontend embedded)
make release            # cross-platform packages → release/
make install            # → /usr/local/bin

🧱 Tech Stack

  • Backend: Go + infrakit (database dialect adaptation), Gin, embedded SQLite
  • Frontend: React + TypeScript + Vite + Tailwind CSS + shadcn/ui + Monaco Editor
  • Excel: excelize (pure Go, no CGO)
  • Distribution: single static binary with embedded frontend, dark mode, i18n (EN/中文)

📚 Documentation


🤝 Contributing

Contributions are what make open source great — and they earn you a place on the stargazers list too! ⭐

We welcome:

  • 🐛 Bug fixes (highest priority)
  • 📝 Documentation improvements (EN / 中文)
  • 🧩 New SQL templates for the offline library
  • 🗄️ Additional database driver support
  • 🎨 UI/UX polish
How to contribute:

  1. Fork the repo
  2. Create a branch: git checkout -b feature/your-feature
  3. Commit your changes: git commit -am 'feat: add something awesome'
  4. Push: git push origin feature/your-feature
  5. Open a Pull Request
Conventions: Go code follows gofmt; TypeScript follows ESLint + Prettier; commits follow Conventional Commits.

📄 License

MIT © 2026 fj1981

⭐ Star us on GitHub — it tells us you care, and helps more people discover the tool. Fork it, play with it, break it, and send us a PR!

Chat with me