I created a simple shell (zsh) script to help macOS users extract attachments (photos, videos, audio files) and URLs from their iMessages. The script pulls data directly from the Messages database (chat.db), organizes attachments into folders named after each contact or group conversation, and compiles all shared links into CSV files.
This tool can be useful for anyone looking to back up or organize files shared over iMessage without needing the entire conversation history. It also handles macOS's complex local storage structure for attachments.
No sign-ups or dependencies beyond macOS and SQLite. Just run the script, and it’ll create a neat export folder on your desktop. Would love feedback on any edge cases you encounter!