Skip to content

Updating

Use hfim update to update the CLI. Campaign templates and the simulator and SDK versions they request are updated separately.

Part Command Where its version comes from
hfim hfim update the latest release, or the release you name
the template hfim template update the template repository's default branch
simulator and SDK hfim run installs them, hfim setup checks and repairs them the pins of hfim.yaml

HFIM

hfim update              # the latest release on PyPI
hfim update v1.15.5      # one release
hfim update main         # the development branch, from git
hfim doctor              # confirms the version it reports

hfim update installs with what installed hfim: pipx install --force hfim-cli==<version> for a pipx installation, the pip of the virtual environment hfim runs in, or pip install --user for a user installation. Some pipx installations create environments with uv, which cannot reinstall over an existing one; hfim update then installs into the existing environment with pipx runpip. HFIM 1.16.0 and older do not have that fallback, so on such a pipx they stop with "A virtual environment already exists". Run pipx upgrade hfim-cli once instead. With HFIM_PACKAGE_ORG set to a mirror, the releases are the v<x.y.z> tags of that mirror's hfim repository.

A template names the HFIM versions it works with (core: ">=1.14,<2" in hfim.yaml). Outside that range hfim run, hfim golden, hfim build, hfim doctor and hfim setup stop and print the hfim update that installs the highest release inside it.

The template

hfim doctor asks the template repository whether it moved since hfim init copied it, and says by how many commits. hfim run repeats that answer in one line for a day after.

hfim template update --dry-run     # what would change, file by file
hfim template update               # applies it; nothing is committed
git diff                           # review
git commit -am "Template update"

A file you did not change takes the template's version. A file changed on both sides is merged, and conflicts are marked and listed. hfim template update needs a clean working tree (--allow-dirty copies every file it changes to .hfim/backup/<time>/ first).

Simulator and SDK

After a template update that changes a pin, the next hfim run installs what it pins, one line per package. To check every pin first, or to repair an install that failed, run:

hfim setup

hfim setup says what each pin is and whether it is installed, installs what is missing with the full build output, and ends with the report of hfim doctor. hfim setup --dry-run installs nothing.

The simulator pin is exact (simulator: hfim-sim-qemu@9.2.4, or the short qemu@9.2.4); the release with that version is built. The SDK pin is a range (sdk: "hfim-sdk>=1.3,<2", where the older form hfim-sdk@1.3 means 1.3 or newer); the highest release inside it is installed. Older versions stay installed beside the new one, because another campaign directory may pin them.

Outside a template's pins:

Command Effect
hfim sim install <name>[@<version>] builds a release of a simulator package, the latest when no version is given; the name is short (qemu) or full (hfim-sim-qemu)
hfim sim update <package> --rebuild builds an installed release again
hfim sdk install [<version or range>] installs the highest hfim-sdk release inside the range
hfim sdk install --path <checkout> registers a checkout of your own instead of a release, for developing the SDK; hfim doctor labels it a linked checkout