Configuration and troubleshooting
Check working directory, CLI version and target configuration before following a command's error. Development and deployment use separate files; changing one does not update the other automatically.
Configuration locations
| File | Purpose | Managed by |
|---|---|---|
.hohu/config.json under the user directory | CLI language, default official source, component repositories | hohu lang or JSON editing |
Project .hohu/project.json | Components, cloned repository provenance and generated entry records | Generated by hohu create; read to check completeness |
hohu-admin/.env | Development database, Redis, secrets and initial credentials | Development setup |
.hohu/deploy/.env | Docker connections, versions, service flags and credentials | Generated by hohu deploy init, then configured |
.hohu/deploy/docker-compose.override.yml | User Compose overrides | Maintained by you and loaded last |
See configuration ownership for other component and business settings. Do not commit environment files or credentials to public repositories.
View version and configuration
hohu --version
hohu infoinfo shows CLI version, language, saved repository source and global configuration path. It does not check database, network or service health. hohu system info is equivalent.
Choose a language
hohu langInteractively select Simplified Chinese, English or the system default and save it globally. hohu system lang is equivalent; there are no additional options. Language affects CLI messages and new root entry files, not existing application localization.
Shell completion
In a supported shell, use hohu --show-completion to inspect the completion script. To install it, use hohu --install-completion and reload the shell as instructed.
Installation writes to the current user's shell completion configuration. If the shell cannot be detected or is unsupported, use command --help instead.
Repository sources and overrides
Edit JSON at the path shown by hohu info. Preserve existing keys and add settings as needed:
{
"language": "auto",
"source": "gitee"
}source accepts auto, github, gitee for future creation. hohu create --source takes precedence. It does not update existing repositories or change Docker image or dependency sources.
For separate custom component repositories, add backend_repo, frontend_repo or app_repo only for components you want to override. For example:
{
"language": "auto",
"source": "auto",
"backend_repo": "https://example.com/team/backend.git"
}create --repo overrides component settings; custom components override official sources without fallback. Do not embed passwords or tokens in URLs; use Git credential management. See hohu create for creation and hohu deploy for Docker image sources.
Select sources by command
Use --source / -s consistently; each command selects a different resource:
| Command | Values | Example |
|---|---|---|
hohu create | auto/github/gitee | hohu create my-project -s gitee |
hohu init | auto/official/mirror | hohu init -s mirror |
hohu deploy, pull, upgrade | auto/official/acr | hohu deploy pull -s acr |
All default to auto, but creation can read global source and deployment can read HOHU_IMAGE_SOURCE. Initialization preserves package manager configuration, does not read creation's global source, and does not save the current -s choice. Deployment retains --image-source as an alias. See package sources and container images for recovery conditions.
Common problems
| Symptom | Check first | Next action |
|---|---|---|
hohu not found | Installation and PATH | Run uv tool update-shell and refresh the terminal as instructed |
| Command or option missing | hohu --version and command --help | Check support and upgrade the CLI |
| Project not found | .hohu/project.json | Enter the right project; inspect creation if the marker is missing |
| Deployment not initialized | .hohu/deploy/ and directory | Initialize in the intended directory and check configuration |
| Repository network fails | Git source | Use create -s gitee for official sources; maintain existing remotes separately |
| Image network fails | Deployment references and tags | Use deployment --source acr and check availability |
| Package download fails | Component .local/reports/install-*.log, source settings and lockfiles | Use hohu init -s mirror for public packages or auto to preserve custom sources |
| Initialization connection fails | Development .env and databases/Redis | Fix and rerun hohu init |
| Global settings ignored | JSON syntax and hohu info | Preserve settings and fix invalid JSON; read failures fall back to defaults |
Report a problem
Report CLI issues to hohu-cli Issues. Include OS, CLI version, actual command, working directory type, error and expected result. Remove credentials, connection passwords and private business data from logs; the complete .env is not needed.
