:hidden:
:maxdepth: 2
tutorial/index
howto/index
reference/index
explanation/index
Hyrum bulk-runs a check (typically lint or unit tests) across many charm repositories, optionally patching one of their dependencies first.
The primary use case is pointing every charm’s ops dependency at a development branch of the operator repository to find out which charms break before shipping the change. Named after Hyrum’s Law: once you have enough users, every observable behaviour of your code is depended on by somebody.
Hyrum executes third-party code on your machine. Unit tests — and, in principle, even lint hooks — run with your user's privileges: anything you can do, a test can do. Charm test suites may not mock every side effect, so a test may write or delete files anywhere your user can reach, install packages, modify `crontab`, download arbitrary content, or reach out to the network.
**Always run hyrum in an isolated VM** (for example, [Multipass](https://canonical.com/multipass) or an LXD virtual machine): create a throwaway instance, install hyrum inside it, and dispose of the instance when you are done. Alternatively, [run hyrum in the repository's workshop](#run-hyrum-in-a-workshop), which runs the checks in a container as a user that cannot modify the host. Do not run checks on your workstation, laptop, or any host holding data you care about.
uv tool install --prerelease=allow hyrum
# Clone every repository listed in ./charms.csv into ~/.cache/hyrum/charms:
hyrum get-charms
# Run tox -e unit across every charm, with ops patched to a development branch:
hyrum check unit --patch 'ops @ canonical:fix/my-change' --workers 8
# Run without patching any dependency (test charms as they are pinned):
hyrum check unit --no-patch
# Diff the last two runs to see what the patch changed:
hyrum compare ~/.cache/hyrum/results/unit.auto.prev.json \
~/.cache/hyrum/results/unit.auto.json
# Print a saved run again, without rerunning it:
hyrum show ~/.cache/hyrum/results/unit.auto.json
# Remove the build artefacts the runs left behind, keeping the checkouts:
hyrum clean
::::{grid} 1 1 2 2
:::{grid-item-card} Tutorial A hands-on walkthrough: populate a charms directory, run hyrum, and read the report. :::
:::{grid-item-card} How-to guides Task-focused guides: install, filter runs, patch a dependency, triage results, and reclaim disk space. :::
:::{grid-item-card} Reference
CLI options, hyrum.toml configuration, output statuses, and what hyrum supports.
:::
:::{grid-item-card} Explanation Background on Hyrum’s Law and the design decisions behind hyrum. :::
::::
This documentation uses the Diátaxis documentation structure.
Hyrum is an open source project (Apache 2.0 license) maintained by the Canonical Charm Tech team.