Giter Site home page Giter Site logo

netsan / chat2db Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alibaba/ali-dbhub

0.0 0.0 0.0 23.83 MB

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

Home Page: https://chat2db.opensource.alibaba.com

License: Apache License 2.0

Shell 0.02% JavaScript 0.68% Java 80.04% TypeScript 15.97% HTML 0.11% Batchfile 0.01% Dockerfile 0.03% EJS 0.08% Less 3.07%

chat2db's Introduction

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.6/Chat2DB%20Setup%201.0.6.exe
MacOS ARM64 (Apple芯片) https://oss-chat2db.alibaba.com/release/1.0.6/Chat2DB-1.0.6-arm64.dmg
MacOS X64 (Intel芯片) https://oss-chat2db.alibaba.com/release/1.0.6/Chat2DB-1.0.6.dmg
Jar包 https://oss-chat2db.alibaba.com/release/1.0.6/ali-dbhub-server-start.jar

🌰 使用Demo

创建数据源

数据源管理

SQL控制台 及 AI智能助手

📦 Docker部署

  docker pull chat2db/chat2db:latest
  // 前台运行,运行后不能关闭命令行
  docker run -ti --name=chat2db -p 10824:10824 chat2db/chat2db:latest
  // 后台运行,运行后可以关闭命令行
  docker run --name=chat2db -p 10824:10824 chat2db/chat2db:latest
  // 这里正常会提示 Tomcat started on port(s): 10824 (http) with context path 就可以结束了
  
  // 如果这里提示  The container name "/chat2db" is already in use by container, 代表已经存在容器了 运行
  dcoker run chat2db
  // 如果想更新chat2db 则需要先rm 再运行
  dcoker rm chat2db

🎯 运行环境

注意: 如果需要本地调试

💻 本地调试

  • git clone到本地
$ git clone [email protected]:alibaba/Chat2DB.git
  • 前端安装
$ cd Chat2DB/ali-dbhub-client
$ npm install # 安装前端依赖
$ npm run build # 把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://127.0.0.1:10821 开启调试 注:需要进行前端安装
  • 前端调试
$ cd Chat2DB/ali-dbhub-client
$ npm install 
$ npm run start
$ # 打开 http://127.0.0.1:10821 开启前端调试
$ # 注:前端页面完全赖服务,所以前端同学调试也需要把后端项目跑起来

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

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

📑 文档

☎️ 联系我们

如果觉得对你有帮助请点个star吧。

微信:yxccw132 钉钉:9135032392

❤️ 致谢

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

chat2db's People

Contributors

chat2db-pro avatar chenxian01 avatar dangdang01234 avatar gt-tool avatar hou-shuaishuai avatar idjack avatar jerryfan626 avatar ke1ying avatar shanhexi avatar shenchenyang avatar tmlx1990 avatar yuanzhixiang avatar zhuangjiaju avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.