Getting started with doctor

install doctor, check that it's watching, and prove it heals a killed daemon. it installs with the apiary stack, no separate setup needed.

doctor installs automatically with the apiary stack and registers itself as an os service. run doctor status to see daemon health, or kill a daemon on purpose and watch doctor bring it back within about 30 seconds.

Install doctor, check it is watching, and prove it heals. Written for anyone, not just the person who builds the stack.

#It installs with the stack

The apiary installer sets doctor up automatically, including registering it with your operating system so it survives crashes and reboots.

macOS or Linux:

curl -fsSL https://get.theapiary.sh | sh

Windows (PowerShell):

irm https://get.theapiary.sh/install.ps1 | iex

Prefer to be your own on-call? Add --no-doctor to skip it.

#Where to look first

Run doctor status in your terminal. This shows daemon health, service state, versions, when it last healed something, and your opt-out flags. If you only remember one command, remember this one.

doctor status

#Prove it heals

Kill a daemon on purpose, wait about half a minute, and check again. It comes back on its own, with a fresh note of the last repair.

pkill -f honeycomb
sleep 30
doctor status

#The status page

doctor serves a human-readable status page on your machine at http://127.0.0.1:3852. It works even when everything else is down, which is exactly when you need it. The same data is available as a machine-readable feed at /status.json.

#Install or update it on its own

You don't have to reinstall the whole stack to get doctor. Install or update it by itself, then register the OS service:

npm install -g @legioncodeinc/doctor
doctor install-service

doctor registers per user, so there's no sudo prompt on macOS or Linux and no admin prompt on Windows.

#Turning it off

doctor uninstall-service

This removes the OS registration cleanly. The rest of the stack keeps running; you're just back to being your own on-call.

#What next

#Common questions

Do I need to install doctor separately? No. It installs with the apiary stack by default. Add --no-doctor at install time if you want to skip it and be your own on-call.

How do I know it's actually watching? Run doctor status. It shows daemon health, service state, and when doctor last healed something.

How do I prove it heals something? Kill a daemon on purpose (pkill -f honeycomb), wait about 30 seconds, and run doctor status again. It should show the daemon healthy with a fresh heal timestamp.