Skip to content

Add omarchy doctor, a read-only health check of the Omarchy install - #21001

Open
photuris wants to merge 2 commits into
omacom:quattrofrom
photuris:feat/omarchy-doctor
Open

photuris wants to merge 2 commits into
omacom:quattrofrom
photuris:feat/omarchy-doctor

Conversation

@photuris

@photuris photuris commented Dec 1, 2026

Copy link
Copy Markdown

omarchy rollcall (#20107) answers "does this machine's hardware work". Nothing answers the same question for the Omarchy install itself. omarchy debug prints thousands of lines for someone else to read, and several common breakages give no sign until something fails later: a full /run/user/$UID makes every app launch fail with Invalid arguments (#13287), a shell that did not come back, migrations that never ran, a session still on the old path after omarchy dev link.

omarchy doctor is the software twin of rollcall and copies its shape: the same arguments ([--json] [--list] [check...]), the same three results, the same exit codes (0 nothing failed, 1 something failed, 2 usage error). The one addition is a hint under each failed check: the next command to run.

$ omarchy doctor
Omarchy doctor

  ✓ runtime-dir   2% used, stale shell logs: 11
  ✓ shell         answering
  ✓ notifications served by quickshell
  ✓ user-services none failed
  ✗ migrations    5 pending
      Run: omarchy migrate
  ✗ restarts      reboot required
      Reboot: omarchy system reboot
  ✓ omarchy-path  /mnt/omarchy (dev link)
  ✓ theme         ristretto

6 passed, 2 failed, 0 skipped
Check Fails when
runtime-dir $XDG_RUNTIME_DIR is 90% full or more. The detail also counts Quickshell log directories whose instance is gone (#13287, #20814).
shell omarchy-shell shell ping does not answer, or one display has more than one shell instance
notifications no server answers GetServerInformation, asked with --auto-start=no so the question starts nothing
user-services systemctl --user lists failed units
migrations omarchy-migrate --pending lists any
restarts a reboot-required or restart-*-required state marker is waiting
omarchy-path OMARCHY_PATH is unset, holds no Omarchy, or differs from /etc/omarchy.conf
theme the current theme directory is missing or empty, or the background link is broken

shell and notifications are skipped without a Wayland socket (SSH, a TTY).

It only reads. It needs no sudo, writes no file, starts no service, and every call to another program runs under timeout --kill-after. A full run took 212 ms in a QEMU guest. --json prints one line: {"version":1,"omarchy":"…","checks":[{"id","result","detail","hint"}]}.

Not in this PR

Testing

bash test/shell.d/doctor-test.sh    # 111 ok
./test/cli                          # 143 ok
./bin/omarchy commands --check      # Command metadata check passed (674 commands)

doctor-test.sh runs the real script against a fake home, runtime directory and /proc, with stubbed df, busctl, systemctl, quickshell and omarchy-shell, and the real omarchy-migrate. It asserts that a full run leaves the fake tree unchanged (paths, sizes, mtimes, link targets) and that sudo and pkexec are never called.

On a dev-linked QEMU guest, every result was compared with the same facts read directly in the same session (df, the by-pid links against /proc, omarchy-migrate --pending, the state markers, busctl, systemctl --user): all agreed. Not tested on aarch64 or with a really full runtime directory outside the hermetic test.

@greptile-apps

greptile-apps Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge; both previous findings are addressed.RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; both previous findings are addressed.

Summary

Adds omarchy doctor with eight install checks, next-step hints, and text or JSON output.

  • Omarchy doctor checks install health and points to a next step.

Reviews (2) · Last reviewed commit: "count shells from every checkout and ski..." · Reviewed by Greptile

Comment thread bin/omarchy-doctor Resolved
Comment thread bin/omarchy-doctor Resolved
@chessing234

Copy link
Copy Markdown
Contributor

thanks. omarchy doctor is still a read-only health check. it counts shells from every checkout and skips migrations when the helper fails, in #21234. Please close this PR as superseded by #21234.

@omarchybot omarchybot added the enhancement New feature or request label Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants