CLI Reference
此内容尚不支持你的语言。
Reference documentation for the HugoBlox CLI (hugoblox or hbx).
Global Options
Section titled “Global Options”All commands accept the following global flags:
| Option | Description |
|---|---|
-h, --help | Display help for the command |
-v, --version | Output the version number |
Core Commands
Section titled “Core Commands”create site
Section titled “create site”Create a new HugoBlox site from a template.
hbx create site [options] [dir]Arguments:
dir: Target directory (defaults to template slug, e.g.,new-site).
Options:
--template <id>: Starter template ID.--dir <path>: Target directory (alternative to argument).--package-manager <name>: Package manager to use (default: “pnpm”).--no-install: Skip dependency installation.--git: Initialize a git repository.--ci: Run in non-interactive mode.--sample-content: Force include sample content.--no-sample-content: Skip sample content.--preview: Automatically start the dev server after setup.--no-preview: Skip the dev server prompt.
create block
Section titled “create block”Create a new HugoBlox block (React component).
hbx create block [options] <id>Arguments:
id: Block identifier (e.g.my-cta).
Options:
--example <slug>: Include sample content for the block.--dry-run: Print the actions without writing files.--yes: Overwrite files when they already exist.
Start the local development server with Hugo.
hbx dev [options]This acts as a wrapper around hugo server, adding helpful defaults for local development.
Options:
--path <dir>: Project directory (defaults to current directory).--no-default-flags: Disable automatic--disableFastRenderflag.--quiet: Suppress all output except errors.--filter: Show only warnings and errors (hide info messages).--verbose: Show all Hugo output (default).
Build your site for production.
hbx build [options]Runs hugo --gc --minify to generate a production-ready site in the public/ folder.
Options:
--path <dir>: Project directory (defaults to current directory).--no-default-flags: Disable automatic--gcand--minifyflags.--quiet: Suppress all output except errors.--filter: Show only warnings and errors.
Management Commands
Section titled “Management Commands”upgrade
Section titled “upgrade”Upgrade HugoBlox modules and the CLI to the latest version.
hbx upgradeinstall
Section titled “install”Hydrate HugoBlox Pro assets and dependencies.
hbx installdoctor
Section titled “doctor”Check your local environment for issues (missing dependencies, path problems, etc.).
hbx doctorCloud Commands
Section titled “Cloud Commands”Authenticate with HugoBlox Pro.
hbx loginlogout
Section titled “logout”Log out and remove stored credentials.
hbx logouttelemetry
Section titled “telemetry”Manage usage data sharing preferences.
hbx telemetry [status|enable|disable]Commands:
status: Show whether telemetry is enabled.enable: Enable anonymous telemetry.disable: Disable telemetry collection.