Features
- Blazing Fast — Built on
uvfor near-instant CLI response times - Smart Init — Auto-detects and installs dependencies (
uv sync/pnpm install), auto-installsuvif missing - One-Click Deploy — Deploy the full stack (Backend + Frontend + PostgreSQL + Redis + Nginx SSL) with a single
hohu deploy - Source Build — Build Docker images from your modified source code with
hohu build, then deploy - Database Migrations — Run migrations and seed data via
hohu migrate - Context-Aware — Run commands from any subdirectory via
.hohuproject config - i18n — Full Chinese & English support with automatic system language detection
- Polished UX — Rich-formatted output with interactive prompts via Questionary
About hohu-admin
hohu-admin is an enterprise-grade full-stack admin management platform built for the AI era. It provides a complete set of production-ready backend infrastructure out of the box — user authentication, RBAC permission control, distributed ID generation, database migration, log monitoring, and API documentation — so developers can focus on business innovation instead of repetitive boilerplate.
Highlights
- Async High Performance — Full async pipeline (FastAPI + SQLAlchemy 2.0 async + PostgreSQL)
- Distributed Snowflake ID — Time-ordered, high-performance primary keys with automatic
BigInt→ string serialization - RBAC Permission Model — User-Role-Menu based access control with button-level granularity
- Dual Auth Support — OAuth2 form login (Swagger UI) + JSON login (SPA), with Redis token blacklist
- Unified API Response — Consistent
{code, message, data}envelope across all endpoints - Auto Case Conversion — Backend
snake_case↔ FrontendcamelCasevia Pydanticalias_generator
Projects
| Project | Description | Tech Stack |
|---|---|---|
| hohu-admin | Backend API | FastAPI, SQLAlchemy 2.0 (async), PostgreSQL, Redis |
| hohu-admin-web | Admin dashboard | Vue 3, NaiveUI, UnoCSS, Pinia, TypeScript |
| hohu-admin-app | Mobile app | uni-app, Vue 3, Wot Design Uni, alova |
Quick Start
Install
# uv (recommended)
uv tool install hohu
# pip
pip install hohu
Update
# uv
uv tool upgrade hohu
# pip
pip install --upgrade hohu
Create a Project
hohu create my-project
For agents or scripts, select components without interactive prompts:
hohu create my-project --component backend --component web --non-interactive
The default auto source tries GitHub first and switches to the official Gitee mirror on network failure. To use one source explicitly:
hohu create my-project -s gitee
hohu create my-project --source github
Save "source": "gitee" in ~/.hohu/config.json to use Gitee by default, preserving other settings. Explicit sources and custom repositories do not fall back. Official repositories check out main; custom repositories keep their remote default branch. Each completed component's source and commit are recorded in .hohu/project.json.
Creation also generates root AGENTS.md, CLAUDE.md, README.md and .gitignore from bundled templates. Open the project root in your coding assistant; its reading map links the selected components' existing instructions. See project creation for guidance, source priority, component aliases, failure recovery and initialization boundaries.
Confirm each component (Backend / Frontend / App) interactively. Defaults to hohu-admin if no name is given.
Install Dependencies
cd my-project
hohu init
Use hohu init -s mirror for domestic package mirrors or hohu init -s official
to disable fallback. The default auto preserves configured sources and retries
official package download failures once using Tsinghua PyPI / npmmirror. Installation
keeps uv / pnpm and the locked versions; it never falls back to system pip or npm.
Existing lockfiles are required. Custom registries, non-network failures and fixed
download URLs are not silently replaced. Logs are saved under each component's
.local/reports/. See source selection and recovery.
Source flags use --source / -s across commands: create selects Git repositories,
init selects package sources, and deploy, deploy pull, deploy upgrade select
container images (auto/official/acr). Deployment's --image-source remains an alias.
Automatically detects project config and installs all dependencies.
Windows Users: If
hohu initfails withEPERM: operation not permitted, symlink, try the following:
- Enable Developer Mode in Windows Settings: Settings → Update & Security → For developers → Developer Mode. This allows symlink creation without admin privileges.
- Run your terminal as Administrator.
- Check your antivirus software (e.g., 360, Huorong) — some may block symlink creation. Try adding the project directory to the exclusion list or temporarily disabling real-time protection.
Install AI Coding Skills
From your business project directory, use either entry point:
hohu skills install
npx skills@latest add aihohu/hohu-skills
The HoHu command uses skills@1.7.0 and requires stable Node.js >=22.20.0 with npm/npx. Select Claude Code, Cursor, Codex, OpenCode, TRAE or another upstream-supported agent. Use repeated --agent flags for explicit targets. See the installation guide and contributor contract.
Switch Language
hohu lang
Development Server
hohu dev launches all services in a single terminal with merged, color-coded log output.
hohu dev # Start all components
hohu dev -o be # Backend only
hohu dev -s app # Frontend + Backend, skip App
hohu dev -t mp # App in WeChat Mini Program mode
Options
| Option | Short | Description | Default |
|---|---|---|---|
--app-target |
-t |
App runtime: h5 / mp / app |
h5 |
--only |
-o |
Only start specified components (repeatable) | all |
--skip |
-s |
Skip specified components (repeatable) | none |
Component aliases (case-insensitive): be / backend, fe / frontend, app
Log Colors
| Prefix | Color | Service |
|---|---|---|
[Backend] |
green | FastAPI |
[Frontend] |
cyan | Vite / pnpm |
[App] |
yellow | Uni-app |
Press Ctrl+C for graceful shutdown — all child processes are terminated cleanly.
Build
Build Docker images from local source code. After building, run hohu deploy to deploy with the locally built images.
hohu build # Build all components
hohu build --only=backend # Build backend only
hohu build --only=frontend # Build frontend only
hohu build --no-cache # Build without cache
hohu build --tag=v1.0.0 # Custom image tag
hohu build --reset # Reset to official GHCR images
Automatically initializes .hohu/deploy/ (config, .env, secrets) on first run — no need to run hohu deploy init separately. Switch back to official images anytime with hohu build --reset.
Deployment
Deploy the full stack to a Linux server with Docker Compose. Includes PostgreSQL, Redis, Nginx (SSL termination), and the application services.
Quick Start
Source build deploy:
hohu build # Build images (auto-initializes deploy config)
hohu deploy # Deploy
Official image deploy:
hohu deploy init # Initialize deployment config and generate .env
hohu deploy # Pull images and deploy
Edit .hohu/deploy/.env to set passwords, SECRET_KEY, and SSL certificate path before deploying.
Deploy Commands
hohu deploy # One-click deploy (pull → migrate → start)
hohu deploy init # Initialize deployment directory and .env
hohu deploy pull # Pull latest images and restart
hohu deploy ps # Show service status
hohu deploy logs # View logs (-f to follow)
hohu deploy restart # Restart services
hohu deploy down # Stop all services
hohu migrate # Run database migrations and synchronize built-in data
Deploy Options
hohu deploy # Migrate and initialize/synchronize data automatically
hohu deploy --no-migrate # Skip migrations and data synchronization
External PostgreSQL / Redis
The initial admin password is generated in .hohu/deploy/.env as
HOHU_ADMIN_PASSWORD. It is never printed or reset by subsequent deployments.
Core multi-tenant deployments use TENANT_MODE=hosted,
TENANT_HOSTED_LOGIN_ENABLED=true, and the full backend RELEASE_BUILD_SHA.
By default, PostgreSQL and Redis run as Docker containers. To use your own instances, edit .hohu/deploy/.env:
# Disable built-in PostgreSQL
ENABLE_POSTGRES=false
DATABASE_URL=postgresql+asyncpg://user:password@your-pg-host:5432/dbname
# Disable built-in Redis
ENABLE_REDIS=false
REDIS_HOST=your-redis-host
REDIS_PASSWORD=your-redis-password
When disabled, the corresponding containers won't start and the application connects to your external instances.
Architecture
Internet → Nginx (SSL) → hohu-admin-web → hohu-admin-api → PostgreSQL + Redis
SSL Certificates
Place your certificate files in .hohu/deploy/ssl/:
ssl/
├── fullchain.pem
└── privkey.pem
For Let's Encrypt, point SSL_CERT_PATH in .env to the certbot output directory.
Command Reference
| Command | Description |
|---|---|
hohu create [NAME] |
Create project and clone repo templates |
hohu init |
Install all sub-project dependencies |
hohu dev |
Start development server |
hohu build |
Build Docker images from local source code |
hohu deploy |
One-click Docker deployment |
hohu deploy init |
Initialize deployment directory and .env |
hohu deploy pull |
Pull latest images and restart |
hohu deploy ps |
Show service status |
hohu deploy logs |
View service logs |
hohu deploy restart |
Restart services |
hohu deploy down |
Stop all services |
hohu migrate |
Run database migrations and initialization |
hohu lang |
Switch display language (zh / en / auto) |
hohu info |
View current CLI configuration |
hohu --version |
Show version |
hohu --help |
Show help |
Tech Stack
| Layer | Tool |
|---|---|
| CLI Framework | Typer |
| Terminal UI | Rich + Questionary |
| Package Manager | uv |
| Deployment | Docker Compose + Nginx |
| Backend | FastAPI |
| Frontend | Vue 3 |
| App | Uni-app |
Contributing
Issues and Pull Requests are welcome!
Maintainers can mirror the deployment's PostgreSQL, Redis, and Nginx images to public ACR repositories through the infrastructure mirror workflow.
See the contribution guide and testing guide for setup and check commands. During development, run related regressions; commit hooks run Ruff lint and format checks. Run the full suite and coverage at feature acceptance and in CI.
Metadata
Release files for hohu 0.1.16
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| hohu-0.1.16.tar.gz | 150.2 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hohu-0.1.16-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 236.5 kB
Release files / hohu-0.1.16.tar.gz
| Download URL | hohu-0.1.16.tar.gz |
|---|---|
| Size | 150.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ed6bb3d24363f6d93abd7eabd12430cac80a0e1c7e171d83e7d4d0c0f673063f
|
|
BLAKE2b-256 checksum How to use checksums |
5fd3bf73ad80da216d5c92610d285f02d4d4820177503aabb5809702de7e7dfd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / hohu-0.1.16-py3-none-any.whl
| Download URL | hohu-0.1.16-py3-none-any.whl |
|---|---|
| Size | 86.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
595676b7d9ea7ec5e6c0d3ac8ef54f2e62137e2c40148fa4f144660bd9474d6f
|
|
BLAKE2b-256 checksum How to use checksums |
0704314edf0e9a2185850766913366544ae5a455af2b926fc64c148355eafdc7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logSecurity for hohu 0.1.16
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for hohu-0.1.16.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logA 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.