A command-line tool for macOS
Your Home Screen
is a junk drawer.
Let's fix that.
organize-my-iphone is a command-line tool for your Mac. Plug in your iPhone, and a small crew of critters reads your apps, sorts them into groups with a model that runs on your Mac, and lays out twelve tidier Home Screens for you to try. Nothing on the phone moves until you say so. Pinky promise. Backed up, too.
Why does this exist?
A short comic in four panels. Spoiler: it has a happy ending.
-
1
GULP!
Apps pile up
Every new app lands in the next empty spot. A few years later you have page after page in the order you happened to install things, plus a folder called "Stuff 2".
-
2
SWIPE…
Finding things is a hunt
You swipe through pages looking for that one app, give up, and type its name into search. Again. Your thumb deserves better.
-
3
WOBBLE…
Tidying by hand is a chore
The iPhone has no "sort my Home Screen" button. Tidying means wiggly icons and dragging them one at a time, across pages, for a long, long time.
-
4
TA-DA!
So the crew does it for you
One command on your Mac sorts every app at once and shows you the results first. You pick the one you like. If you regret it, one more command puts everything back.
What you get: apps grouped the way you think, found in fewer swipes. What it costs: a cable and a couple of minutes. What it risks: very little, because it saves a backup before every change and won't write anything without asking.
Meet the crew
Six critters, six jobs. Each step saves its work on your Mac, so any one can run again on its own. The tour below shows each one in action.
-
Step 1 ·
scanScoot
Reads your apps and Home Screen over the cable, and backs it up.
-
Step 2 ·
enrichPagelet
Looks each app up in the App Store, so sorting has more to go on.
-
Step 3 ·
classifySortle
Puts every app in a group, with a model that runs on your Mac.
-
Step 4 ·
planGridley
Builds twelve layouts that all fit within iOS limits.
-
Step 5 ·
previewLumi
Shows every layout next to your current one, before anything changes.
-
Only if you ask ·
apply·restoreRewindle
Writes the layout you pick, after a backup and a yes. Puts it back on request.
A tour of the commands
Scroll slowly. The terminal follows along.
-
doctor· reads only"Is everybody here?"
Checks for Apple Configurator's
cfgutil, a connected and trusting iPhone, and a local model. Run it first. It changes nothing, it just takes attendance. -
run· reads onlyThe whole show in one go
Runs scan, enrich, classify, plan and preview back to back, then opens the preview page with
--open. This is the one most people need. Add--offlineto skip the App Store lookup. -
scan· reads onlyScoot takes a census
Reads every app and your current layout, and saves a backup of that layout straight away. Belt, meet braces.
-
enrich· no phone neededPagelet does the reading
Looks up each app's App Store genre and description, so the sorting has more to go on. It sends Apple only the app IDs. Skip it with
--offline.Add
--icon-colors-from-storeand it also fetches each app's icon to find its color for the Rainbow layout. See the color wheel. -
classify· no phone neededSortle files everything
Rules handle the sure things. A model on your Mac (Ollama, or Apple's on-device model) decides the rest. No model? Rules do it all. Want your own groups? Pass a
--taxonomyfile. -
plan· no phone neededGridley draws the floor plans
Builds each layout and checks it against the iOS limits. A plan that would drop an icon, show one twice, or overflow a page is refused, not "fixed later".
-
preview· no phone neededLumi lights up the options
Writes a web page with each proposal next to your current layout. Look, compare, change your mind as often as you like. It's free to window-shop.
-
apply --dry-run· reads onlyThe rehearsal
Shows exactly how many icons would move, without writing anything. Always rehearse first.
-
apply· writesThe big moment
Rereads the phone, checks the plan still fits, shows the size of the change, saves a backup, and asks you to confirm. Only then does it write.
-
restore· writesRewindle's favorite trick
Puts a backed-up layout back, after asking. Regret has never been so cheap.
Try a layout
Twelve layouts, one tidy phone at a time. Pick one to see how it would arrange a sample phone, with its own critter to explain it. Your phone gets the same treatment with your real apps.
Start here
Works right away
Better with your data
These read an optional --usage, --recent or icon-colors file. Without one, they make a sensible guess and say so.
Every layout keeps the dock as it is and puts every icon on the screen exactly once. Tap a folder to open it. Swipe or use the arrows to change pages.
Rainbelle's color wheel
The Rainbow layout needs to know what color each icon is. Your phone won't say, so Rainbelle finds out another way, and you get the final word.
- Built in: Apple's own apps already have colors in a table inside the tool.
- From the App Store: add
--icon-colors-from-storetoenrichorrun. It downloads each app's icon from Apple's image server, shrinks it in memory, and finds its main color. This is opt-in and skipped with--offline. - Your fixes:
previewalso writescolors.html, a wheel like this one. Click the right slice for any app that landed in the wrong one, save, and pass the file with--icon-colors. Your file always wins.
Safe by design
- Only
applyandrestorewrite to the phone, and both ask you first. - Every scan and every apply saves your layout to
~/.organize-my-iphone/backups/. - A layout is refused if it would drop an icon, show one twice, or break an iOS limit.
- The dock is never rearranged.
- Web clips and anything the tool doesn't recognize are kept, not thrown away.
- Try
apply --dry-runfirst to see exactly what would move. Writing a layout goes through Apple'scfgutil, which can behave differently on different iOS versions, so keep your backups.
Private by default
- Your list of apps stays on your Mac, in
~/.organize-my-iphone. - The sorting model runs on your Mac. No cloud model is called.
- The App Store lookup sends app IDs (like
com.example.notes) to Apple, and nothing else. - Only if you add
--icon-colors-from-store, it also downloads app icons from Apple's image servers to find their colors. They're looked at in memory and not kept. --offlineskips both.- Your
--usage,--recentand--icon-colorsfiles are read on your Mac and never sent anywhere.
Get started
You need
- A Mac with macOS 15 or later
- Xcode 26 or later, to build. It includes Swift 6.2, so there's nothing else to install.
- Apple Configurator, which includes
cfgutil - An iPhone on a cable, unlocked, that trusts this Mac
- Optional: Ollama, or macOS 26 with Apple Intelligence on
Quit the Apple Configurator app before you scan. While it's open, it holds on to the phone.
Run it
# Get the code
git clone https://github.com/pacphi/organize-my-iphone.git
cd organize-my-iphone
# 1. Check your setup
swift run organize-my-iphone doctor
# 2. Scan, sort, plan and preview. Changes nothing.
swift run organize-my-iphone run --open
# 3. See what would move, then apply the one you like
swift run organize-my-iphone apply folder-board --dry-run
swift run organize-my-iphone apply folder-board
# Changed your mind?
swift run organize-my-iphone restore
No iPhone handy? make demo runs the whole thing against a pretend one.