Terminal iMessage client for macOS
Project description
tmsg
tmsg is a local macOS terminal client for iMessage. The distributable package name is terminal-messenger, and the command people run is tmsg.
Current behavior
- Sends messages through
Messages.appusing AppleScript. - Reads recent messages from the local Messages database.
- Shows up to 250 recent conversations in the picker and list view.
- Loads 100 recent messages by default when you open a chat.
- Resolves many phone numbers and emails to contact names from macOS Contacts.
- Supports arrow-key chat selection and live search in the picker.
- Shows
*markers for chats with unread incoming messages. - Styles your messages differently from incoming ones for easier scanning.
Install
For end users:
pipx install terminal-messenger
For local development:
cd /Users/colestriler/code/terminal-messenger
python3 -m pip install -e .
Run
Open the interactive picker:
tmsg
Open a specific conversation directly:
tmsg frida
or:
tmsg --contact "+15555555555"
List recent conversations without opening a chat:
tmsg --list-chats
Override the default 100-message history window:
tmsg --history-limit 200
You can also run the module directly while developing:
python3 -m tmsg
Picker controls
When the chat picker is open:
*marks chats with unread messages.- Type to search/filter conversations live.
Up/Downmoves the selection.Enteropens the highlighted conversation.Backspacedeletes search text.Escorqcancels.- The picker refreshes periodically while open so new unread chats can appear.
In-chat commands
/help/history/listgoes back to the conversation picker/quit
Permissions
tmsg depends on macOS privacy permissions.
- The first send should trigger an Automation prompt so your terminal or Python runtime can control
Messages. - Reading
~/Library/Messages/chat.dbmay require Full Disk Access for your terminal app and sometimes thepython3binary too.
If sending or reading fails, check:
System Settings > Privacy & Security > AutomationSystem Settings > Privacy & Security > Full Disk Access
Notes
- The Messages database schema is undocumented and may change across macOS versions.
- Contact-name resolution is best-effort and depends on local Contacts data.
- Some reactions, attachments, and rich-content previews are still rough around the edges.
- There may still be terminal UX quirks because the chat view currently uses a lightweight terminal loop rather than a full-screen TUI.
Verify locally
python3 -m unittest discover -s tests
Then:
- Run
tmsg. - Search or arrow to a conversation and press
Enter. - Send a message and approve the Automation prompt if macOS asks.
- Reply from another device and confirm the terminal prints the incoming message.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file terminal_messenger-0.1.0.tar.gz.
File metadata
- Download URL: terminal_messenger-0.1.0.tar.gz
- Upload date:
- Size: 18.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6fda09ba24e1be3ab38873c48392dbf28fdfee67e987d723eaa3043672b6a0cf
|
|
| MD5 |
0f3f25d888d8865faa3738ecbc361d0d
|
|
| BLAKE2b-256 |
d66fe128e259ffc6b22ef10dec5421bc86211c8e0386718119f9f60f33c7fd4b
|
File details
Details for the file terminal_messenger-0.1.0-py3-none-any.whl.
File metadata
- Download URL: terminal_messenger-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
606f0b5441b672848f25cbd79a805ebad52d5eba6d31f54b3f3790b873e8daab
|
|
| MD5 |
cf96ae77f621d2890564b2b2035cd2b8
|
|
| BLAKE2b-256 |
f9a48e5ed10ca8b67dd1d96fe332c12501e1ecc8cada9d1bc883f07600188932
|