[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-107762":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":20,"rankGlobal":9,"rankLanguage":9,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":22,"hasPages":22,"topics":24,"createdAt":9,"pushedAt":25,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":15,"starSnapshotCount":15,"syncStatus":29,"lastSyncTime":30,"discoverSource":31},107762,"rejig","rejig-app\u002Frejig","rejig-app","Mac app for arranging your iPhone Home Screen over Wi-Fi or USB, with a change list, backups and readback.",null,"Python",149,12,1,5,0,3,9,88,10,62.64,"MIT License",false,"main",[],"2026-11-01 07:24:16","2026-11-23 17:54:30","# Rejig\n\nRejig is a Mac app for arranging the real Home Screen on your iPhone: pages, the dock,\nfolders, existing widgets, and which apps live only in the App Library. Nothing is\ninstalled on the phone. Rejig lists every change before you apply it, saves a backup\nfirst, and reads the phone back afterwards to check the result.\n\nIt works over **Wi-Fi** after a one-time USB pairing, so day to day you don't need a cable.\nUSB works too, and **Demo** mode lets you try everything on a pretend phone.\n\n![Rejig in Demo mode: App Library list, pretend iPhone and an empty change list](docs\u002Fscreenshots\u002Fdemo-library.png)\n\n![Rejig in Demo mode with three pending changes listed before Apply](docs\u002Fscreenshots\u002Fdemo-changes.png)\n\n*Screenshots use Demo mode: invented apps on a pretend phone, no real device.*\n\n## What it does\n\n- Reads the Home Screen layout from your iPhone over Wi-Fi or USB.\n- Lets you drag apps, folders and existing widgets; add and remove pages; create folders;\n  move apps to and from the App Library.\n- Lists every change (moved, added, sent to the App Library) before you press **Apply**.\n- Saves a layout backup before each write, then reads the phone again to confirm it holds\n  what was written. If that check fails, it writes the backup back and checks again.\n- Restores an earlier backup (**Backups**) after a confirmation that shows its date and\n  item counts, then reads the phone back to check it. A restore does not list every item.\n- Writes a backup or an edited layout only to the iPhone it came from. A different iPhone,\n  or one whose identity is unknown, gets nothing.\n- Imports and exports layouts as files.\n\n## Requirements\n\n- A Mac with Apple silicon (M1 or later) running macOS 15 or later.\n- Xcode Command Line Tools: `xcode-select --install`\n- [Homebrew](https:\u002F\u002Fbrew.sh) and Python 3.13: `brew install python@3.13`\n- An internet connection during installation (it downloads about 120 Python packages).\n- An iPhone on iOS 17 or later for Wi-Fi mode.\n\n## Install\n\n1. Get the source:\n\n   ```bash\n   git clone https:\u002F\u002Fgithub.com\u002Frejig-app\u002Frejig.git\n   cd rejig\n   ```\n\n2. Build and install the app and its Python runtime (a few minutes, mostly downloads):\n\n   ```bash\n   bash scripts\u002Finstall.sh\n   ```\n\n   This builds `build\u002FRejig.app`, puts the app in `~\u002FApplications\u002FRejig.app` and its\n   runtime in `~\u002FLibrary\u002FApplication Support\u002FRejig\u002F.venv`. Dependencies are installed at\n   the exact versions, with hash checks, listed in `requirements.lock` and\n   `requirements-mcp.lock` (the MCP SDK for [AI clients](#connect-an-ai-client)).\n\n3. Open it:\n\n   ```bash\n   open ~\u002FApplications\u002FRejig.app\n   ```\n\n4. Choose **Demo** in the top bar to try it without a phone.\n\nThe app is built and signed ad hoc on your own Mac; it is not notarized. It needs both\nthe app and the runtime folder. If a Homebrew upgrade removes Python 3.13, run\n`bash scripts\u002Finstall.sh` again.\n\n## Update\n\nQuit Rejig, then from the `rejig` folder:\n\n```bash\ngit pull\nbash scripts\u002Finstall.sh\n```\n\nThe installer rebuilds the app and reinstalls the engine with the current patches. Your\nlayouts, backups and Wi-Fi pairing stay where they are.\n\n## Uninstall\n\nQuit Rejig. Removing it does not change anything on your iPhone.\n\n1. Remove the app and its runtime. This keeps your layouts and backups:\n\n   ```bash\n   rm -rf ~\u002FApplications\u002FRejig.app \"$HOME\u002FLibrary\u002FApplication Support\u002FRejig\u002F.venv\"\n   ```\n\n2. To also delete your saved layouts, backups, icon cache and logs, remove the rest of\n   `~\u002FLibrary\u002FApplication Support\u002FRejig`. The backups there are the only way to go back\n   to an earlier layout: copy the `.plist` files in `data\u002Fbackups\u002F` somewhere else first\n   if you want to keep them.\n3. The Wi-Fi pairing is the phone's `remote_\u003CUDID>.plist` file in pymobiledevice3's\n   folder (see [Your data](#your-data)). Other pymobiledevice3 tools use that folder too;\n   delete only that file if you no longer want this Mac paired.\n4. Optional: the iPhone keeps trusting this Mac until you reset that on the phone:\n   **Settings > General > Transfer or Reset iPhone > Reset > Reset Location & Privacy**.\n   This resets trust for every computer and also resets location and privacy settings\n   for your apps. Removing Rejig does not require it.\n\n## Connect your iPhone\n\n**USB:** plug the iPhone in, unlock it, tap **Trust This Computer**, choose **USB**, then\n**Read from phone**.\n\n**Wi-Fi (one-time setup):**\n\n1. Connect the iPhone to this Mac with USB. Unlock it and accept **Trust This Computer**.\n2. Click **Set Up Wi-Fi…**, then **Pair Connected iPhone**. This turns on wireless device\n   connections and saves a pairing on the Mac.\n3. Unplug the cable. Keep the phone unlocked and on the same network as the Mac.\n4. Choose **Wi-Fi**, then **Read from phone**. Allow local network access if macOS asks.\n\nWi-Fi mode uses the engine's userspace RemotePairing tunnel. It needs neither root nor\nDeveloper Mode. Use one iPhone at a time: the engine refuses to guess when several phones\nare connected or paired.\n\n## Connect an AI client\n\nRejig includes an MCP server, so Claude Code, Codex or Claude Desktop can read your Home\nScreen, plan a new arrangement with you, and apply it once you approve. It talks to the\nRejig app on this Mac (the app opens if it is not running) and never to the phone directly.\nChoose **Demo** in the app first to try it on the pretend phone.\n\nThe server command is the runtime's Python with `-m rejig_mcp`. Add it to your client:\n\n**Claude Code:**\n\n```bash\nclaude mcp add --scope user rejig -- \"$HOME\u002FLibrary\u002FApplication Support\u002FRejig\u002F.venv\u002Fbin\u002Fpython3\" -m rejig_mcp\n```\n\nCheck it with `claude mcp list` (rejig shows as connected) or `\u002Fmcp` in a session.\n\n**Codex:**\n\n```bash\ncodex mcp add rejig -- \"$HOME\u002FLibrary\u002FApplication Support\u002FRejig\u002F.venv\u002Fbin\u002Fpython3\" -m rejig_mcp\n```\n\nThen give it time to wait for your approval and for the phone: in `~\u002F.codex\u002Fconfig.toml`,\nunder the `[mcp_servers.rejig]` table this command created, add `tool_timeout_sec = 600`.\nCheck it with `codex mcp list` or `\u002Fmcp` in the Codex TUI.\n\n**Claude Desktop:** open `~\u002FLibrary\u002FApplication Support\u002FClaude\u002Fclaude_desktop_config.json`\n(create it if needed) and add this; `sh` finds the runtime in your home folder, so it\npastes as is:\n\n```json\n{\n  \"mcpServers\": {\n    \"rejig\": {\n      \"command\": \"\u002Fbin\u002Fsh\",\n      \"args\": [\"-c\", \"exec \\\"$HOME\u002FLibrary\u002FApplication Support\u002FRejig\u002F.venv\u002Fbin\u002Fpython3\\\" -m rejig_mcp\"]\n    }\n  }\n}\n```\n\nIf the file already has an `mcpServers` block, add the `\"rejig\"` entry inside it.\n\nQuit and reopen Claude Desktop; rejig then appears in the chat's list of tools.\n\n**Try it:**\n\n- \"Use Rejig to read my iPhone Home Screen. What is on page 1?\"\n- \"Put my finance apps in a folder called Money on page 2 and show me the plan.\"\n- \"Apply that plan.\"\n- \"Here are my Screen Time minutes for last week: … Put the apps I use most on page 1.\"\n- \"Restore the backup from before that change.\"\n\n**What needs your approval:** reading and drafting never touch the phone. Only applying\nwrites, and only after you approve the exact numbered change list: in the chat, when the\nclient can show a form (Claude Code can), or otherwise in Rejig's own Approve window on\nthe Mac running Rejig, where you click Approve. Rejig always uses the window for Codex:\nin testing with Codex CLI 0.166.0, its TUI cancelled form requests without showing them.\nSo an unattended `codex exec` run cannot write until someone clicks the window. You can\nalways ask for the window (\"approve it in the Rejig window\").\nEach write saves a backup first and reads the phone back. Nothing is ever deleted or\nuninstalled, and apps that live only in the App Library stay there unless you ask.\n\nKnow where that approval stops. Any program running as you on this Mac can do what you can,\nincluding answering a form or clicking a window, so the approval keeps a model from acting\non its own; it is not a lock against other software. Don't add Claude Code hooks that\nanswer MCP forms automatically.\n\nWhile an AI client is reading or writing, the Rejig window waits for it to finish before\nyou can switch connection or quit; if its editor stops answering, Rejig asks before letting\nyou leave, since a write may still be running. If the window has unsaved edits, the client is told so\nand does nothing until you apply, export or discard them.\n\n## Your data\n\n- Layouts and backups: `~\u002FLibrary\u002FApplication Support\u002FRejig\u002Fdata\u002F`\n- Cached app icons and wallpaper: `~\u002FLibrary\u002FApplication Support\u002FRejig\u002Fcache\u002F`\n- AI client plans and their outcomes: `~\u002FLibrary\u002FApplication Support\u002FRejig\u002Fmcp\u002F`\n- Connection errors: `~\u002FLibrary\u002FApplication Support\u002FRejig\u002Fbackend.log`\n- Wi-Fi pairing output: `~\u002FLibrary\u002FApplication Support\u002FRejig\u002Fpairing.log`\n- Wi-Fi pairing credentials: pymobiledevice3's folder, `~\u002F.local\u002Fshare\u002Fpymobiledevice3\u002F`\n  (or `~\u002F.pymobiledevice3\u002F` if an older install created it). Treat these like passwords\n  and don't share them.\n\nRejig itself sends nothing off your Mac. The editor inside the window listens only on\n`127.0.0.1`, with a fresh session token and request checks; it is not reachable from your\nnetwork. If you connect an AI client, what the MCP server returns (your layout, app names,\nany icons it asks for) goes to that client, and on to its model provider if the model runs\nin the cloud.\n\nDon't disconnect or force-quit while Rejig is applying or restoring. If the check and the\nrollback both fail, Rejig says so and keeps the backup: reconnect and use **Backups**.\nA layout backup is not a full iPhone backup.\n\n## Checks\n\n```bash\nbuild\u002FRejig.app\u002FContents\u002FMacOS\u002FRejig --self-test\nbuild\u002FRejig.app\u002FContents\u002FMacOS\u002FRejig --smoke-test\n\"$HOME\u002FLibrary\u002FApplication Support\u002FRejig\u002F.venv\u002Fbin\u002Fpython3\" -m unittest discover -s tests -v\n```\n\nThe smoke test opens the real window on a pretend phone, adds and undoes a page, reorders\nicons, opens the Apply preview, applies, checks the backup and readback, and restores the\nbackup. It never contacts a real phone. It saves `demo-preview.png` in the app's data folder.\n\nThe unit tests cover the Wi-Fi pairing proof format, the Wi-Fi reconnect patch\n(recovery, same-phone check, USB failure, cancellation), the device identity patch\n(Restore and Apply refuse another iPhone and still write to the right one) and the MCP\nserver. The MCP tests start a real Demo editor and drive the server with the MCP SDK's own\nclient, over both the older approval protocol and the 2026-07-28 one: approve, decline,\ncancel, stale and changed plans, unsaved edits, two clients applying one plan, a lost\nanswer to a write, restores and recovery after a restart.\n\n## Tested on\n\n- Macs: Apple silicon on macOS 26.\n- iPhone: an iPhone 16 Pro on iOS 27.0.1, over USB and Wi-Fi: layout reads, writes with\n  readback, and a backup restore; a gap placed in Rejig and a configured widget's setting,\n  checked on screen.\n- AI clients on Demo: Claude Code 2.1.316 (approve, decline and cancel in the chat form);\n  Claude Desktop 4.4212.0 (an apply, approved in Rejig's window); Codex CLI 0.149.0's TUI\n  (an apply and a restore, approved in Rejig's window); Codex CLI 0.166.0's TUI and\n  `--yolo` (sent to Rejig's window; closing it wrote nothing). On that iPhone over Wi-Fi\n  and over USB: an MCP write and restore, approved in Rejig's window.\n- iPhone: an iPhone 15 Pro on iOS 26.7.1, over USB: MCP writes with readback, with a\n  widget stack on the Home Screen.\n\nThat is two phones. Apple can change the private Home Screen service in any iOS release,\nso try Demo first and keep the backup Rejig makes. Intel Macs, Windows and Linux are not\nsupported.\n\n## Limits\n\n- The installer applies eight patches to the engine. `patches\u002Fwifi-reconnect.patch`: a\n  layout write can close the Wi-Fi tunnel, and the patch reopens it for the same phone\n  only. `patches\u002Fdevice-identity.patch`: Restore and Apply check that the connected phone\n  is the one the backup or layout came from before writing.\n  `patches\u002Foffloaded-apps.patch`: the app list includes offloaded apps, so a write keeps\n  the ones that are only in the App Library there instead of putting them back on a page.\n  `patches\u002Fmcp-companion.patch`: a write planned against one read is refused once the\n  phone has been read again or changed, and a restore is refused if its backup changed\n  after you approved it. `patches\u002Fgaps-notice.patch`: the Apply and Backups windows say that\n  empty spaces between icons may be lost. `patches\u002Fpinned-gaps.patch`: a layout page can\n  pin apps and web clips to grid cells, and the write sends those pins so the empty spaces\n  around them stay (method from [homescreen-mcp](https:\u002F\u002Fgithub.com\u002Fkats1123\u002Fhomescreen-mcp),\n  MIT). `patches\u002Fwidget-ids.patch`: a configured widget is written back\n  with the element id its settings are stored under (same source). On the iPhone 16 Pro a\n  small Weather widget kept its location through three applies, though iOS reads it back\n  under the setting's alias without echoing the `uniqueIdentifier` field. `patches\u002Fwritten-pins.patch`: the editor places an app on an\n  empty cell, Rejig remembers the gaps it placed for each iPhone, and every Apply, rollback\n  and Restore sends them back.\n- The MCP server arranges the layout only. It does not uninstall apps, create widgets or\n  read Screen Time; give it usage numbers yourself if you want it to sort by them.\n- Rejig moves existing widgets and stacks; it cannot create new widgets.\n- Empty spaces made on the iPhone itself close on the first Apply or Restore, on any page,\n  including pages you did not change. iOS gives Rejig each page as an ordered list with no\n  cell positions, so Rejig cannot see them. On the iPhone 15 Pro, a gap on page 1 closed\n  in each of two dock-only applies that did not touch page 1. The read-back check cannot\n  see gaps, so it still passes.\n- Empty spaces you place in Rejig (drop an app on an empty cell, \"Place in a spot...\", or\n  an AI client's move to a cell) are remembered and sent back with every write. iOS cannot\n  confirm where icons end up, so the read-back check cannot see them. On the iPhone 16 Pro, a\n  gap Rejig placed on page 3 was on screen after its Apply and stayed through a dock-only\n  Apply. Restoring a backup that holds gaps, and restarting the phone, are not yet checked\n  on a phone. A page you change on the iPhone loses its remembered gaps. Backups made before\n  this version and layout files do not carry them, and `optimize_draft` re-flows the\n  pages without them.\n- Widgets: on the iPhone 15 Pro, one small widget stack read back with the same\n  size, widgets and top widget after two dock-only applies. Where it sat on screen and\n  each widget's own settings were not checked. On the iPhone 16 Pro, one small Weather\n  widget set to a city kept that city through three applies. Settings inside stacks are not\n  checked, so the editor still warns that widgets where you chose what they show may go back\n  to their default choice.\n- Demo's app icons are SVG, so the MCP server converts them to PNG with macOS's `sips`\n  before sending them to an AI client. That was checked on macOS 26 only; where the\n  conversion fails, those icons come back listed as missing.\n- `srptools` stays at 1.0.1: version 2 reads pymobiledevice3's hex-encoded pairing proof\n  as raw bytes and Wi-Fi pairing fails. Proof checking stays on.\n\n## Credits\n\nRejig is by keyclipse. The Mac window, connection controls, installer, MCP server and the\nengine patches are Rejig's own work, under the MIT license. The MCP server uses the\n[MCP Python SDK](https:\u002F\u002Fgithub.com\u002Fmodelcontextprotocol\u002Fpython-sdk) (MIT).\n\nReading and writing the layout, the editor you see in the window and Demo mode come from\n[ios-homescreen](https:\u002F\u002Fgithub.com\u002FYakupEmreYerli\u002Fios-homescreen) by Yakup Emre Yerli\n(MIT), pinned at `97649547dbc4`. ios-homescreen talks to the iPhone through\n[pymobiledevice3](https:\u002F\u002Fgithub.com\u002Fdoronz88\u002Fpymobiledevice3) by doronz88 and\ncontributors (GPL-3.0-or-later), which runs inside the engine's Python process. Rejig\nstarts that process and talks to it over a loopback connection. Wi-Fi pairing uses\n[srptools](https:\u002F\u002Fgithub.com\u002Fidlesign\u002Fsrptools) (BSD-3-Clause). See\n[THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).\n\nRejig does not implement Apple's device protocols itself. It is not affiliated with or\nendorsed by Apple, ios-homescreen or pymobiledevice3. iPhone is a trademark of Apple Inc.\n\n## License\n\nMIT. See [LICENSE](LICENSE).\n","Rejig 是一款运行在 Apple Silicon Mac 上的 macOS 应用，用于远程管理 iPhone 主屏幕布局。它通过 Wi-Fi（需首次 USB 配对）或直接 USB 连接读取、编辑并写入主屏幕结构，支持页面增删、App 图标与文件夹拖拽、小部件调整、App 在主屏与 App Library 间迁移等操作；所有变更均预览列表化，执行前自动备份，并双重校验写入结果。项目不向 iPhone 安装任何组件，强调安全性和可逆性，适用于需要精细化、可审计地组织 iOS 设备界面的个人用户或批量设备管理者。",2,"2026-11-24 04:32:52","CREATED_QUERY"]