'gh: command not found' after cleaning ~/.local/bin, and omarchy update never brings it back
#13708 (open) matches the reproduction and the behaviour of migration 1784909971.sh, read on 4.0.4-1. The cause overstates one point. That migration is not the only thing that rebuilds wrappers. /usr/bin/omarchy-refresh-applications on 4.0.4-1 runs bash "$OMARCHY_PATH/install/user/mise.sh", which calls omarchy-mise-install for every default tool and so recreates the whole set from nothing. Migration 1786183928.sh calls it, but a migration runs once, so omarchy update does not repeat it. #13708's line that this 'does not help' is true only of update, and the issue missed the command. The symptom also needs a qualifier. A tool mise already installed through mise use -g stays reachable after the wrapper is deleted: an activated shell has its install dir on PATH (this desktop terminal's PATH lists ~/.local/share/mise/installs/gh/... first) and the shims dir also resolves it. So command not found hits tools never run before, and shells or apps without mise on PATH. The verify step's command -v gh # ~/.local/bin/gh is therefore wrong in an activated shell and was replaced. The cleanup grep ^mise use -g misses the Hermes wrapper (its mise line is indented, written by omarchy-install-hermes-cli) and was extended. mise.sh contents confirmed: it sets upgrade.auto_prune false and runs omarchy-install-hermes-cli. cursor-agent and muse are behind omarchy-cmd-missing.
Symptom
After emptying or pruning ~/.local/bin, commands Omarchy promised would install themselves on first run (gh, claude, codex, opencode, copilot, pi, grok and others) now give command not found. Running omarchy update does not restore them, and nothing logs an error. A tool that mise had already installed may still run in a terminal, because mise puts its install directory or shim on PATH, so the loss shows first for tools never run before and in scripts or apps that do not have mise on PATH.
Cause
Omarchy 4 does not ship those tools as packages. At install time /usr/share/omarchy/install/user/mise.sh runs omarchy-mise-install for each one, which writes a lazy-install wrapper into ~/.local/bin. The migration that regenerates wrappers, /usr/share/omarchy/migrations/1784909971.sh, finds the packages to rebuild by iterating the wrappers that already exist in ~/.local/bin, so with the directory empty it recreates nothing. omarchy-refresh-applications does rebuild the full set, because it runs install/user/mise.sh, but omarchy update only calls it through a migration that has already run once. Reported on 4.0.4 as upstream #13708.
Fix
Recreate only the wrappers you want, with the same commands the installer used. List them:
grep 'omarchy-mise-install ' /usr/share/omarchy/install/user/mise.sh
Then run the lines for the tools you need, for example:
omarchy-mise-install gh
omarchy-mise-install claude
omarchy-mise-install codex
omarchy-mise-install opencode
omarchy-mise-install npm:@xai-official/grok grok
The Hermes wrapper has its own installer: omarchy-install-hermes-cli. Each mise wrapper installs its tool through mise the first time it runs.
To restore the whole default set in one step, run this from a terminal on the desktop, where OMARCHY_PATH is set:
omarchy-refresh-applications
It also recreates wrappers you deleted on purpose, overwrites any wrapper you edited, runs the Hermes CLI installer, sets mise's upgrade.auto_prune to false, and copies Omarchy's .desktop files over any same-named ones in ~/.local/share/applications.
In future, when cleaning ~/.local/bin, keep the files these print:
grep -l '^mise use -g' ~/.local/bin/*
grep -l 'Written by omarchy-install-hermes-cli' ~/.local/bin/*
Verify
ls -l ~/.local/bin/gh # the wrapper exists again
~/.local/bin/gh --version # installs gh through mise on first run, then prints the version