Skip to content

智能的通用数据库工具和SQL客户端(General-purpose database tools and SQL clients with AI (ChatGPT))

License

Notifications You must be signed in to change notification settings

SkyElapseStarry/Chat2DB

 
 

Repository files navigation

Chat2DB

一个集成了AIGC的数据库客户端工具

License Java support GitHub release GitHub Stars GitHub Forks GitHub Contributors

语言: 中文 | English

📖 简介

   Chat2DB 是一款有开源免费的多数据库客户端工具,支持windows、mac本地安装,也支持服务器端部署,web网页访问。和传统的数据库客户端软件Navicat、DBeaver 相比Chat2DB集成了AIGC的能力,能够将自然语言转换为SQL,也可以将SQL转换为自然语言,可以给出研发人员SQL的优化建议,极大的提升人员的效率,是AI时代数据库研发人员的利器,未来即使不懂SQL的运营业务也可以使用快速查询业务数据、生成报表能力。

✨ 特性

  • 🌈 AI智能助手,支持自然语言转SQL、SQL转自然语言、SQL优化建议
  • 👭 支持团队协作,研发无需知道线上数据库密码,解决企业数据库账号安全问题
  • ⚙️ 强大的数据管理能力,支持数据表、视图、存储过程、函数、触发器、索引、序列、用户、角色、授权等管理
  • 🔌 强大的扩展能力,目前已经支持Mysql、PostgreSQL、Oracle、SQLServer、ClickHouse、Oceanbase、H2、SQLite等等,未来会支持更多的数据库
  • 🛡 前端使用 Electron 开发,提供 Windows、Mac、Linux 客户端、网页版本一体化的解决方案
  • 🎁 支持环境隔离、线上、日常数据权限分离

⏬ 下载安装

描述 下载地址
Windows https://oss-chat2db.alibaba.com/release/1.0.0/Chat2DB%20Setup%201.0.0.exe
MacOS ARM64 (Apple芯片) https://oss-chat2db.alibaba.com/release/1.0.0/Chat2DB-1.0.0-arm64.dmg
MacOS X64 (Intel芯片) https://oss-chat2db.alibaba.com/release/1.0.0/Chat2DB-1.0.0.dmg
Jar包 https://oss-chat2db.alibaba.com/release/1.0.0/ali-dbhub-server-start.jar

🌰 使用Demo

  • 创建数据源
  • 数据源管理
  • SQL控制台
  • AI智能助手

📦 Docker部署

  docker pull chat2db/chat2db:latest

🎯 运行环境

注意: 如果需要本地调试

💻 本地调试

  • git clone到本地
$ git clone [email protected]:alibaba/Chat2DB.git
  • 前端安装
$ cd Chat2DB/ali-dbhub-client
$ npm install # 安装npm 
$ npm run build:prod # 把js打包生成到后端的source目录
  • 后端调试
$ cd ../ali-dbhub-server
$ mvn clean install # 需要安装maven 3.8以上版本
$ cd ali-dbhub-server/ali-dbhub-server-start/target/
$ java -jar -Dchatgpt.apiKey=xxxxx ali-dbhub-server-start.jar  # 启动应用 chatgpt.apiKey 需要输入ChatGPT的key,如果不输入无法使用AIGC功能
$ # 打开 http:https://localhost:7001 开启调试
  • 前端调试
$ cd Chat2DB/ali-dbhub-client
$ npm install 
$ npm run start
$ # 打开 http:https://localhost:8001 开启前端调试

但是前端调试需要映射下资源,可以下载XSwitch,添加以下配置文件

{
  "proxy": [
    [
      "http:https://127.0.0.1:7001/static/front/(.*)",
      "http:https://127.0.0.1:8001/$1",
    ],
    [
      "http:https://127.0.0.1:7001/(.*).js$",
      "http:https://127.0.0.1:8001/$1.js",
    ],
    [
      "http:https://127.0.0.1:7001/(.*).css$",
      "http:https://127.0.0.1:8001/$1.css",
    ]
  ],
}

📑 文档

☎️ 联系我们

微信:yxccw132 钉钉:9135032392

❤️ 致谢

感谢所有为Chat2DB贡献力量的同学们~

About

智能的通用数据库工具和SQL客户端(General-purpose database tools and SQL clients with AI (ChatGPT))

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 81.2%
  • TypeScript 15.0%
  • Less 3.1%
  • JavaScript 0.5%
  • HTML 0.1%
  • EJS 0.1%