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。 架构演进背景见 Click 迁移设计。

许可证

MIT,见 LICENSE。

Metadata

Release files for py-wlcli 0.7.0

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.7.0
File Size Uploaded Provenance Actions
py_wlcli-0.7.0.tar.gz 445.0 kB Without provenance Details for py_wlcli-0.7.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for py-wlcli 0.7.0
File Actions
py_wlcli-0.7.0-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details for py_wlcli-0.7.0-cp311-abi3-win_amd64.whl
py_wlcli-0.7.0-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.7.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
py_wlcli-0.7.0-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for py_wlcli-0.7.0-cp311-abi3-macosx_11_0_arm64.whl
py_wlcli-0.7.0-cp311-abi3-macosx_10_12_x86_64.whl CPython 3.11 abi3 macOS 10.12+ x86-64 Details for py_wlcli-0.7.0-cp311-abi3-macosx_10_12_x86_64.whl

Total release size: 4.3 MB

Release files / py_wlcli-0.7.0.tar.gz

Download URL py_wlcli-0.7.0.tar.gz
Size 445.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9c0a99d2c54f05e67ff2ebb3ea6b4e9c00a73a87791a5a7d061d38e1a191e7dd
BLAKE2b-256 checksum
How to use checksums
c8700babe587945b9f59e2cae8d44986db1c806d70e17b800b51b3037d3e1746
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.7.0-cp311-abi3-win_amd64.whl

Download URL py_wlcli-0.7.0-cp311-abi3-win_amd64.whl
Size 671.3 kB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
ad4e85ca995f27cf5b6f751dc876fefe3ab32eb9d2b03bbfb47748f7e6a4ae9d
BLAKE2b-256 checksum
How to use checksums
e281dbac01a93e7abd44287a76f661c6ce62016aa4d65c2b51c29c21c368571c
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.7.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL py_wlcli-0.7.0-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 786.4 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
036a333a169e36abe25cd95cb941d883387c019804485c602d2d27741d36b8de
BLAKE2b-256 checksum
How to use checksums
29abe274b6f2f9d9072dc06cb3d76f0f15d895a6fa5e3f16d3840b5079829b66
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.7.0-cp311-abi3-macosx_11_0_arm64.whl

Download URL py_wlcli-0.7.0-cp311-abi3-macosx_11_0_arm64.whl
Size 1.2 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
201c184fbbb9b83b97760160b3797f6a40d5c4f7144e035d206877f36377c6c8
BLAKE2b-256 checksum
How to use checksums
ef2ddd0092b308587aece4f3c63565c9ef7027626653e67dfac970b60ec26f91
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.7.0-cp311-abi3-macosx_10_12_x86_64.whl

Download URL py_wlcli-0.7.0-cp311-abi3-macosx_10_12_x86_64.whl
Size 1.2 MB
Tags CPython 3.11 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
f99ff535c9dfb855bf55bf343936050585cc76c65b09fc45734f072b806c76a5
BLAKE2b-256 checksum
How to use checksums
b94852160a055ba38138ec148d938c82cfd35bdf7a9f656dc4cf9c581dffb797
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.7.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.

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