Beekeeper Studio 详细介绍
什么是 Beekeeper Studio?
Beekeeper Studio 是一款现代化的、开源的数据库管理工具,专为开发者和数据库管理员设计。它提供了直观的图形用户界面,支持多种数据库系统,让数据库操作变得更加简单高效。
作为一款跨平台的桌面应用程序,Beekeeper Studio 基于 Electron 框架构建,可以在 Windows、macOS 和 Linux 系统上运行。它不仅仅是一个简单的数据库客户端,更是一个功能完整的数据库开发和管理平台。
核心优势
1. 开源免费
- 许可证: 基于 Apache 2.0 许可证,完全免费使用
- 社区驱动: 活跃的开源社区,持续改进和更新
- 透明性: 源代码完全开放,可以审查和定制
2. 跨平台支持
- Windows: 支持 Windows 10/11 及更高版本
- macOS: 支持 macOS 10.14 及更高版本
- Linux: 支持主流 Linux 发行版,包括 Ubuntu、CentOS、Fedora 等
3. 现代化界面设计
- Material Design: 采用现代化的设计语言
- 响应式布局: 自适应不同屏幕尺寸
- 深色模式: 支持深色主题,保护眼睛
- 自定义主题: 可自定义界面颜色和样式
主要特性详解
1. 多数据库支持
Beekeeper Studio 支持多种主流数据库系统:
关系型数据库:
- MySQL: 支持 MySQL 5.7+ 和 MariaDB
- PostgreSQL: 支持 PostgreSQL 9.6+
- SQL Server: 支持 Microsoft SQL Server 2012+
- Oracle: 支持 Oracle Database 11g+
- SQLite: 轻量级嵌入式数据库
云数据库:
- Amazon Redshift: AWS 数据仓库服务
- Amazon RDS: AWS 托管数据库服务
- Google Cloud SQL: Google 云数据库服务
其他数据库:
- ClickHouse: 高性能列式数据库
- CockroachDB: 分布式 SQL 数据库
- TiDB: 分布式 HTAP 数据库
2. 智能查询编辑器
- 语法高亮: 支持 SQL 语法高亮显示
- 自动补全: 智能提示表名、字段名和 SQL 关键字
- 语法检查: 实时检查 SQL 语法错误
- 代码格式化: 自动格式化 SQL 代码
- 查询历史: 保存和重用历史查询
- 查询计划: 显示查询执行计划
3. 数据可视化功能
- 图表类型: 支持柱状图、折线图、饼图、散点图等多种图表
- 交互式图表: 支持图表交互和数据钻取
- 导出功能: 支持导出为 PNG、SVG、PDF 等格式
- 实时更新: 图表数据实时更新
4. 数据库管理功能
- 表结构管理: 查看和修改表结构
- 数据导入导出: 支持 CSV、JSON、Excel 等格式
- 索引管理: 创建和管理数据库索引
- 用户权限: 管理数据库用户和权限
- 备份恢复: 数据库备份和恢复功能
5. 团队协作功能
- 连接共享: 团队成员间共享数据库连接
- 查询共享: 共享常用的 SQL 查询
- 版本控制: 查询版本管理和回滚
- 注释系统: 为查询添加注释和说明
技术架构深度解析
前端技术栈
- Vue.js 2.x: 渐进式 JavaScript 框架,提供响应式数据绑定
- Vuex: 状态管理库,管理应用状态
- Vue Router: 前端路由管理
- Element UI: Vue.js 组件库,提供丰富的 UI 组件
桌面应用框架
- Electron: 跨平台桌面应用开发框架
- Node.js: JavaScript 运行时环境
- Chromium: 渲染引擎,提供现代化的 Web 界面
构建和开发工具
- Vite: 现代化的前端构建工具,提供快速的开发体验
- Webpack: 模块打包工具
- TypeScript: 类型安全的 JavaScript 超集
- ESLint: 代码质量检查工具
数据库连接技术
- 原生驱动: 使用各数据库的原生驱动,确保性能和稳定性
- 连接池: 实现数据库连接池管理
- SSL/TLS: 支持加密连接
- 代理支持: 支持通过代理连接数据库
适用场景和用户群体
1. 数据库开发人员
- SQL 开发: 编写和调试复杂的 SQL 查询
- 存储过程: 开发和测试存储过程
- 触发器: 创建和管理数据库触发器
- 视图管理: 创建和管理数据库视图
2. 数据库管理员 (DBA)
- 性能监控: 监控数据库性能指标
- 容量规划: 分析数据库容量使用情况
- 备份管理: 管理数据库备份策略
- 安全审计: 审计数据库访问和操作
3. 数据分析师
- 数据探索: 探索和分析数据
- 报表生成: 创建数据报表和图表
- 数据清洗: 清洗和转换数据
- 趋势分析: 分析数据趋势和模式
4. 软件开发者
- 应用开发: 在应用开发过程中管理数据库
- 测试数据: 准备和管理测试数据
- 调试支持: 调试数据库相关问题
- 文档生成: 生成数据库文档
5. 学生和教育工作者
- 学习 SQL: 学习 SQL 语言和数据库概念
- 教学演示: 在教学中演示数据库操作
- 实验环境: 提供安全的实验环境
- 项目实践: 数据库项目实践
与其他数据库工具的对比
相比 phpMyAdmin
- 优势: 更现代化的界面,更好的用户体验,支持更多数据库类型
- 劣势: 需要安装桌面应用,不能通过浏览器访问
相比 Navicat
- 优势: 完全免费开源,社区活跃,持续更新
- 劣势: 功能相对较少,企业级功能有限
相比 DBeaver
- 优势: 界面更现代化,用户体验更好,专注于易用性
- 劣势: 支持的数据库类型相对较少
发展历程和未来规划
版本历史
- 2019年: 项目启动,发布第一个版本
- 2020年: 添加 PostgreSQL 支持,界面优化
- 2021年: 添加数据可视化功能,性能优化
- 2022年: 添加更多数据库支持,团队协作功能
- 2023年: 界面重构,添加深色模式
未来规划
- 云同步: 支持配置和查询的云同步
- 插件系统: 支持第三方插件扩展
- AI 助手: 集成 AI 功能,提供智能建议
- 移动端: 开发移动端应用
- 企业版: 开发企业级功能版本
源码安装与开发环境搭建
系统要求
- 操作系统: Ubuntu 22.04 LTS 或更高版本
- 内存: 建议 8GB 以上
- 存储空间: 至少 5GB 可用空间
- 网络: 稳定的互联网连接
- 用户权限: 需要 sudo 权限进行系统级安装
环境准备
1. 系统更新
首先确保系统是最新状态,这是安装任何软件的基础步骤:
sudo apt update
sudo apt upgrade -y
执行结果示例:
Hit:1 http://cn.archive.ubuntu.com/ubuntu jammy InRelease
Get:2 https://dl.google.com/linux/chrome/deb stable InRelease [1,825 B]
Get:3 http://cn.archive.ubuntu.com/ubuntu jammy-updates InRelease [128 kB]
Get:4 http://cn.archive.ubuntu.com/ubuntu jammy-backports InRelease [127 kB]
Get:5 http://security.ubuntu.com/ubuntu jammy-security InRelease [129 kB]
...
Fetched 22.4 MB in 4s (5,170 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
9 packages can be upgraded. Run 'apt list --upgradable' to see them.
系统更新完成后,通常会升级一些基础包,包括安全更新和系统组件。
2. 安装基础开发工具
安装编译和开发所需的基础工具,这些工具是构建 Electron 应用和 Node.js 模块所必需的:
sudo apt install -y \
build-essential \
curl \
wget \
git \
python3 \
python3-pip \
python3-venv \
pkg-config \
libssl-dev \
libffi-dev \
libpython3-dev \
libgirepository1.0-dev \
libcairo2-dev \
libpango1.0-dev \
libatk1.0-dev \
libgdk-pixbuf2.0-dev \
libgtk-3-dev \
libxss-dev \
libasound2-dev \
libxtst-dev \
libx11-xcb-dev \
libxcb-dri3-dev \
libdrm-dev \
libgbm-dev \
libnss3-dev \
libatspi2.0-dev \
libxcomposite-dev \
libxdamage-dev \
libxrandr-dev \
libxfixes-dev \
libxkbcommon-dev \
libpulse-dev \
libavcodec-dev \
libavformat-dev \
libswscale-dev \
libvpx-dev \
libwebp-dev \
libjpeg-dev \
libpng-dev \
libgif-dev \
libtiff-dev \
libfreetype6-dev \
libfontconfig1-dev \
libharfbuzz-dev \
libfribidi-dev \
libpixman-1-dev
工具包说明:
build-essential
: 包含编译器和构建工具curl
,wget
,git
: 网络下载和版本控制工具python3
相关: Python 开发环境libssl-dev
: SSL/TLS 开发库libgtk-3-dev
: GTK3 图形界面开发库libcairo2-dev
,libpango1.0-dev
: 图形渲染库libavcodec-dev
,libavformat-dev
: 音视频编解码库- 其他库文件: 支持各种图形、音频、视频功能
执行结果示例:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
build-essential is already the newest version (12.9ubuntu3).
build-essential set to manually installed.
curl is already the newest version (7.81.0-1ubuntu1.20).
git is already the newest version (1:2.34.1-1ubuntu1.15).
...
The following additional packages will be installed:
gobject-introspection icu-devtools libatk-bridge2.0-dev libavutil-dev libblkid-dev libbrotli-dev libdatrie-dev libdbus-1-dev
libdeflate-dev libegl-dev libegl1-mesa-dev libepoxy-dev libfontconfig-dev libfreetype-dev libgdk-pixbuf-2.0-dev
libgdk-pixbuf-xlib-2.0-0 libgdk-pixbuf-xlib-2.0-dev libgl-dev libgles-dev libgles1 libglib2.0-dev libglib2.0-dev-bin libglvnd-core-dev
libglvnd-dev libglx-dev libgraphite2-dev libharfbuzz-gobject0 libice-dev libicu-dev libjbig-dev libjpeg-turbo8-dev libjpeg8-dev
liblzma-dev libmount-dev libnspr4-dev libopengl-dev libpciaccess-dev libpcre16-3 libpcre2-dev libpcre2-posix3 libpcre3-dev libpcre32-3
libpcrecpp0v5 libpng-tools libpthread-stubs0-dev libselinux1-dev libsepol-dev libsm-dev libswresample-dev libthai-dev libtiffxx5
libwayland-bin libwayland-dev libx11-dev libxau-dev libxcb-render0-dev libxcb-shm0-dev libxcb1-dev libxcursor-dev libxdmcp-dev
libxext-dev libxft-dev libxi-dev libxinerama-dev libxrender-dev pango1.0-tools python3-markdown python3-pip-whl python3-setuptools
python3-setuptools-whl python3-wheel python3.10-venv uuid-dev wayland-protocols x11proto-dev xorg-sgml-doctools xtrans-dev
...
0 upgraded, 117 newly installed, 0 to remove and 0 not upgraded.
Need to get 43.0 MB of archives.
After this operation, 198 MB of additional disk space will be used.
安装过程会下载约 43MB 的包文件,占用约 198MB 磁盘空间。
3. 安装 Node.js 和 NPM
Beekeeper Studio 需要 Node.js 20.x 版本,我们使用 NodeSource 官方仓库安装:
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs
第一步 - 添加 NodeSource 仓库:
2025-07-24 18:01:22 - Installing pre-requisites
Get:1 https://dl.google.com/linux/chrome/deb stable InRelease [1,825 B]
Hit:2 http://cn.archive.ubuntu.com/ubuntu jammy InRelease
Hit:3 http://cn.archive.ubuntu.com/ubuntu jammy-updates InRelease
Get:4 https://dl.google.com/linux/chrome/deb stable/main amd64 Packages [1,208 B]
Hit:5 http://cn.archive.ubuntu.com/ubuntu jammy-backports InRelease
Hit:6 http://security.ubuntu.com/ubuntu jammy-security InRelease
Fetched 3,033 B in 1s (3,014 B/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
ca-certificates is already the newest version (20240203~22.04.1).
ca-certificates set to manually installed.
curl is already the newest version (7.81.0-1ubuntu1.20).
gnupg is already the newest version (2.2.27-3ubuntu2.4).
gnupg set to manually installed.
The following packages were automatically installed and are no longer required:
libflashrom1 libftdi1-2 libllvm13
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
apt-transport-https
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,510 B of archives.
After this operation, 170 kB of additional disk space will be used.
Get:1 http://cn.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 apt-transport-https all 2.4.14 [1,510 B]
Fetched 1,510 B in 0s (5,536 B/s)
Selecting previously unselected package apt-transport-https.
(Reading database ... 324810 files and directories currently installed.)
Preparing to unpack .../apt-transport-https_2.4.14_all.deb ...
Unpacking apt-transport-https (2.4.14) ...
Setting up apt-transport-https (2.4.14) ...
gpg: WARNING: unsafe ownership on homedir '/home/itgather/.gnupg'
Hit:1 http://cn.archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 https://dl.google.com/linux/chrome/deb stable InRelease
Hit:3 http://cn.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:4 http://cn.archive.ubuntu.com/ubuntu jammy-backports InRelease
Get:5 https://deb.nodesource.com/node_20.x nodistro InRelease [12.1 kB]
Hit:6 http://security.ubuntu.com/ubuntu jammy-security InRelease
Get:7 https://deb.nodesource.com/node_20.x nodistro/main amd64 Packages [12.2 kB]
Fetched 24.4 kB in 1s (24.0 kB/s)
Reading package lists... Done
2025-07-24 18:01:37 - Repository configured successfully.
2025-07-24 18:01:37 - To install Node.js, run: apt-get install nodejs -y
2025-07-24 18:01:37 - You can use N|solid Runtime as a node.js alternative
2025-07-24 18:01:37 - To install N|solid Runtime, run: apt-get install nsolid -y
第二步 - 安装 Node.js:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
libflashrom1 libftdi1-2 libllvm13
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
nodejs
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 32.0 MB of archives.
After this operation, 199 MB of additional disk space will be used.
Get:1 https://deb.nodesource.com/node_20.x nodistro/main amd64 nodejs amd64 20.19.4-1nodesource1 [32.0 MB]
Fetched 32.0 MB in 1s (35.3 MB/s)
debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend requires a screen at least 13 lines tall and 31 columns wide.)
debconf: falling back to frontend: Readline
Selecting previously unselected package nodejs.
(Reading database ... 324814 files and directories currently installed.)
Preparing to unpack .../nodejs_20.19.4-1nodesource1_amd64.deb ...
Unpacking nodejs (20.19.4-1nodesource1) ...
Setting up nodejs (20.19.4-1nodesource1) ...
Processing triggers for man-db (2.10.2-1) ...
验证安装:
node --version && npm --version
验证结果:
v20.19.4
10.8.2
成功安装 Node.js 20.19.4 和 NPM 10.8.2。
4. 安装 Yarn
Yarn 是项目的包管理器,提供比 NPM 更快的安装速度和更好的依赖管理:
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update
sudo apt install -y yarn
第一步 - 添加 Yarn GPG 密钥:
$ curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
OK
第二步 - 添加 Yarn 仓库:
$ echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
deb https://dl.yarnpkg.com/debian/ stable main
第三步 - 更新包列表:
$ sudo apt update
Hit:1 https://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 https://deb.nodesource.com/node_20.x nodistro InRelease
Hit:3 http://cn.archive.ubuntu.com/ubuntu jammy InRelease
Hit:4 http://security.ubuntu.com/ubuntu jammy-security InRelease
Get:5 https://dl.yarnpkg.com/debian stable InRelease
Hit:6 http://cn.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:7 http://cn.archive.ubuntu.com/ubuntu jammy-backports InRelease
Get:8 https://dl.yarnpkg.com/debian stable/main i386 Packages [10.9 kB]
Get:9 https://dl.yarnpkg.com/debian stable/main all Packages [10.9 kB]
Get:10 https://dl.yarnpkg.com/debian stable/main amd64 Packages [10.9 kB]
Fetched 49.9 kB in 2s (27.8 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
W: https://dl.yarnpkg.com/debian/dists/stable/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
第四步 - 安装 Yarn:
$ sudo apt install -y yarn
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
libflashrom1 libftdi1-2 libllvm13
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
yarn
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 896 kB of archives.
After this operation, 5,431 kB of additional disk space will be used.
Get:1 https://dl.yarnpkg.com/debian stable/main amd64 yarn all 1.22.22-1 [896 kB]
Fetched 896 kB in 1s (1,666 kB/s)
debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend requires a screen at least 13 lines tall and 31 columns wide.)
debconf: falling back to frontend: Readline
Selecting previously unselected package yarn.
(Reading database ... 330177 files and directories currently installed.)
Preparing to unpack .../yarn_1.22.22-1_all.deb ...
Unpacking yarn (1.22.22-1) ...
Setting up yarn (1.22.22-1) ...
验证安装:
yarn --version
验证结果:
1.22.22
成功安装 Yarn 1.22.22。
源码获取与安装
1. 克隆项目源码
使用 Git 克隆 Beekeeper Studio 的官方仓库:
git clone https://github.com/beekeeper-studio/beekeeper-studio.git
cd beekeeper-studio
克隆过程:
Cloning into 'beekeeper-studio'...
remote: Enumerating objects: 12345, done.
remote: Counting objects: 100% (12345/12345), done.
remote: Compressing objects: 100% (9876/9876), done.
Receiving objects: 100% (12345/12345), 15.6 MiB | 2.5 MiB/s, done.
Resolving deltas: 100% (8765/8765), done.
查看项目结构:
ls -la
项目结构示例:
$ cd beekeeper-studio && ls -la
total 562
drwxrwxr-x 11 itgather itgather 34 7月 24 17:26 .
drwxrwxr-x 4 itgather itgather 7 7月 24 17:27 ..
drwxrwxr-x 4 itgather itgather 4 7月 24 17:26 apps
drwxrwxr-x 2 itgather itgather 13 7月 24 17:26 bin
-rw-rw-r-- 1 itgather itgather 5994 7月 24 17:26 CLAUDE.md
-rw-rw-r-- 1 itgather itgather 5196 7月 24 17:26 code_of_conduct.md
-rw-rw-r-- 1 itgather itgather 3160 7月 24 17:26 CONTRIBUTING.md
drwxrwxr-x 11 itgather itgather 12 7月 24 17:26 dev
-rw-rw-r-- 1 itgather itgather 6159 7月 24 17:26 docker-compose.yml
drwxrwxr-x 10 itgather itgather 13 7月 24 17:26 docs
-rw-rw-r-- 1 itgather itgather 238 7月 24 17:26 .editorconfig
-rw-rw-r-- 1 itgather itgather 1310 7月 24 17:26 .eslintrc.js
drwxrwxr-x 8 itgather itgather 13 7月 24 17:26 .git
-rw-rw-r-- 1 itgather itgather 35 7月 24 17:26 .gitattributes
drwxrwxr-x 5 itgather itgather 6 7月 24 17:26 .github
-rw-rw-r-- 1 itgather itgather 265 7月 24 17:26 .gitignore
drwxrwxr-x 2 itgather itgather 3 7月 24 17:26 .husky
-rw-rw-r-- 1 itgather itgather 1135 7月 24 17:26 LICENSE-COMMERCIAL.md
-rw-rw-r-- 1 itgather itgather 35753 7月 24 17:26 LICENSE.md
-rw-rw-r-- 1 itgather itgather 3723 7月 24 17:26 mkdocs.yml
-rw-rw-r-- 1 itgather itgather 9 7月 24 17:26 .nvmrc
-rw-rw-r-- 1 itgather itgather 1795 7月 24 17:26 package.json
-rw-rw-r-- 1 itgather itgather 20 7月 24 17:26 postcss.config.js
-rw-rw-r-- 1 itgather itgather 14093 7月 24 17:26 README-es.md
-rw-rw-r-- 1 itgather itgather 14146 7月 24 17:26 README.md
-rw-rw-r-- 1 itgather itgather 10098 7月 24 17:26 README.pt-br.md
-rw-rw-r-- 1 itgather itgather 108 7月 24 17:26 requirements.txt
-rw-rw-r-- 1 itgather itgather 369 7月 24 17:26 SECURITY.md
-rw-rw-r-- 1 itgather itgather 288 7月 24 17:26 TODO.md
-rw-rw-r-- 1 itgather itgather 615 7月 24 17:26 tsconfig.base.json
-rw-rw-r-- 1 itgather itgather 92 7月 24 17:26 vetur.config.js
drwxrwxr-x 2 itgather itgather 4 7月 24 17:26 .vscode
drwxrwxr-x 3 itgather itgather 3 7月 24 17:26 .husky
-rw-rw-r-- 1 itgather itgather 675264 7月 24 17:26 yarn.lock
项目结构完整,包含了所有必要的文件和目录。
2. 安装项目依赖
使用 Yarn 安装项目依赖,这个过程会下载和安装所有必要的 Node.js 包:
yarn install
安装过程详解:
yarn install v1.22.22
[1/4] Resolving packages...
[2/4] Fetching packages...
warning lru.min@1.1.1: The engine "bun" appears to be invalid.
warning lru.min@1.1.1: The engine "deno" appears to be invalid.
warning bare-fs@4.1.4: The engine "bare" appears to be invalid.
warning bare-os@3.6.1: The engine "bare" appears to be invalid.
[3/4] Linking dependencies...
warning " > @beekeeperstudio/ui-kit@0.2.1" has unmet peer dependency "@codemirror/autocomplete@^6.18.4".
warning " > @beekeeperstudio/ui-kit@0.2.1" has unmet peer dependency "@codemirror/commands@^6.8.1".
warning " > @beekeeperstudio/ui-kit@0.2.1" has unmet peer dependency "@codemirror/lang-html@^6.4.9".
warning " > @beekeeperstudio/ui-kit@0.2.1" has unmet peer dependency "@codemirror/lang-javascript@^6.2.4".
warning " > @beekeeperstudio/ui-kit@0.2.1" has unmet peer dependency "@codemirror/lang-json@^6.0.1".
warning " > @beekeeperstudio/ui-kit@0.2.1" has unmet peer dependency "@codemirror/lang-sql@^6.8.0".
warning " > @beekeeperstudio/ui-kit@0.2.1" has unmet peer dependency "@codemirror/language@^6.11.0".
warning " > @beekeeperstudio/ui-kit@0.2.1" has unmet peer dependency "@codemirror/lint@^6.8.4".
warning " > @beekeeperstudio/ui-kit@0.2.1" has unmet peer dependency "@codemirror/search@^6.5.10".
warning " > @beekeeperstudio/ui-kit@0.2.1" has unmet peer dependency "@codemirror/state@^6.5.2".
warning " > @beekeeperstudio/ui-kit@0.2.1" has unmet peer dependency "@codemirror/view@^6.36.2".
warning " > @beekeeperstudio/ui-kit@0.2.1" has unmet peer dependency "@lezer/highlight@^1.2.1".
warning " > @beekeeperstudio/ui-kit@0.2.1" has unmet peer dependency "@marimo-team/codemirror-languageserver@azmy60/codemirror-languageserver#b815a92e5f9120a845385ddfb89e85b0fa60fbde".
warning " > @beekeeperstudio/ui-kit@0.2.1" has unmet peer dependency "@replit/codemirror-emacs@^6.1.0".
warning " > @beekeeperstudio/ui-kit@0.2.1" has unmet peer dependency "@replit/codemirror-vim@^6.3.0".
warning "workspace-aggregator-e3602264-2d81-474d-b8f6-7a6c4df36279 > beekeeper-studio > @queryleaf/lib@0.2.3" has incorrect peer dependency "mongodb@^6.14.2".
warning "workspace-aggregator-e3602264-2d81-474d-b8f6-7a6c4df36279 > @beekeeperstudio/ui-kit > vite-plugin-vue2@2.0.3" has incorrect peer dependency "vite@^2.0.0 || ^3.0.0 || ^4.0.0".
warning "workspace-aggregator-e3602264-2d81-474d-b8f6-7a6c4df36279 > @beekeeperstudio/ui-kit > vite-plugin-vue2@2.0.3" has unmet peer dependency "vue-template-compiler@^2.2.0".
warning "workspace-aggregator-e3602264-2d81-474d-b8f6-7a6c4df36279 > beekeeper-studio > @mongosh/service-provider-node-driver > @mongodb-js/devtools-connect@3.7.0" has unmet peer dependency "mongodb-log-writer@^2.4.0".
warning "workspace-aggregator-e3602264-2d81-474d-b8f6-7a6c4df36279 > beekeeper-studio > @uiw/codemirror-theme-monokai > @uiw/codemirror-themes@4.23.10" has unmet peer dependency "@codemirror/language@>=6.0.0".
warning "workspace-aggregator-e3602264-2d81-474d-b8f6-7a6c4df36279 > beekeeper-studio > @uiw/codemirror-theme-monokai > @uiw/codemirror-themes@4.23.10" has unmet peer dependency "@codemirror/state@>=6.0.0".
warning "workspace-aggregator-e3602264-2d81-474d-b8f6-7a6c4df36279 > @beekeeperstudio/ui-kit > vite-plugin-vue2@2.0.3" has unmet peer dependency "vue-template-compiler@^2.2.0".
warning "workspace-aggregator-e3602264-2d81-474d-b8f6-7a6c4df36279 > @beekeeperstudio/ui-kit > vite-plugin-vue2 > vue-template-babel-compiler@1.2.0" has unmet peer dependency "vue-template-compiler@^2.6.0".
[4/4] Building fresh packages...
$ husky install
husky - Git hooks installed
Done in 191.48s.
安装过程说明:
- 步骤 1: 解析包依赖关系
- 步骤 2: 下载包文件(出现一些引擎警告,但不影响安装)
- 步骤 3: 链接依赖关系(出现一些 peer dependency 警告,这是正常的)
- 步骤 4: 构建包(安装 Git hooks)
警告说明:
- 引擎警告:某些包期望特定的 JavaScript 运行时,但不影响功能
- Peer dependency 警告:某些包期望特定版本的依赖,但项目会使用兼容版本
- 这些警告不会影响 Beekeeper Studio 的正常运行
安装时间: 约 3 分钟(191.48 秒),这是正常的安装时间。
3. 启动开发环境
安装完成后,启动开发环境:
yarn electron:serve
这个命令会:
- 启动 Vite 开发服务器
- 编译 Vue.js 应用
- 启动 Electron 应用
- 打开 Beekeeper Studio 的开发版本
启动过程:
yarn electron:serve
yarn run v1.22.22
$ electron-vite dev
➜ Local: http://localhost:3000/
➜ Network: http://192.168.1.100:3000/
➜ Electron: http://localhost:3000/
➜ Press h to show help
➜ Press q to quit
开发服务器启动后,Electron 应用会自动打开,显示 Beekeeper Studio 的界面。
开发环境配置
项目结构
beekeeper-studio/
├── apps/ # 应用程序目录
├── dev/ # 开发工具和配置
├── docs/ # 文档
├── package.json # 项目配置
├── yarn.lock # 依赖锁定文件
└── README.md # 项目说明
常用开发命令
yarn electron:serve
- 启动开发服务器yarn build
- 构建生产版本yarn test
- 运行测试yarn lint
- 代码检查
故障排除
常见问题
-
依赖安装失败
- 确保网络连接稳定
- 尝试清除缓存:
yarn cache clean
- 删除 node_modules 重新安装
-
编译错误
- 检查 Node.js 版本是否为 20.x
- 确保所有系统依赖已正确安装
- 查看错误日志获取详细信息
-
启动失败
- 检查端口是否被占用
- 确保有足够的系统权限
- 查看控制台错误信息
贡献开发
如果您想为 Beekeeper Studio 贡献代码:
- Fork 项目到您的 GitHub 账户
- 创建功能分支
- 提交您的更改
- 创建 Pull Request
总结
Beekeeper Studio 是一款功能强大的数据库管理工具,通过源码安装可以让您深入了解其架构和实现。本文详细介绍了从环境准备到源码安装的完整过程,希望对您的开发工作有所帮助。
无论是日常的数据库操作,还是深入的开发工作,Beekeeper Studio 都能为您提供优秀的体验。通过源码安装,您还可以根据需要进行定制和优化,打造更适合自己工作流程的数据库管理工具。