Skip to content

hohu create ​

Fetch selected component repositories and generate the project marker and development entry files. It does not install dependencies or start services. Next, run hohu init.

Prerequisites ​

Install HoHu CLI and Git, with access to the repositories. Run from the new project's parent directory. Use a single folder name; the target file or directory must not exist. Configure Git credentials before accessing private repositories.

Usage and options ​

bash
hohu create [PROJECT_NAME] [OPTIONS]
Argument or optionDescriptionDefault
PROJECT_NAMEA folder name under the current directory; paths are not acceptedhohu-admin
--component / -cRepeat for backend, frontend, web, appInteractive selection
--non-interactiveDisable component prompts; requires --componentOff
--source / -sOfficial source: auto, github, giteeGlobal source, or auto if unset
--repo / -rOne custom repository used for every selected componentConfigured component repositories

Names are case-insensitive; web aliases frontend, and duplicates are removed. create does not accept development aliases such as be or fe.

Examples ​

bash
# Select components interactively
hohu create my-project

# Backend + Web for scripts or coding assistants
hohu create my-project --component backend --component web --non-interactive

# Use official Gitee repositories
hohu create my-project --component backend --component web -s gitee

# Create only Backend from a custom repository
hohu create my-project --component backend --repo https://example.com/team/backend.git

--repo does not map separate repositories to different components. Use global configuration for per-component repositories.

Repository sources ​

auto tries GitHub first and falls back to official Gitee mirrors on network or transfer failures. Authentication, path and disk errors fail directly. Explicit github, gitee and custom repositories do not fall back.

Official repositories check out main, not a release tag. Custom repositories use their remote default branch. Mirrors may lag; actual sources, branches and commits are recorded in .hohu/project.json. See global configuration for defaults; these settings do not change npm, PyPI or Skills sources.

Results ​

A completed Backend + Web project contains:

text
my-project/
├── .hohu/project.json
├── AGENTS.md
├── CLAUDE.md
├── README.md
├── .gitignore
├── hohu-admin/
└── hohu-admin-web/

Root entry files are generated after every component is cloned. Creation does not initialize a Git repository at the parent project root; component commits do not include parent entry files.

Check that selected directories exist, enter the project, prepare configuration using development setup, then run hohu init. Open the shared root in your coding assistant.

Troubleshooting ​

SymptomAction
Target already existsChoose another name or inspect the directory; creation never overwrites it
Clone failsCheck network, Git credentials and URLs; use -s gitee for an unavailable official GitHub source
Only some components were createdCheck the marker and directories; there is no automatic resume command. Create under a new name or restore missing components manually
Non-interactive mode requires componentsSupply at least one --component
Option is not recognizedCheck hohu create --help and use a version that supports it

hohu init skips missing component directories; its success message does not prove cloning completed.