CLI Reference

Comprehensive guide to the HugoBlox CLI commands and options.

Reference documentation for the HugoBlox CLI (hugoblox or hbx).

Use hbx as a shorthand alias for hugoblox to save keystrokes!

Global Options

All commands accept the following global flags:

OptionDescription
-h, --helpDisplay help for the command
-v, --versionOutput the version number

Core Commands

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

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.

dev

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 --disableFastRender flag.
  • --quiet: Suppress all output except errors.
  • --filter: Show only warnings and errors (hide info messages).
  • --verbose: Show all Hugo output (default).

build

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 --gc and --minify flags.
  • --quiet: Suppress all output except errors.
  • --filter: Show only warnings and errors.

Management Commands

upgrade

Upgrade HugoBlox modules and the CLI to the latest version.

hbx upgrade

install

Hydrate HugoBlox Pro assets and dependencies.

hbx install

doctor

Check your local environment for issues (missing dependencies, path problems, etc.).

hbx doctor

Cloud Commands

login

Authenticate with HugoBlox Pro.

hbx login

logout

Log out and remove stored credentials.

hbx logout

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.

Was this page helpful?

From the makers of

© 2026 Lore Labs.

On this page