Reference

Every command hop has

This page is a direct transcript of hop help <command> for every command in the CLI, as of the version this site tracks — nothing here is summarized or paraphrased from memory of what a command does.

In plain terms Every command follows the same shape: hop <command> [flags] [arguments]. Flags in brackets are optional; a name in <angle brackets> is required. The eight global flags at the bottom (--yes, --dry-run, --json, and so on) work on every single command below, so they're listed once rather than repeated forty times.

Packages

The commands that actually change what's installed. Every one of them is a single transaction: hop downloads and verifies everything first, and only then flips one symlink to make the change live.

installaliases: i, add-pkgPackages
hop install [flags] <package>...

Install one or more packages and everything they depend on. Downloads run in parallel, and an artifact already in the store is reused without touching the network. If anything fails, nothing changes — your environment is left exactly as it was. Works for GUI apps (Homebrew casks) too — those land in ~/Applications instead of on PATH; see how.

-f, --force
reinstall even if already at this version
removealiases: rm, uninstallPackages
hop remove [flags] <package>...

Remove packages from the active set. Dependencies that nothing else needs are removed too, so uninstalling doesn't leave orphans behind. Removal is bookkeeping only — the package stays in the store until hop gc runs, which is why hop rollback can bring it straight back.

--keep-orphans
do not remove dependencies that are no longer needed
upgradealias: upPackages
hop upgrade [flags] [package]...

Upgrade the named packages, or everything if you name none. Like install, this is one transaction across every package — either they all move, or none do. The previous versions stay in the store, so hop rollback undoes the whole upgrade instantly.

Not the same as hop self-update: this upgrades installed packages. self-update upgrades hop itself. Neither touches what the other manages.
reinstallPackages
hop reinstall <package>...

Reinstall packages at their current indexed version — the same store path is re-verified and re-linked, useful if something in a generation looks damaged without wanting to change what version you're on.

Inspect

Read-only commands. None of these touch the store, a generation, or the network beyond a search query.

listalias: lsInspect
hop list [flags]

List installed packages.

-e, --explicit
only packages you asked for, not dependencies
infoalias: showInspect
hop info <package>

Show everything known about a package: version, description, dependencies, and which platforms it's built for.

whichInspect
hop which <command>

Show which package provides a command — useful when a binary name doesn't obviously match a package name.

outdatedInspect
hop outdated

List installed packages with newer versions available in the index, without changing anything.

depsInspect
hop deps <package>

Show a package's dependency tree.

--all
include packages that depend on it too

Projects

Per-project reproducibility: a hopfile.toml declares what a project needs, and an optional hop.lock pins the exact resolved versions so a second machine gets identical bytes.

migratealias: from-brewProjects
hop migrate [flags]

Find what Homebrew has installed and reinstall it under hop. Reads Homebrew's Cellar and install receipts directly — brew doesn't have to be running, and nothing about the Homebrew installation is touched. Only formulae installed on request are considered by default; brew's own internal library dependencies are left out, since hop resolves its own. Nothing is removed from Homebrew — hop prints the exact brew uninstall commands to run yourself. Casks (GUI apps) are reported but not migrated.

--all
include brew's auto-installed dependencies too
--write-hopfile
also record the migrated set in a hopfile
--prefix DIR
Homebrew prefix (default: auto-detect)
Full walkthrough: the migration guide.
initProjects
hop init [flags]

Create a hopfile: a declarative list of the tools a project needs. Commit it alongside your code and anyone can reproduce your toolchain with a single hop sync.

--from-installed
seed the file from currently installed packages
-f, --force
overwrite an existing hopfile
addProjects
hop add <package>...

Install packages and add them to this project's hopfile — exactly like hop install, except the hopfile is updated so the choice is recorded for everyone else working on the project.

-f, --force
reinstall even if already at this version
syncProjects
hop sync [flags]

Install, upgrade and remove packages until this machine matches the hopfile. With a hop.lock present, sync installs the exact versions it pins, so two machines end up byte-identical.

--prune
remove packages not in the hopfile (default from the file)
--locked
require an up-to-date hop.lock; do not re-resolve — for CI
lockProjects
hop lock

Write hop.lock, pinning the resolved versions for every package the hopfile names.

History

Every install, upgrade or removal creates a new, numbered generation. Nothing is ever deleted by these two commands — Architecture covers the mechanism in full.

generationsaliases: gens, historyHistory
hop generations

List every generation of the installed set. Old generations remain on disk, so any of them can be restored instantly with hop rollback <n>.

rollbackalias: undoHistory
hop rollback [generation]

Restore a previous generation. With no argument, rollback goes to the generation before the active one. Because every version is still in the store, this is a single symlink swap — microseconds, no download, however large the change. Rolling back is itself just an activation, so running it again returns you to where you were.

aliasHistory
hop alias <package> [version]

Hot-swap one tool to a version you've had installed before, without touching the rest of the active set. With no version, lists what that package has been at — every version hop has installed for you stays in the store, so switching to one is a symlink swap: instant, no download. This only reaches versions installed on this machine before; the recipe index tracks the current release only.

Maintenance

Housekeeping: reclaiming disk, checking the installation is healthy, and keeping the index and hop itself current.

gcaliases: prune, cleanMaintenance
hop gc [flags]

Delete store paths and cached downloads that no generation needs — a real mark-and-sweep, not "delete anything old." By default every generation is kept, so only genuinely unreachable data is removed. The active generation is never deleted. Coming from Homebrew, hop prune and hop clean are the same command under a different name — reach for whichever one your fingers already know.

--keep N
also discard all but the newest N generations
doctorMaintenance
hop doctor

Check the installation for problems: prefix permissions, whether hop's bin directory is on PATH, and whether the active generation is intact.

verifyMaintenance
hop verify

Check that installed packages are intact on disk — a deeper check than doctor, walking the actual store contents.

updateMaintenance
hop update

Refresh the recipe index from HOP_INDEX_URL — one conditional HTTP request, usually a 304, done in milliseconds. With no HOP_INDEX_URL set, hop uses the index built into the binary and this command has nothing to do.

This refreshes the recipe index — the catalog of what hop can install. It has nothing to do with hop's own version; see self-update below.
self-updatealias: self-upgradeMaintenance
hop self-update [flags]

Check GitHub for hop's latest published release and, if it's newer than the version currently running, download it, verify its checksum against the release's own SHA256SUMS, and replace the running binary in place. The replacement is atomic: the new binary is written alongside the old one and renamed over it, so an interrupted self-update never leaves a half-written executable, and anything already running keeps working off the old file until it exits.

--check
only report whether a newer version exists; do not install it
In plain terms Every ordinary hop command also quietly checks for a newer release in the background — at most once a day, never slower because of it, never installing anything by itself — and prints a one-line hint if it finds one. hop self-update is what you run when you see that hint.
uninstall-selfMaintenance
hop uninstall-self

Remove hop completely: every generation, every store path, the download cache, and finally hop's own binary. The one command in hop that isn't reversible — there's no hop rollback afterward, because there's no hop left to run it. A GUI app gets one courtesy step first: its symlink in ~/Applications is removed, so nothing is left pointing at a store that's about to disappear.

hop never touches your shell configuration, so this doesn't either — if you added eval "$(hop shellenv)" to ~/.zshrc or similar, this prints the line to remove yourself, the same way migrate prints brew uninstall commands rather than running them.

Shell

Getting hop itself onto your PATH, and shell integration.

versionalias: --versionShell
hop version

Show hop's own version. hop -V and hop --version also work, before any command is even resolved.

shellenvShell
eval "$(hop shellenv)"

Print the shell commands that put hop on PATH — prepends <root>/current/bin. Because that path goes through the "current" symlink, it never changes as you install, upgrade or roll back; your shell config is written once and stays correct.

completionsShell
hop completions <bash|zsh|fish>

Print a shell completion script for the named shell.

Global flags

Every command above accepts all of these:

-h, --help
show help for this command
-y, --yes
assume yes; do not prompt
-n, --dry-run
show what would happen, change nothing
--json
emit machine-readable JSON
-q, --quiet
suppress non-error output
-v, --verbose
show extra detail
--no-color
disable colour output
-j, --jobs N
parallel downloads (default: CPU count, max 8)
--root DIR
hop prefix (default: $HOP_ROOT or ~/.hop)