A fast, keyboard-first database client built with Rust and GPUI.
DBFlux is an open-source database client written in Rust, built with GPUI (Zed's UI framework). It focuses on performance, a clean UX, and keyboard-first workflows.
The long-term goal is to provide a fully open-source alternative to DBeaver, supporting both relational and non-relational databases.
- Usage Guide — getting started: connect, query, chart, export
- Architecture — layered diagrams, query/connection flow, crate map
- Drivers Overview — supported databases, capabilities, limitations
- Charts — chart types, column kinds, axis auto-detection
- Contributing
- Release Process
- Code Style
- Agent Instructions
- Claude Instructions
- Audit
- AI + MCP Integration Guide
- Driver RPC Protocol
- RPC Services Config
- Lua Scripting
# Install to /usr/local (requires sudo)
curl -fsSL https://raw.githubusercontent.com/0xErwin1/dbflux/main/scripts/install.sh | sudo bash
# Install to ~/.local (no sudo required)
curl -fsSL https://raw.githubusercontent.com/0xErwin1/dbflux/main/scripts/install.sh | bash -s -- --prefix ~/.local# Download from releases (replace amd64 with arm64 for ARM)
wget https://github.com/0xErwin1/dbflux/releases/latest/download/dbflux-linux-amd64.AppImage
chmod +x dbflux-linux-amd64.AppImage
./dbflux-linux-amd64.AppImageAvailable in the AUR:
# Using an AUR helper
paru -S dbflux
# or
yay -S dbfluxDownload the .deb package from Releases:
# Replace amd64 with arm64 for ARM
wget https://github.com/0xErwin1/dbflux/releases/latest/download/dbflux-linux-amd64.deb
sudo dpkg -i dbflux-linux-amd64.debDownload the .rpm package from Releases:
# Replace amd64 with arm64 for ARM
sudo dnf install https://github.com/0xErwin1/dbflux/releases/latest/download/dbflux-linux-amd64.rpmUsing flakes (the default package is a prebuilt binary for Linux x86_64 / aarch64, no compilation):
# Run directly (prebuilt)
nix run github:0xErwin1/dbflux
# Install to profile (prebuilt)
nix profile install github:0xErwin1/dbflux
# Development shell
nix develop github:0xErwin1/dbfluxBuild from source instead of using the prebuilt binary:
nix run github:0xErwin1/dbflux#dbflux-source
nix build github:0xErwin1/dbflux#dbflux-sourceNixOS / nix-darwin via overlay:
{
inputs.dbflux.url = "github:0xErwin1/dbflux";
outputs = { nixpkgs, dbflux, ... }: {
nixosConfigurations.myhost = nixpkgs.lib.nixosSystem {
modules = [
({ pkgs, ... }: {
nixpkgs.overlays = [ dbflux.overlays.default ];
environment.systemPackages = [
pkgs.dbflux # prebuilt binary, no local compile
# pkgs.dbflux-source # alternative: build from source
];
})
];
};
};
}DBFlux for macOS is not signed with an Apple developer certificate. When opening for the first time, you'll see a warning about an "unidentified developer".
- Download the DMG for your architecture from Releases:
- Intel Macs:
dbflux-macos-amd64.dmg - Apple Silicon (M1/M2/M3/M4):
dbflux-macos-arm64.dmg
- Intel Macs:
- Open the DMG and drag DBFlux to Applications
- When you see the "unidentified developer" warning:
- Go to System Settings → Privacy & Security
- Click Open Anyway next to the security warning
- Confirm you want to open the application
# Remove quarantine attribute (allows opening without GUI confirmation)
xattr -cr /Applications/DBFlux.app
# Now you can open it normally
open /Applications/DBFlux.app- macOS 11.0 (Big Sur) or later
- Download
dbflux-windows-amd64-setup.exefrom Releases - Run the installer and follow the wizard
- Download
dbflux-windows-amd64.zipfrom Releases - Extract to any folder
- Run
dbflux.exe
Note: The executable is not signed with a Windows code signing certificate. Windows SmartScreen may show a warning. Click "More info" → "Run anyway" to proceed.
- Windows 10 or later
- x86_64 (ARM64 not yet supported)
# Via install script (Linux)
curl -fsSL https://raw.githubusercontent.com/0xErwin1/dbflux/main/scripts/install.sh | bash -s -- --build
# Or manually
git clone https://github.com/0xErwin1/dbflux.git
cd dbflux
# Recommended: build with the full default feature set
cargo build --release --features sqlite,postgres,mysql,mssql,mongodb,redis,dynamodb,cloudwatch,influxdb,lua,aws,mcp
# Minimal build (relational drivers only, no AI/MCP, no Lua)
cargo build --release --no-default-features --features sqlite,postgres,mysql
./target/release/dbflux# If installed with install.sh
curl -fsSL https://raw.githubusercontent.com/0xErwin1/dbflux/main/scripts/uninstall.sh | sudo bash
# From ~/.local
curl -fsSL https://raw.githubusercontent.com/0xErwin1/dbflux/main/scripts/uninstall.sh | bash -s -- --prefix ~/.local
# Remove user config and data too
./scripts/uninstall.sh --remove-config- PostgreSQL with SSL/TLS modes (Disable, Prefer, Require)
- MySQL / MariaDB
- SQLite for local database files
- Microsoft SQL Server (TDS) with TLS, SQL Browser named-instance routing, and multi-schema introspection
- MongoDB with collection browsing, document CRUD, and shell query generation
- Redis with key browsing for all types (String, Hash, List, Set, Sorted Set, Stream)
- DynamoDB with table browsing, item CRUD, and AWS authentication
- InfluxDB v1 and v2 (InfluxQL on v1, InfluxQL + Flux on v2)
- CloudWatch Logs with log group/stream browsing and event streaming
- External drivers over RPC (register out-of-process drivers via the Driver RPC Protocol)
See docs/DRIVERS.md for a full capability matrix and per-driver limitations.
- Document-based workspace with multiple result tabs (like DBeaver/VS Code)
- Collapsible, resizable sidebar with ToggleSidebar command (Ctrl+B)
- Schema tree browser with lazy loading for large databases
- Schema-level metadata: indexes, foreign keys, constraints, custom types (PostgreSQL)
- Stored procedures / routines folder per schema (drivers that expose them)
- Multi-tab SQL editor with syntax highlighting and multi-statement execution (one result set per statement, where the driver supports it)
- Virtualized data table with column resizing, horizontal scrolling, and sorting
- Table browser with WHERE filters, custom LIMIT, and pagination
- Workspace inspector rail for row/document details
- "Copy as Query" context menu to copy INSERT/UPDATE/DELETE as SQL, MongoDB shell, or Redis commands
- Query preview modal with language-specific syntax highlighting
- Command palette with fuzzy search
- Custom toast notification system with auto-dismiss
- Background task panel
- Session restore: open tabs are restored on startup with conflict detection for externally modified files
- Chart any query or collection result: Line, Bar, Scatter, Area, Stacked Bar, and Pie
- Automatic axis detection from column kinds (timestamp X axis, numeric Y series) — no per-driver heuristics
- Saved charts that reopen as their own document tab
- See docs/CHARTS.md for details
- SSH tunnels with key, password, and agent authentication; reusable SSH tunnel profiles
- SOCKS5 / HTTP CONNECT proxy tunnels with reusable proxy profiles
- Managed access providers (AWS SSM) for connecting without exposing ports
- Provider-driven auth profiles (e.g. AWS SSO/shared/static), with import from
~/.aws/config - Connection hooks at PreConnect/PostConnect/PreDisconnect/PostDisconnect, runnable as a command, a script, or in-process Lua
- Built-in Model Context Protocol (MCP) server (
dbflux mcp) for AI clients - Governance layer: operation classification, role/policy engine, trusted clients, and human approval flow for write/destructive operations
- See docs/MCP_AI_INTEGRATION.md
- SQLite-backed audit log for queries, connections, hooks, scripts, MCP, governance, and config events, with redaction and query fingerprinting — see docs/AUDIT.md
- Lua, Python, and Bash scripts run as documents with live streamed output — see docs/LUA.md
- Vim-style navigation (
j/k/h/l) throughout the app - Context-aware keybindings (Document, Sidebar, BackgroundTasks)
- Document focus with internal editor/results navigation
- Results toolbar:
fto focus,h/lto navigate,Enterto edit/execute,Escto exit - Toggle sidebar with
Ctrl+B - Tab switching (MRU order) with
Ctrl+Tab/Ctrl+Shift+Tab
- Query history with timestamps
- Saved queries with favorites
- Search across history and saved queries
- Shape-based export: CSV, JSON (pretty/compact), Text, Binary (raw/hex/base64)
- Export format determined by result type (table, JSON, text, binary)
On Linux, the mold linker is required for local builds: the repo's
.cargo/config.toml links the x86_64-unknown-linux-gnu target with
-fuse-ld=mold to cut link time and memory across the 60+ workspace crates.
The Nix dev shell provides it automatically; for non-Nix setups install it via
your package manager (included below). Windows and macOS use their default
linker and are unaffected.
Ubuntu/Debian:
sudo apt install pkg-config libssl-dev libdbus-1-dev libxkbcommon-dev moldFedora:
sudo dnf install pkg-config openssl-devel dbus-devel libxkbcommon-devel moldArch:
sudo pacman -S pkg-config openssl dbus libxkbcommon moldmacOS:
# Xcode Command Line Tools (required)
xcode-select --installWindows:
# Visual Studio Build Tools with C++ workload (required)
# Download from: https://visualstudio.microsoft.com/visual-cpp-build-tools/cargo build -p dbflux --releasecargo run -p dbfluxcargo check --workspace # Type checking
cargo clippy --workspace -- -D warnings # Lint
cargo fmt --all # Format
cargo test --workspace # Testscargo-nextest is the recommended test runner for this
workspace: it runs each test in its own process across a global pool, which is
noticeably faster than cargo test on a workspace this size. The Nix dev shell
provides it; otherwise install it from https://nexte.st/docs/installation.
cargo nextest run --workspace # unit + integration tests
cargo test --doc --workspace # doctests (nextest does not run these)Live integration tests (normally #[ignore]d) use a different flag under nextest:
cargo nextest run -p dbflux_driver_sqlite --run-ignored allIf you use Nix, you can enter a development shell with all dependencies:
# With flakes
nix develop
# Traditional
nix-shellMIT & Apache-2.0
