Skip to main content

wl_cli(wl CLI)

wl_cli 是一个 Python + Rust 混合的命令行工具,命令入口为 wl。它以 Click 构建 CLI, 以 maturin + pyo3 编译 Rust 原生扩展,面向 Python 项目的初始化、构建、测试、格式化、lint、 清理与质量门等日常开发工作流。

功能概览

命令 用途
wl init 初始化项目环境(Git、虚拟环境、i18n、Rust 子模块等)
wl build 执行构建任务,支持 Python 包构建与分发
wl test 运行测试(支持缓存、覆盖率、逐步模式)
wl format 格式化 Python 与 Rust 代码
wl lint 代码质量检查(ruff/mypy 等)
wl clean 清理构建产物与临时文件
wl debug (已弃用)质量门 — 改用 wl test -s 与 wl format -s
wl self 自管理命令

命令行别名:b→build、c→clean、f→format、i→init。 完整命令参考见 CLI_COMMANDS.md。

环境要求

  • Python >= 3.11
  • 从源码构建 Rust 扩展时需要 Rust 工具链(maturin/pyo3)
  • 包管理器推荐 uv

安装

稳定版(PyPI)

pip install py-wlcli

按需安装可选 extra:pip install "py-wlcli[lfs]"(LFS watch)、 pip install "py-wlcli[test]"(测试套件)、pip install "py-wlcli[dev]"(开发工具)。 详见安装文档。

开发版(从源码)

# 以 GitLab 为主仓(origin),GitHub 为镜像
git clone https://gitlab.gewinnrobo.com/Humuyuan/wl-cli.git
cd wl_cli
uv pip install -e ".[dev,test]"

GitHub 镜像:https://github.com/CharlieZi/wl-cli.git

快速开始

wl --help       # 查看帮助
wl init         # 初始化项目
wl build        # 构建
wl test         # 运行测试
wl format       # 格式化代码
wl lint         # 代码质量检查

测试与质量门

wl test              # 运行全部测试
wl test --cover      # 覆盖率(阈值 70%)
wl test -s           # 逐个测试文件运行,首个失败即停
pytest tests/ -v     # 指定文件(pytest 直跑)

提交前请确保 pre-commit 通过(ruff、codespell、lockfile 一致性等)。 开发约束详见 CLAUDE.md, 贡献流程见 CONTRIBUTING.md。

文档

架构速览

Click CLI(src/wl_cli/cli_click.py 经 setup_commands() 直接注册)→ 各命令实现(commands/<group>/)→ 业务逻辑; Rust 原生扩展(rust/、src/wl_cli/lib/)经 maturin 编译为 wl_cli_native; 依赖注入容器集中管理共享服务(infrastructure/dependency_injection.py)。 架构演进背景见 Click 迁移设计。

许可证

MIT,见 LICENSE。

Metadata

Release files for py-wlcli 0.6.14

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

Source distribution (sdist)

Source distribution for py-wlcli 0.6.14
File Size Uploaded Provenance Actions
py_wlcli-0.6.14.tar.gz 276.7 kB Without provenance Details for py_wlcli-0.6.14.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for py-wlcli 0.6.14
File Actions
py_wlcli-0.6.14-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details for py_wlcli-0.6.14-cp311-abi3-win_amd64.whl
py_wlcli-0.6.14-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 abi3 Linux glibc 2.17+ x86-64 Details for py_wlcli-0.6.14-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
py_wlcli-0.6.14-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for py_wlcli-0.6.14-cp311-abi3-macosx_11_0_arm64.whl
py_wlcli-0.6.14-cp311-abi3-macosx_10_12_x86_64.whl CPython 3.11 abi3 macOS 10.12+ x86-64 Details for py_wlcli-0.6.14-cp311-abi3-macosx_10_12_x86_64.whl

Total release size: 3.4 MB

Release files / py_wlcli-0.6.14.tar.gz

Download URL py_wlcli-0.6.14.tar.gz
Size 276.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c111b4af3edb8974260d86104b4edb5b0ee36d3f892fe118f9decbc943f7600f
BLAKE2b-256 checksum
How to use checksums
31250054df1d9cf4cfe884019470f272909980d161653ae890d3514d2ef92925
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / py_wlcli-0.6.14-cp311-abi3-win_amd64.whl

Download URL py_wlcli-0.6.14-cp311-abi3-win_amd64.whl
Size 490.0 kB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
7ac1a8b3c4d0c45ff60fe24790f93393bf4deb7f768b4279e8421b00314ce0f7
BLAKE2b-256 checksum
How to use checksums
a884ccd15cf6909a5a15ed29d5081c4b1fd5f2e41358c46a785a66f83e7d5f5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / py_wlcli-0.6.14-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL py_wlcli-0.6.14-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 605.2 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
d63baa1597a6ccf6eec944fd42b1aad9447aeec2daac9555d3c6e6f77732408d
BLAKE2b-256 checksum
How to use checksums
6707d13ad932b8d87e67c4f1f074ce5e348ba15d057017d50092d2da141216b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / py_wlcli-0.6.14-cp311-abi3-macosx_11_0_arm64.whl

Download URL py_wlcli-0.6.14-cp311-abi3-macosx_11_0_arm64.whl
Size 1.0 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
07280716afb9d82b45624ddbc44edff80e24f7a5830d48bd572c81f7ac7821b7
BLAKE2b-256 checksum
How to use checksums
1129a7b6dbfa103fdde159b0ddf0f369a9feb272084d5274f8bec60412bbe050
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / py_wlcli-0.6.14-cp311-abi3-macosx_10_12_x86_64.whl

Download URL py_wlcli-0.6.14-cp311-abi3-macosx_10_12_x86_64.whl
Size 1.0 MB
Tags CPython 3.11 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
f27c3cc7d1bc47a0c5a1111bd56cdf60a11682f07c7c78f09b999cc74610735e
BLAKE2b-256 checksum
How to use checksums
149e6aa5363e02cb81ab5daf395c1d05816571256d16012a523c3a04babfc059
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Security for py-wlcli 0.6.14

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.

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