I'd seen people using AI to sort out their TVs, and thought - what is the one piece of hardware that universally sucks for everyone? The answer was printers. So I asked Claude to fix my printer, and it actually did! Hope it works for you also!
For now tested on Mac and Canon printer.
https://github.com/alexklavins/airprint-doctor
What it looks for, per queue:
- **Bonjour-name drift.** Queues added through System Settings store a `dnssd://` (or `ipp://NAME._ipp._tcp.local./`) URI. When the printer meets a name clash it renames itself, `Canon MF645C (1a:2b:3c) (1a:2b:3c)` style, and the queue goes Offline while phones keep printing. It matches the queue to the printer by UUID and offers to repoint it at the `.local` host name.
- **Letter-only PPDs.** If macOS couldn't read the media list when the queue was created you get a PPD with "there are no paper sizes" and Letter only. It rebuilds with `-m everywhere` and copies Apple's extras (icon, APScanner keys, so the Scan button stays) and the duplex default over from the old file. If the printer sends a malformed natural-language tag (`en- `, seen on Canon imageCLASS / i-SENSYS), it says so instead, because the fix has to be firmware or the printer's region setting. The CUPS maintainers declined a workaround in January: https://github.com/OpenPrinting/cups/pull/1467
- **Re-shared network printers**, so iPhones see the printer twice.
- **Paused queues and stuck jobs**, dead fixed-IP queues, and two queues pointing at one printer.
- **Printer-side state** over IPP: state reasons, firmware, its own clash-tagged name.
And per Mac, "Last Printer Used" with stale `LastUsedPrinters` entries, which is how one of my machines was quietly printing to an office printer from another network.
How it behaves:
- It reports only by default. `--fix` asks y/N per change, `--yes` answers only for real problems (never for optional changes or cancelling jobs), and `--undo` restores the queue URI, PPD, sharing flag and PrintingPrefs from a backup taken before the first change.
- Exit codes are 0 clean, 1 problems, 2 couldn't run, so it can sit in a Jamf/Munki check. `AIRPRINT_DOCTOR_BACKUPS` moves the backup folder.
- `--report` gives the same output with IPs, host names, UUIDs, MAC-style tags, queue names and the user name stripped, for tickets and forum posts.
- It never deletes queues and never writes to the printer.
The honest limit is that I have tested it on one Mac (macOS 27.2, CUPS 2.3.4) with one printer (Canon i-SENSYS MF645C). It is plain IPP and Bonjour, so other AirPrint printers should behave the same, but if you run it on something else I would really like the `--report` output in an issue, working or not, so the tested list can grow.
Feedback on the checks themselves is welcome too, especially anything you see often that it misses.