Skip to main content

Project management tool for UV + FastAPI + Vue3 + Electron desktop applications

Project description

xb - Project Management Tool

xb 是一个基于 uv 又类似 uv 的项目管理工具,用于快速初始化 UV + FastAPI + Vue3 + Electron 桌面应用。

特性

  • 一键初始化完整项目结构
  • UV + FastAPI + Vue3 + Electron 开箱即用
  • 可选 sudo 免密配置
  • 内置开发、构建、版本管理脚本

安装

# 安装 uv
curl -LsSf https://astral.sh/uv/install.sh | sh

# 安装 xb
cd xb
uv sync
uv tool install .

xb --help

快速开始

# 初始化项目
xb init myapp

# 带 sudo 免密配置
xb init myapp --sudoers

cd myapp

# 启动开发环境
xb dev

# 查看状态
xb dev --status

# 停止
xb dev --stop

构建

# 构建所有
xb build

# 单独构建
xb build -f    # 前端
xb build -b    # 后端
xb build -e    # Electron DEB

项目结构

myapp/
├── pyproject.toml          # Python 依赖 (uv)
├── backend/                # FastAPI 后端
│   ├── main.py
│   ├── api/
│   └── managers/
├── frontend/               # Vue 3 前端
│   └── src/
├── electron/               # Electron 主进程
├── version/                # 版本管理
│   ├── hooks/
│   └── scripts/
├── configs/                # 配置文件
├── scripts/                # 可执行脚本
├── dev.sh                  # 开发脚本
├── build.sh                # 打包脚本
└── .venv                   # Python 虚拟环境

版本管理

# 查看当前版本
xb version

配置

Sudo 免密

# 启用 sudo 免密配置
xb init myapp --sudoers

# 密码存储在 configs/global_config.yaml
# 建议设置文件权限: chmod 600 configs/global_config.yaml

技术栈

组件 技术
后端 FastAPI + Uvicorn
前端 Vue 3 + Vite
桌面 Electron
构建 PyInstaller + electron-builder
依赖 uv

环境要求

  • Python: 3.10+
  • Node.js: 16+
  • npm: 8+
  • OS: Linux

许可证

MIT

故障排查

# 后端启动失败
cat datas/logs/backend.log
lsof -i :8000

# 手动启动测试
cd myapp
.venv/bin/python backend/main.py

# 前端启动失败
cat datas/logs/frontend.log
cd frontend && rm -rf node_modules && npm install

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xiaomi_xb-1.0.6.tar.gz (47.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xiaomi_xb-1.0.6-py3-none-any.whl (63.7 kB view details)

Uploaded Python 3

File details

Details for the file xiaomi_xb-1.0.6.tar.gz.

File metadata

  • Download URL: xiaomi_xb-1.0.6.tar.gz
  • Upload date:
  • Size: 47.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for xiaomi_xb-1.0.6.tar.gz
Algorithm Hash digest
SHA256 b627f6c892b216b48b4885b671aaedb9833736dfd7760380c25f308dd8cc7fb3
MD5 e5a61888194d253cf319c1354849b2fc
BLAKE2b-256 8aed655f87a79ec033ce6025ddf4085665d76951014fe87192abf34eb2faf011

See more details on using hashes here.

File details

Details for the file xiaomi_xb-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: xiaomi_xb-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 63.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for xiaomi_xb-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 f26c88a52a2377aec82a5109aa01c96552008f9ff82f0877482c6c73b9ab7dc5
MD5 b297a503f45260b03f5f8dee78d2fd4d
BLAKE2b-256 b1675c11268cb1b07f9d24459247cd9480a029b61d48bf8394e0afe220a4fa6f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page