{"id":13862489,"url":"https://github.com/VarunPatelius/Py-iMessenger","last_synced_at":"2025-07-14T12:31:15.534Z","repository":{"id":118810500,"uuid":"373017580","full_name":"VarunPatelius/Py-iMessenger","owner":"VarunPatelius","description":"Py-iMessenger is a chatbot that works with iMessage to execute commands using text messages.","archived":false,"fork":false,"pushed_at":"2024-05-03T23:20:50.000Z","size":7332,"stargazers_count":47,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-05T06:05:55.900Z","etag":null,"topics":["applescript","chatbot","imessage","macos-devices","py-imessenger","python","sqlite3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/VarunPatelius.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2021-06-02T02:35:05.000Z","updated_at":"2024-07-18T18:43:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"b1f92c90-2007-47a9-8147-46806a130310","html_url":"https://github.com/VarunPatelius/Py-iMessenger","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VarunPatelius%2FPy-iMessenger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VarunPatelius%2FPy-iMessenger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VarunPatelius%2FPy-iMessenger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/VarunPatelius%2FPy-iMessenger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/VarunPatelius","download_url":"https://codeload.github.com/VarunPatelius/Py-iMessenger/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225974489,"owners_count":17553961,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["applescript","chatbot","imessage","macos-devices","py-imessenger","python","sqlite3"],"created_at":"2024-08-05T06:01:45.637Z","updated_at":"2024-11-22T22:31:14.334Z","avatar_url":"https://github.com/VarunPatelius.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Py-iMessenger\nPy-iMessenger is a chatbot that works with iMessage to execute commands using text messages.\n![Home Page](https://github.com/VarunPatelius/Py-iMessenger/blob/main/github/logos/mainBanner.png?raw=true)\n\n# Important\nIt appears that after upgrading to MacOS Monetery, Py-iMessenger has lost the ability to send files (images, videos, etc.) using Applescript. You can check out the problem [here](https://apple.stackexchange.com/questions/429586/applescript-messages-app-monterey-problem). **With the newest commit, Py-iMessenger will check to see the MacOS version and will use GUI programming to actually open the Messages app, paste the file, and send it. This decreases performance signficantly and does not work all of the time.**\n\n**Py-iMessenger is completely broken with MacOS Ventura. As far as I can tell, the database is no longer being updated with messages and frankly I've lost the energy to continue with this project. As of 06/05/23 I have tried accessing the iMessage DB as it shows that is updating but when trying to view the messages some appear as NULL until the entire database itself is copied and pasted elsewhere.**\n\n## About\nPy-iMessenger is a simple chatbot that is powered by Python and Applescript. By reading from the iMessage database on MacOS devices, Py-iMessenger allows developers to create extensions that can do various tasks such as sending files, pulling up the recent news, or adding to a todo list. These extensions can be accessed by users simply through texting.\n\nPy-iMessenger's frontend design takes inspiration from Zeke Snider's [Jared](https://github.com/ZekeSnider/Jared), however the backend was written by myself in Python.\n\nPy-iMessenger also supports the ability to send text messages to a iMessage groupchat. When added to a groupchat, all users except the host device will be able to run commands that send texts, image sending is not availible.\n\n## Installation\nThe following steps show how to get Py-iMessenger up and running.\n\n**Be advised, Py-iMessenger is only compatible with MacOS devices which support iMessage, iMessage must be enabled to for the program to run. Running this program on a Windows or Linux device will result in an error message. Furthermore, the program has only been tested with Python3.9**\n\n1. Begin by cloning or downloading the .zip file to your MacOS device\n2. Change directory into the cloned/downloaded folder\n```bash\ncd PATH/TO/FOLDER/Py-iMessenger\n```\n3. Create a virtual environment within the folder \n```bash\npython3 -m venv venv\n```\n4. Activate the virtual environment\n```bash\nsource venv/bin/activate\n```\n5. Install all the dependencies necessary for Py-iMessenger\n```bash\npip3 install -r requirements.txt\n```\n6. Run the program\n```bash\npython3 main.py\n```\n* If you see an error that means that either the terminal or your IDE do not have \"Full Disk Access\", to remedy this click on the Apple logo on the top left of your screen, click \"System Preferences\", select \"Security \u0026 Privacy\", use the scroll bar on the left to find and click \"Full Disk Access\", select the lock icon at the bottom to allow changes and give full disk access to your terminal or IDE.\n\n![Disk Perms](https://github.com/VarunPatelius/Py-iMessenger/blob/main/github/setup/diskAccessGIF.gif?raw=true)\n\n* The program you are using to run the program (terminal/IDE) may also ask you for permissions to control the Messages app, allow this.\n\n![Message Perms](https://github.com/VarunPatelius/Py-iMessenger/blob/main/github/setup/messagePerms.png?raw=true)\n\n## Usage\nPy-iMessenger supports sending both messages and files:\n\n![Messenger Demo](https://github.com/VarunPatelius/Py-iMessenger/blob/main/github/usage/messengerDemo.gif?raw=true)\n\nThis demonstration is accurate for all MacOS versions prior to Monterey.\n\n\n## Technologies\n* [AppleScript](https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptLangGuide/introduction/ASLR_intro.html) - Used to control iMessage\n* [SQLite3](https://docs.python.org/3/library/sqlite3.html) - Used to read the iMessage database\n* [PyQt5](https://www.riverbankcomputing.com/software/pyqt/) - Used to create frontened\n\n## Helpful Tips\nWhen Py-iMessenger runs for the first time, all user data will be automatically loaded into _src/backend/user/savedUser.json_\nalong with a couple other config files for things such as API keys and the settings UI, to stop these config files from showing up\nwhen doing \"git status\", it would be wise to run the following commands in the project directory:\n\n```bash\n\u003e git update-index --skip-worktree src/backend/user/savedUser.json\n\u003e git update-index --skip-worktree src/backend/plugins/config.ini\n\u003e git update-index --skip-worktree src/frontend/settings/configUi.ini\n```\n\n## Documentation\nDocumentation regarding how the program works, how to create an extension, and how to use the multitude of features that Py-iMessenger gives to develops, check out the [YouTube playlist](https://www.youtube.com/playlist?list=PLNtd-r4MGC3eL4dsinuG-RB1gMV5QGbsl)\n\n## Acknowledgments\n_A special thanks to Annelis Irigoyen for creating the logo._\n\n## License\nPy-iMessenger uses the GNU Affero General Public License v3.0 \n\nMore details regarding this license can be found [here](https://choosealicense.com/licenses/agpl-3.0/).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FVarunPatelius%2FPy-iMessenger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FVarunPatelius%2FPy-iMessenger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FVarunPatelius%2FPy-iMessenger/lists"}