iMessage Organizer
Clean up Messages.app on macOS.
Requirements
- macOS Messages.app with iCloud Messages enabled.
imsgCLI —brew install steipete/tap/imsg(repo). Read iMessage history via SQLite, send messages, manage conversations.- Full Disk Access for the terminal so
imsgcan read~/Library/Messages/chat.db. - AppleScript automation for some actions where
imsgdoesn't cover the action.
Step 1 — Ask the User First
1. Scope — all conversations, or filter by date (e.g. "last 6 months only")?
2. Conversation classification — keep / archive / mute / delete?
3. Group chats — same treatment, or separate rules?
4. Attachment cleanup — purge old large attachments to free disk?
5. Aggressiveness — dry-run / archive-only / archive + delete-old-spam (verification codes, OTPs).
Steps (TBD)
- Inventory — read
chat.db(read-only) for conversation list, last-message-date, message counts. - Classify — active (msg in last 30 days) / dormant / spam (one-shot OTP senders).
- Plan — proposed archive/mute/delete list.
- Approve — batch by category.
- Apply — Messages.app supports limited bulk operations via AppleScript; some actions (delete conversation) are manual.
- Verify — final state check.
Surface-specific notes
- Bulk delete of conversations isn't well-supported via AppleScript — many actions require manual UI driving (or
cliclick). - iMessage attachments live in
~/Library/Messages/Attachments/and can hog disk — separate cleanup target. - iCloud Messages: actions sync to all devices.
See also
../org-life-organizer/_lib/taxonomy.md../org-life-organizer/_lib/patterns.md../mac-organizer/SKILL.md— for attachment disk cleanup