Terminal iMessage client for macOS
Project description
tmsg
tmsg is a terminal client for iMessage on macOS.
Package name: terminal-messenger
Command name: tmsg
Features
- Sends messages through
Messages.appusing AppleScript. - Reads recent messages from the local Messages database.
- Lets you pick recent conversations from the terminal.
- Loads recent message history when you open a chat.
- Resolves many phone numbers and emails to contact names from macOS Contacts.
- Supports arrow-key navigation and live search.
- Shows unread chats in the picker.
Requirements
- macOS
- iMessage set up in
Messages.app - Python 3.8+
Install
Recommended:
pipx install terminal-messenger
If you do not use pipx:
python3 -m pip install terminal-messenger
First-time macOS permissions
tmsg needs macOS permissions to work:
Automationso it can send throughMessages.appFull Disk Accessso it can read~/Library/Messages/chat.db
The first send should trigger the Automation prompt automatically.
If reading or sending fails, check:
System Settings > Privacy & Security > AutomationSystem Settings > Privacy & Security > Full Disk Access
You may need to grant access to both your terminal app and the Python binary it uses.
Quick start
tmsg
That opens the home screen with your recent chats.
The main flow is:
- Run
tmsg - Pick a chat
- Type messages
- Use
/listanytime to go back to the home screen
Main commands
Open tmsg and show your chats:
tmsg
Go back to the chat list from inside a conversation:
/list
Other commands
Open a specific conversation:
tmsg frida
Open a specific phone number or email:
tmsg --contact "+15555555555"
Show more history when opening a chat:
tmsg --history-limit 200
While using it
In the picker:
- Type to search
Up/Downto moveEnterto openEscorqto cancel
In a chat:
/list/help/history/quit
Troubleshooting
Operation not permittedusually means Full Disk Access is missing- send failures usually mean Automation permission was denied
- if
tmsgis not found after install, reopen your terminal or refresh your shell shims - macOS Messages internals are undocumented, so some reactions and rich content may still be imperfect
Development
git clone <your-repo-url>
cd terminal-messenger
python3 -m pip install -e .
python3 -m unittest discover -s tests
You can also run it directly during development:
python3 -m tmsg
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.3.tar.gz.
File metadata
- Download URL: terminal_messenger-0.1.3.tar.gz
- Upload date:
- Size: 17.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84babfb22cc0bd20bf6276069d6776bdf87d70b862609150cd7723f2e61e7812
|
|
| MD5 |
ffc33777b236f3f326fef76d9f0ad9d5
|
|
| BLAKE2b-256 |
8a669783610aa4fba9eb8519418cb47d74eafa0012e828add7e6c5d218d55124
|
File details
Details for the file terminal_messenger-0.1.3-py3-none-any.whl.
File metadata
- Download URL: terminal_messenger-0.1.3-py3-none-any.whl
- Upload date:
- Size: 16.3 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 |
a15c580e17901deeb7c5026bda2c58cc6dbb67d2d91ca5f36a5405da6ce20039
|
|
| MD5 |
17ae878117851b958385060adaf52d40
|
|
| BLAKE2b-256 |
f1255b1a66223a5bf7ad029596e08eb0b34102b878b9133ab340d133de140042
|