HoHu CLI Tool
Project description
📦 HoHu CLI
HoHu CLI 是一款为 hohu-admin 生态量身打造的现代化命令行工具。它集成了项目脚手架生成、自动化环境初始化和多语言切换功能,旨在提升全栈开发者的生产力。
✨ 特性
- 🚀 极速启动:基于
uv开发,响应速度极快。 - 🛠️ 智能初始化:后端自动执行
uv sync,前端及 APP 自动执行pnpm install。 - 📂 上下文感知:通过项目级
.hohu配置,在项目内任何路径执行init均可识别。 - 🌍 多语言支持:完美支持中英文切换,自动跟随系统语言。
- 🎨 精美交互:基于
Rich和Questionary打造,提供极致的视觉与交互体验。
🏗️ 项目架构流
📥 安装
使用 uv (推荐) 或 pip 进行全局安装:
# 使用 uv
uv tool install hohu
# 或使用 pip
pip install hohu
🚀 快速开始
1. 创建新项目
你可以直接运行 create。如果不提供名称,将默认创建名为 hohu-admin 的文件夹。
hohu admin create my-project
系统会提示你选择需要安装的组件(后端、前端、APP)。
2. 初始化环境
进入项目目录后,直接运行 init。工具会自动识别项目配置并安装所有依赖。
cd my-project
hohu admin init
3. 切换语言
随时随地切换你偏好的交互语言:
hohu lang
🛠️ 命令详解
| 命令 | 描述 |
|---|---|
hohu admin create [NAME] |
创建项目目录并克隆选定的仓库模板 |
hohu admin init |
自动化安装子项目的依赖 (uv/pnpm) |
hohu lang,hohu system lang |
切换 CLI 显示语言 (zh/en/auto) |
hohu info,hohu system info |
查看 CLI 当前详细配置信息 |
hohu --version,-v |
显示当前版本号 |
hohu --help |
查看帮助信息 |
📂 推荐目录结构
执行 hohu admin create 后的项目结构:
my-project/
├── .hohu/ # HoHu 项目追踪配置
├── hohu-admin/ # 后端项目 (FastAPI/uv)
├── hohu-admin-web/ # 前端项目 (Vue3/pnpm)
└── hohu-admin-app/ # APP 项目 (Uni-app/pnpm)
🤝 贡献指南
我们非常欢迎 Issue 和 Pull Request!
- Fork 本仓库。
- 创建你的特性分支 (
git checkout -b feature/AmazingFeature)。 - 提交你的更改 (
git commit -m 'Add some AmazingFeature')。 - 推送到分支 (
git push origin feature/AmazingFeature)。 - 开启一个 Pull Request。
📄 开源协议
本项目采用 MIT 协议。
💡 开发者备注
如果你在发布到 PyPI 时遇到资源文件(JSON)丢失的问题,请确保你的 pyproject.toml 包含以下配置:
[tool.hatch.build]
artifacts = ["hohu/locales/*.json"]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hohu-0.1.1.tar.gz.
File metadata
- Download URL: hohu-0.1.1.tar.gz
- Upload date:
- Size: 23.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5fb6a945b49c2018a3fc3498456e21976f3d8415bb661b23a5928dce63281109
|
|
| MD5 |
926f56fb5ffd06c6d25db351cdb54ec4
|
|
| BLAKE2b-256 |
f03903346a59b4b55ff8b34a0bf794dfe1cf6f5bd7cade6e596a9de395eff1a7
|
File details
Details for the file hohu-0.1.1-py3-none-any.whl.
File metadata
- Download URL: hohu-0.1.1-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0d22bdc9d401a655c30794234490aae2f18e0539796cf0575e3e2f0975613bd
|
|
| MD5 |
236f936bc1259faf194dd91dd0867052
|
|
| BLAKE2b-256 |
ba8cdb69ea30bb757312df0774751e335cb1ae1110eb43512bc5e6a7c8b5193e
|