Skip to main content

bocai-cli

使用 Python + Typer 封装 SaaS API 的命令行工具。当前提供健身房和工作室两个产品入口,共享同一套核心代码和配置。

产品 安装包 命令
健身房 bocai-cli bocai-cli
工作室 bocai-studio-cli bocai-studio-cli

开发安装

先安装共享核心,再安装两个产品入口:

python -m pip install -e .
python -m pip install --no-deps -e packages/bocai-cli -e packages/bocai-studio-cli

也可以只安装某一个产品入口:

python -m pip install --no-deps -e packages/bocai-cli

构建离线 wheel

构建机需要先安装 hatchling:

python -m pip install "hatchling>=1.24.2"

构建三个同版本 wheel,并同时收集运行依赖:

python scripts/build_wheels.py

如果依赖已经由内网镜像提供,只构建产品 wheel:

python scripts/build_wheels.py --no-deps

构建产物位于 dist/,包括 bocai-cli-core、bocai-cli 和 bocai-studio-cli。

离线安装

健身房机器:

python -m pip install --no-index --find-links dist bocai-cli==0.2.0

工作室机器:

python -m pip install --no-index --find-links dist bocai-studio-cli==0.2.0

如果机器上已有旧版 bocai-cli,仅安装工作室版前先执行:

python -m pip uninstall -y bocai-cli

如果机器上安装过旧包名 bocai-cli-studio,先卸载旧包再安装 bocai-studio-cli:

python -m pip uninstall -y bocai-cli-studio

安装后验证

bocai-cli --help
bocai-studio-cli --help
bocai-cli report --help
bocai-studio-cli card --help

工作室命令迁移

健身房版只包含健身房命令,不包含 studio-* 命令。工作室能力统一在 bocai-studio-cli 中提供,并去掉 studio- 前缀。旧版命令迁移如下:

旧版 bocai-cli 命令 新工作室命令
center studio-seller-list bocai-studio-cli center seller-list
center studio-trainer-list bocai-studio-cli center trainer-list
member studio-proposed-list bocai-studio-cli member proposed-list
member studio-member-list bocai-studio-cli member member-list
card studio-contract-list bocai-studio-cli card contract-list
card studio-sale-performance bocai-studio-cli card sale-performance
card studio-private-consume-performance bocai-studio-cli card private-consume-performance

center card-list、center source-list、center tag-list 现在只保留在工作室版;健身房 bocai-cli center 只提供 list 和 manager-phone。

bocai-cli 暂不提供 member 命令组,所有会员命令请使用 bocai-studio-cli member ...,包括 detail、proposed-list 和 member-list。

bocai-cli card contract-detail 暂时移除,需要使用 bocai-studio-cli card contract-detail。

工作室版不提供 course 命令组;课程相关命令仅保留在健身房版 bocai-cli course ...。

bocai-studio-cli card sale-performance 指向工作室销售业绩;bocai-cli card sale-performance 仍指向健身房售卡业绩。两组命令不会互相出现在对方的帮助中。

guanyuan absence-statistics 和 guanyuan absence-detail 按产品设置默认业态:健身房默认 --type 2,允许 2/3;工作室默认 --type 1,只允许 1。

配置文件

两个产品共用现有配置:

  • 优先读取环境变量 BOCAI_CLI_CONFIG_PATH。
  • 未设置时读取 ~/.config/bocai-cli/config.toml。
  • Windows 默认路径为 C:\Users\{用户名}\.config\bocai-cli\config.toml。

config.toml 示例(base_url、app_id、secret 按实际替换):

base_url = "http://10.0.0.227:10086"
app_id = "test_app_001"
secret = "test_secret_123456"

Metadata

Release files for bocai-cli-core 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for bocai-cli-core 0.2.0
File Interpreter ABI Platform Actions
bocai_cli_core-0.2.0-py3-none-any.whl Python 3 none any Details for bocai_cli_core-0.2.0-py3-none-any.whl

Release files / bocai_cli_core-0.2.0-py3-none-any.whl

Download URL bocai_cli_core-0.2.0-py3-none-any.whl
Size 38.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ab96de039da268879df6dbaec1e74db940a40ccdb747c82500ea227d81d4f689
BLAKE2b-256 checksum
How to use checksums
e85bfece2537faa53379e5943816c880536796d217e850cb004bcc6b89659f7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.7

Security for bocai-cli-core 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page