README_CN.md
https://github.com/user-attachments/assets/3c857883-8153-4bda-92b8-d25c6adb5b13
Chat2DB 是一个智能的通用SQL客户端和数据报表工具,它集成了AI的能力。Chat2DB可以帮助您更快地编写SQL查询、管理数据库、生成报告、探索数据、并且可以与多种数据库进行交互。Chat2DB是一个开源项目,我们欢迎您的贡献。
1. 智能生成SQL: Chat2DB Pro支持AI驱动的智能SQL开发,可以帮助您更快地编写SQL查询。
2. 数据库管理: 支持多种10+数据库,包括MySQL、PostgreSQL、H2、Oracle、SQLServer、SQLite、MariaDB、ClickHouse、DM、Presto、DB2、OceanBase、Hive、KingBase、MongoDB、Redis、Snowflake等。
3. 智能生成报表: Chat2DB Pro支持AI驱动的智能数据报表,可以帮助您更快地生成看板。
4. 数据结构同步: Chat2DB Pro支持数据库表结构同步,可以帮助您更快地同步数据库表结构。
Chat2DB 是一个跨平台的应用程序,支持Windows、MacOS和Linux。您可以从以下链接下载Chat2DB。
在安装 Chat2DB 之前,请确保您的系统满足以下要求:
// 拉取最新客户端,然后运行docker,名字是 `chat2db` , 并且将 `/root/.chat2db` 挂载到 `~/.chat2db-docker`
docker run --name=chat2db -ti -p 10824:10824 -v ~/.chat2db-docker:/root/.chat2db chat2db/chat2db:latest
// 这里正常会提示`Tomcat started on port(s): 10824 (http) with context path` 就可以结束了
// 如果这里提示 `The container name "/chat2db" is already in use by container`, 代表已经存在容器了 运行
docker start chat2db
// 如果想更新chat2db 则需要先rm
docker rm chat2db
注意: 如果需要本地调试
git clone 到本地
$ git clone [email protected]:chat2db/Chat2DB.git
前端调试
node版本必须为16及以上
一定要用yarn
$ cd Chat2DB/chat2db-client
$ yarn
$ yarn run start:web
后端调试
$ cd ../chat2db-server
$ mvn clean install # 需要安装maven 3.8以上版本
$ cd chat2db-server/chat2db-server-start/target/
$ java -jar -Dloader.path=./lib -Dchatgpt.apiKey=xxxxx chat2db-server-start.jar # 需要安装java 17以上版本,启动应用 chatgpt.apiKey 需要输入ChatGPT的key,如果不输入无法使用AIGC功能
独立部署
# chat2db-client
$ npm run build:web:prod
$ cp -r dist ../chat2db-server/chat2db-server-start/src/main/resources/static/front
$ cp -r dist/index.html ../chat2db-server/chat2db-server-start/src/main/resources/thymeleaf
# 再打包后端服务
<a></a>
感谢所有为 Chat2DB 贡献力量的同学们~~
<a href="https://github.com/chat2db/Chat2DB/graphs/contributors"> </a>The primary license used by this software is the Apache License 2.0, supplemented by the Chat2DB License.