Using an LLM to Automate the Process of Archiving New macOS App Icons
Whenever a new version of macOS drops, I find myself archiving the new app icons for my macOS icon gallery.
In the past, the work to do this was a bit tedious.
First, Iâd find the app in the âApplicationsâ folder (or elsewhere on the Mac), right click and choose âGet Infoâ:
Right-click the app icon in the Get Info pane and choose âCopyâ:
Open the Preview app and go âFile -> New from Clipboardâ:
This gets me the app icon file with a variety of sizes (the 1024-pixel version is the one I want). From here, I go âFile -> ExportâŚâ, choose âPNGâ, and name the file as the app name, lowercased, hyphenated â e.g. âapp-store.pngâ (I do this for automation purposes not relevant here).
Doing that for every Apple-supplied app in the OS can get tiring. Itâs often upwards of 75+ icons.
âThis seems like the perfect task for an LLM,â I thought. So I hastily wrote a prompt to see if it could do it.
And it did â sort of, after a little coaching.
On the first try it found an appâs .icns file, grabbed the 256Ă256 version, upscaled it to 1024Ă1024, and saved it.
So I scolded it, âNo, no. NEVER upscale an image. Always find the biggest one. I can get the 1024 version myself from the âGet infoâ pane, so surely you can find that size somewhere.â
It came back dutifully, having found the right image, and said it would never upscale again.
Satisfied it could do what I wanted, I worked on creating a list of all the apps whose artwork I wanted to archive. Then I gave that list to the LLM and said, âDo your thing.â
And it worked! It was kind of wonderful. Saved me a ton of time.
76 app icons found, extracted, and saved in much less time than it wouldâve taken me to do this âby handâ.