# Chat2DB
**Repository Path**: wcltools/Chat2DB
## Basic Information
- **Project Name**: Chat2DB
- **Description**: Chat2DB 是一款有开源免费的多数据库客户端工具,支持windows、mac本地安装,也支持服务器端部署,web网页访问。和传统的数据库客户端软件Navicat、DBeaver 相比Chat2DB集成了AIGC的能力,能够将自然语言转换为SQL,也可以将SQL转换为自然语言,可以给出研发人员SQL的优化建议,极大的提升人员的效率,是AI时代数据库研发人员的利器,未来即使不懂SQL的运营业务也可
- **Primary Language**: Java
- **License**: Apache-2.0
- **Default Branch**: main
- **Homepage**: https://github.com/alibaba/Chat2DB.git
- **GVP Project**: No
## Statistics
- **Stars**: 7
- **Forks**: 1
- **Created**: 2024-02-24
- **Last Updated**: 2026-02-11
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
Chat2DB
A database client tool with integrated AIGC
[](https://github.com/alibaba/ali-dbhub/blob/main/LICENSE)
[](https://github.com/alibaba/ali-dbhub/releases)
[](https://github.com/alibaba/ali-dbhub/stargazers)
[](https://github.com/alibaba/ali-dbhub/fork)
[](https://github.com/alibaba/ali-dbhub/graphs/contributors)
Languages: English | [中文](README.md)
## 📖 Introduction
Chat2DB is a multi-database client tool that is open-source and free from Alibaba. It supports local installation on Windows and Mac, as well as server-side deployment and web page access. Compared to traditional database client software such as Navicat and DBeaver, Chat2DB integrates AIGC's capabilities and is able to convert natural language into SQL. It can also convert SQL into natural language and provide optimization suggestions for SQL to greatly enhance the efficiency of developers. It is a tool for database developers in the AI era, and even non-SQL business operators in the future can use it to quickly query business data and generate reports.
## ✨ Features
- 🌈 AI intelligent assistant, supporting natural language to SQL conversion, SQL to natural language conversion, and SQL optimization suggestions
- 👭 Support team collaboration, developers do not need to know the online database password, solving the problem of enterprise database account security
- ⚙️ Powerful data management capability, supporting management of data tables, views, stored procedures, functions, triggers, indexes, sequences, users, roles, authorizations, etc.
- 🔌 Powerful extension capability, currently supporting MySQL, PostgreSQL, Oracle, SQLServer, ClickHouse, OceanBase, H2, SQLite, etc., and more databases will be supported in the future
- 🛡 Front-end development using Electron, providing a solution that integrates Windows, Mac, Linux clients, and web versions
- 🎁 Support environment isolation, online, and daily data permission separation
## ⏬ Download and Install
| Description | Size | Download |
|-------------|------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Windows | 361M | https://chat2db.oss-cn-zhangjiakou.aliyuncs.com/test/4796588172/Chat2DB-Test%20Setup%201.0.4796588172-Test.exe |
| MacOS ARM64 | 207M | https://chat2db.oss-cn-zhangjiakou.aliyuncs.com/test/4796588172/Chat2DB-Test-1.0.4796588172-Test-arm64.dmg |
| MacOS X64 | 210M | https://chat2db.oss-cn-zhangjiakou.aliyuncs.com/test/4796588172/Chat2DB-Test-1.0.4796588172-Test.dmg |
| Jar package | 88M | https://chat2db.oss-cn-zhangjiakou.aliyuncs.com/test/4796588172/ali-dbhub-server-start.jar |
## 🌰 Demo
- Create data source
- Data source management
- SQL console
- AI intelligent assistant
## 📦 Docker installation
```bash
docker pull chat2db/chat2db:latest
```
## 🎯 Operating Environment
Note: If local debugging is required
- Java runtime Open JDK 17
- JRE reference packaging and deployment method of jre.
- Node runtime environment Node16 Node.js.
## 💻 Local Debugging
- git clone to local
```bash
$ git clone git@github.com:alibaba/Chat2DB.git
```
- Front-End installation
```bash
$ cd Chat2DB/ali-dbhub-client
$ npm install # 安装npm
$ npm run build:prod # 把js打包生成到后端的source目录
```
- Backend debug
```bash
$ cd ../ali-dbhub-server
$ mvn clean install # maven 3.8 or later needs to be installed
$ cd ali-dbhub-server/ali-dbhub-server-start/target/
$ java -jar -Dchatgpt.apiKey=xxxxx ali-dbhub-server-start.jar # To launch the chat application, you need to enter the ChatGPT key for the chatgpt.apiKey. Without entering it, you won't be able to use the AIGC function.
$ # open http://localhost:7001 to start debug
```
- Front-End debug
```bash
$ cd Chat2DB/ali-dbhub-client
$ npm install
$ npm run start
$ # open http://localhost:8001 to start Front-End debug
```
But front debugging need mapping of resources, you can download [XSwitch](https://chrome.google.com/webstore/detail/idkjhjggpffolpidfkikidcokdkdaogg), add the following configuration file
``` json
{
"proxy": [
[
"http://127.0.0.1:7001/static/front/(.*)",
"http://127.0.0.1:8001/$1",
],
[
"http://127.0.0.1:7001/(.*).js$",
"http://127.0.0.1:8001/$1.js",
],
[
"http://127.0.0.1:7001/(.*).css$",
"http://127.0.0.1:8001/$1.css",
]
],
}
```
## 📑 Documentation
* WIKI
* Issue tracker
## ☎️ Contact Us
微信:yxccw132 钉钉:9135032392
## ❤️ Acknowledgements
Thanks to all the students who contributed to Chat2DB~