Chat2DB is a free, open source databases project written in Java and released under a custom open-source licence. It has 28,136 GitHub stars, 3,034 forks and 269 open issues, and was last pushed 6 hours ago. On this registry it ranks #18 of 81 tracked projects in Databases, with 5 head-to-head comparisons available. It gained 22 stars over the last 6 tracked days.

What is Chat2DB?

Chat2DB is a free, cross-platform, AI-powered database client and SQL workspace from OtterMind that turns natural language into SQL, built for developers, DBAs, analysts and data teams who want the tool running on their own machine rather than in a vendor's cloud.

What it is

Chat2DB Community is a free, cross-platform database client for Windows, macOS and Linux that runs entirely on the user's machine. It combines a full-featured SQL workspace with an AI assistant that the user connects to a model of their own choosing, so SQL generation, explanation and optimization happen through the user's own model rather than a bundled service. It sits in the Infrastructure & Operations / Databases category of this registry, is written in Java, and is published by OtterMind.

The concrete problem it solves is the fragmentation of database tooling. Rather than installing and learning a separate client for every engine in a stack, one application speaks to more than forty databases, and new JDBC databases can be added through configuration only, without code changes. In that sense it replaces the pile of per-engine, per-vendor client installs that a developer or DBA would otherwise maintain, and it adds a natural-language layer on top of the same editor that handles ordinary query work.

Key capabilities

  • Connects to over forty databases, including MySQL, PostgreSQL, Oracle, SQL Server, ClickHouse, MongoDB, Redis, SQLite, MariaDB, TiDB, Hive, DB2, Snowflake, BigQuery, Elasticsearch, Trino, TimescaleDB, Greenplum, YugabyteDB, CrateDB, QuestDB, Apache IoTDB, Firebird, HSQLDB and Apache Derby, with further engines added through JDBC configuration alone.
  • Provides a SQL workspace covering editing, completion, formatting, execution, saved SQL and execution history.
  • Includes an AI assistant that uses a model the user brings, to generate, explain and optimize SQL from natural language.
  • Handles database management: browsing metadata, managing tables and objects through DDL and DML, and editing data in place.
  • Supports data import and export, alongside dashboards and charts.
  • Ships an open-source CLI, Chat2DB-CLI, with MCP support.
  • Runs cross-platform on Windows, macOS and Linux from a single application.

Who uses it and how

  • Individual developers and DBAs run the desktop application locally, switching between the engines their work touches without changing tools.
  • Teams that want AI-assisted SQL while keeping models under their own control connect the assistant to a model they bring, rather than to a vendor-hosted one.
  • Analysts and data teams use the dashboards, charts and visual data management for exploration, and the import and export features for moving data in and out.
  • Operators who prefer a browser interface deploy the Docker image on a workstation or internal host; the README specifies 2+ CPU cores and 4+ GiB RAM, with the service bound to 127.0.0.1:10825.
  • It is a single-user application: there are no user accounts and no authorization boundaries between users, which shapes it toward personal and workstation deployments rather than shared multi-tenant platforms.

Getting started

Installers for Windows, macOS and Linux are available from GitHub Releases, and no further setup is required after installation. Alternatively, run the Docker image chat2db/chat2db:latest after creating the encryption key with ./script/security/init-community-encryption-key.sh, or use the bundled docker/docker-compose.yml; the container requires Docker 19.03.0+ and, for the Compose variant, Docker Compose 2.0.0+.

How it compares

The facts provided do not name any paid products that Chat2DB replaces, and no comparable database clients are named either. On the evidence available, it stands alone in this registry.

When to use it — and when not to

Choose it when a single local client for many engines, plus optional AI assistance under your own model, is worth running yourself — but a self-hoster must manage the Docker container or desktop install, keep the encryption key file (for example ~/.config/chat2db-community/encryption.key) across rebuilds, and keep the HTTP service bound to 127.0.0.1 or ::1. Do not pick it for shared, multi-user deployment, because Chat2DB Community has no user accounts and no authorization boundaries between users. Two further cautions are visible in the facts: the licence is recorded as NOASSERTION, which leaves the terms of use unclear, and custom JDBC drivers are executable Java code, so they should be installed only from trusted sources; note also that Chat2DB Community 5.3.0 uses /root/.chat2db-community and does not automatically migrate data from earlier images that used /root/.chat2db.

project readme (upstream, from github) — read inline

Powered by OtterMind


An AI-powered database client and SQL workspace for developers, DBAs, analysts, and data teams.

README in English 简体中文版自述文件 日本語のREADME README en español 한국어 README

What is Chat2DB?

Chat2DB Community is a free, cross-platform database client for Windows, macOS, and Linux. It runs entirely on your machine and combines a full-featured SQL workspace with an AI assistant that you connect to your own model.

  • 40+ databases — MySQL, PostgreSQL, Oracle, SQL Server, ClickHouse, MongoDB, Redis, SQLite, MariaDB, TiDB, Hive, DB2, Snowflake, BigQuery, Elasticsearch, Trino, TimescaleDB, Greenplum, YugabyteDB, CrateDB, QuestDB, Apache IoTDB, Firebird, HSQLDB, Apache Derby, and more via plugins — new JDBC databases can be added through configuration only, without code changes.
  • SQL workspace — editing, completion, formatting, execution, saved SQL, and execution history.
  • AI assistant — bring your own AI model to generate, explain, and optimize SQL in natural language.
  • Database management — browse metadata, manage tables and objects (DDL/DML), and edit data in place.
  • Data import and export, dashboards and charts, and an open-source CLI with MCP support.

Chat2DB workspace with SQL editor and AI assistant — click to watch the intro video

Screenshots

Dashboards and charts ER diagrams
Dashboards and charts ER diagram
Visual data management Data import and export
Visual data management Data import and export

Quick Start

Option 1: Desktop App

Download the installer for your platform from GitHub Releases, install it, and start connecting to your databases. No further setup is required.

Option 2: Docker

Requirements: Docker 19.03.0+, Docker Compose 2.0.0+ (Compose V2, only for the Compose variant), 2+ CPU cores, 4+ GiB RAM.

First create the encryption key (see Encryption Key for why it matters), then start the container:

# Run once from a repository checkout. Re-running reuses the same valid key.
git clone https://github.com/OtterMind/Chat2DB.git && cd Chat2DB
./script/security/init-community-encryption-key.sh

docker run --detach \
  --name chat2db-community \
  --restart unless-stopped \
  --publish 127.0.0.1:10825:10825 \
  --volume "$HOME/.chat2db-community-docker:/root/.chat2db-community" \
  --env CHAT2DB_COMMUNITY_ENCRYPTION_KEY_FILE=/run/secrets/chat2db-community-encryption.key \
  --volume "$HOME/.config/chat2db-community/encryption.key:/run/secrets/chat2db-community-encryption.key:ro" \
  chat2db/chat2db:latest

Then open http://localhost:10825 in your browser.

Alternatively, use the bundled Compose definition:

./script/security/init-community-encryption-key.sh
docker compose --file docker/docker-compose.yml up --detach

Notes:

  • To update, pull the new image, remove the old container, and run the start command again. Keep ~/.config/chat2db-community/encryption.key across rebuilds.
  • The docker run example stores application data in $HOME/.chat2db-community-docker; the Compose definition uses the chat2db-community-data named volume. These locations do not share data.
  • Chat2DB Community 5.3.0 uses the independent /root/.chat2db-community directory and does not automatically migrate data from earlier images that used /root/.chat2db.

Security Notes

Chat2DB Community is a single-user, local-first application. It has no user accounts or authorization boundaries between users. Keep the HTTP service bound to 127.0.0.1 or ::1 and do not expose it to other users or untrusted networks.

Custom JDBC drivers are executable Java code — install them only from sources you trust. Imported configuration files, archives, SQL files, database contents, and AI responses remain untrusted data. See the Security Policy for the complete trust boundary and vulnerability reporting process.

If you find this project useful, please give us a Star ⭐️ — it really helps!

Star Chat2DB on GitHub

Encryption Key

Chat2DB Community encrypts stored datasource passwords and AI model API keys with AES-256-GCM using a per-installation key. Create it once from a repository checkout (requires openssl):

./script/security/init-community-encryption-key.sh

The key is written to ~/.config/chat2db-community/encryption.key. Back this file up separately and keep it across upgrades and container rebuilds — replacing or losing it makes previously stored datasource passwords and AI model API keys unreadable. Web/headless startup fails when no valid key is provided; only Desktop mode creates a missing key automatically.

Key configuration reference (custom paths, resolution order, validation)

The key must be valid Base64 that decodes to exactly 32 bytes. The bundled initializer generates the standard padded form: 44 Base64 characters ending in =. It is cryptographic key material, not a human-readable password. Datasource passwords and AI API keys use the same key with separate authenticated AAD values, so ciphertext from one purpose cannot be decrypted as the other.

To use a custom path, pass it to the script and configure the same path when starting Chat2DB:

./script/security/init-community-encryption-key.sh /secure/path/chat2db-community.key

java -Dloader.path=chat2db-community-server/chat2db-community-start/target/lib \
    -Dchat2db.runtime.mode=community \
    -Dchat2db.mode=WEB \
    -Dchat2db.gui=false \
    -Dchat2db.network.status=OFFLINE \
    -Dchat2db.community.encryption-key-file=/secure/path/chat2db-community.key \
    -Dserver.address=127.0.0.1 \
    -Dserver.port=10825 \
    -jar chat2db-community-server/chat2db-community-start/target/chat2db-community.jar

The script's key-file path priority is the positional argument, CHAT2DB_COMMUNITY_ENCRYPTION_KEY_FILE, then the default path. It reuses a valid regular file, rejects symbolic links and non-regular files, and refuses to overwrite an invalid file. Keep the key readable only by the Chat2DB process owner.

Key configuration is resolved in this order:

  1. JVM property chat2db.community.encryption-key containing the Base64 key.
  2. Environment variable CHAT2DB_COMMUNITY_ENCRYPTION_KEY containing the Base64 key.
  3. JVM property chat2db.community.encryption-key-file containing a key-file path.
  4. Environment variable CHAT2DB_COMMUNITY_ENCRYPTION_KEY_FILE containing a key-file path.
  5. Default file ~/.config/chat2db-community/encryption.key.

The first configured value is authoritative. A blank value, malformed Base64, a key that does not decode to 32 bytes, or an invalid key file fails startup instead of falling through to the next source. File-based configuration is recommended because it avoids placing the key value directly in process arguments or environment variables.

Automatic key-file creation depends on chat2db.mode, not chat2db.gui. Community Desktop mode (chat2db.runtime.mode=community with chat2db.mode=DESKTOP) creates the selected key file when no inline key is configured and the file is missing. Any non-Desktop mode, including normal Web/headless startup, never creates a missing key and fails until a valid key is provided or initialized. The resolved key is cached for the process lifetime, so changing key configuration requires an application restart.

Build from Source

Prerequisites

Clone the Repository

git clone https://git

readme truncated — read the full docs on github

Frequently asked questions

Is Chat2DB free to use?

Chat2DB is open source. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does Chat2DB do?

Transform natural language into SQL queries with AI

What is Chat2DB written in?

Chat2DB is primarily written in Java. Its source is publicly available at https://github.com/codephiliax/chat2db, and it has 28,136 GitHub stars.