{"id":49621535,"url":"https://github.com/jpreagan/imsgkit","last_synced_at":"2026-05-05T03:03:57.964Z","repository":{"id":342757042,"uuid":"1175053402","full_name":"jpreagan/imsgkit","owner":"jpreagan","description":"Read your Apple Messages from any machine.","archived":false,"fork":false,"pushed_at":"2026-03-29T02:30:17.000Z","size":221,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-29T04:31:23.631Z","etag":null,"topics":["cli","imessage","macos","messages"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jpreagan.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-03-07T06:49:44.000Z","updated_at":"2026-03-29T02:30:21.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/jpreagan/imsgkit","commit_stats":null,"previous_names":["jpreagan/imsgkit"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/jpreagan/imsgkit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpreagan%2Fimsgkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpreagan%2Fimsgkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpreagan%2Fimsgkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpreagan%2Fimsgkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jpreagan","download_url":"https://codeload.github.com/jpreagan/imsgkit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpreagan%2Fimsgkit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32633440,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"online","status_checked_at":"2026-05-05T02:00:06.033Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","imessage","macos","messages"],"created_at":"2026-05-05T03:03:54.537Z","updated_at":"2026-05-05T03:03:57.948Z","avatar_url":"https://github.com/jpreagan.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\u003cimg src=\"assets/logo.png\" alt=\"imsgkit\" width=\"200\" /\u003e\u003c/div\u003e\n\n# imsgkit\n\nRead your Apple Messages from any machine.\n\n`imsgd` runs on your signed-in Mac and keeps a portable `replica.db` in sync. `imsgctl` reads that replica on any other macOS or Linux machine — no Apple ID required on the reading end. Works locally too.\n\n## What It Can Do\n\n- List recent chats.\n- Read message history for a chat.\n- Filter history by start and end time.\n- Include attachment metadata.\n- Watch new message activity, including reactions.\n- Emit JSON output for scripts and agents.\n\n## Install\n\nSource Mac:\n\n```bash\nbrew install jpreagan/tap/imsgd\nbrew install jpreagan/tap/imsgctl\n```\n\nRemote machine:\n\n- Install `imsgctl`.\n- Install `sqlite3_rsync` if the source Mac will publish a replica here.\n\n## Agent Skill\n\nThis repo includes an agent skill for `imsgctl` at `skills/imsgctl`.\n\nInstall it from this public repo with:\n\n```bash\nnpx skills add jpreagan/imsgkit\n```\n\nThe installed skill helps an agent use `imsgctl` to check access, list chats, inspect message history, include attachment metadata, and watch new activity.\n\nSome agents load new skills only when a session starts. If the skill does not appear immediately, start a new session or refresh skills in the agent runtime.\n\n## Local Use on a Mac\n\n`imsgctl` starts `imsgd` locally as needed for live reads.\n\n```bash\nimsgctl health\nimsgctl chats\nimsgctl history --chat-id 42 --limit 20\nimsgctl watch --chat-id 42 --reactions\n```\n\nBy default, `imsgctl` prefers `~/Library/Application Support/imsgkit/replica.db` when a valid replica is present, otherwise falls back to `~/Library/Messages/chat.db`.\n\nYou can always point to a specific database explicitly:\n\n```bash\nimsgctl chats --db ~/Library/Messages/chat.db\nimsgctl history --db ~/Library/Application\\ Support/imsgkit/replica.db --chat-id 42\n```\n\n## Remote Replica Sync\n\nMany users will run `imsgd sync` on a signed-in Mac and `imsgctl` on a different machine.\n\n1. Create source-side sync config at `~/Library/Application Support/imsgkit/config.toml`:\n\n```toml\n[replica]\npublish = \"user@remote:~/Library/Application Support/imsgkit/replica.db\"\npublish_interval_seconds = 5\nremote_executable = \"/opt/homebrew/bin/sqlite3_rsync\"\n```\n\nUse an explicit remote path in `publish`.\n\n- macOS remote: `user@remote:~/Library/Application Support/imsgkit/replica.db`\n- Linux remote: `user@remote:~/.local/share/imsgkit/replica.db`\n\n2. Prepare the remote path, ensure `sqlite3_rsync` is installed on the remote machine, and confirm the source Mac has SSH access to it.\n\n3. Start sync on the source Mac:\n\n```bash\nbrew services start imsgd\n```\n\nOr run it in the foreground:\n\n```bash\nimsgd sync\n```\n\n4. Read from the replica on the remote machine:\n\n```bash\nimsgctl chats\nimsgctl history --chat-id 42 --limit 20\nimsgctl watch --chat-id 42 --reactions\n```\n\nOn Linux, `imsgctl` reads `~/.local/share/imsgkit/replica.db` by default, or `$XDG_DATA_HOME/imsgkit/replica.db` when `XDG_DATA_HOME` is set to an absolute path.\n\n`imsgd sync` also maintains a sibling `attachments/` directory next to `replica.db`, so replica-backed attachment paths reported by `imsgctl` point to files on the consuming machine rather than paths on the source Mac.\n\n## Permissions\n\nOn the source Mac, `imsgkit` reads:\n\n- `~/Library/Messages/chat.db`\n- Apple Contacts data through `Contacts.framework`\n\nFor Messages access on macOS, grant Full Disk Access to whatever is doing the reading:\n\n- If you run `imsgctl` or `imsgd` manually in Terminal, Terminal needs Full Disk Access.\n- If you run `imsgd` with `brew services`, grant Full Disk Access to the exact Homebrew service binary path, for example `/opt/homebrew/opt/imsgd/bin/imsgd` on Apple Silicon or `/usr/local/opt/imsgd/bin/imsgd` on Intel Macs.\n- In `System Settings \u003e Privacy \u0026 Security \u003e Full Disk Access`, if `/opt` is hard to browse in the file picker, press `Shift+Command+G` and enter the path directly.\n\nIf Contacts permission is unavailable, `imsgkit` still works, but falls back to raw identifiers where necessary.\n\n## Development\n\n```bash\nswift build\nswift test\n\ncd imsgctl\ngo build ./...\ngo test ./...\n```\n\n## License\n\n[MIT License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpreagan%2Fimsgkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjpreagan%2Fimsgkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpreagan%2Fimsgkit/lists"}