Skip to main content

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.app using 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 / Down moves the selection.
  • Enter opens the highlighted conversation.
  • Backspace deletes search text.
  • Esc or q cancels.
  • The picker refreshes periodically while open so new unread chats can appear.

In-chat commands

  • /help
  • /history
  • /list goes 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.db may require Full Disk Access for your terminal app and sometimes the python3 binary too.

If sending or reading fails, check:

  • System Settings > Privacy & Security > Automation
  • System 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:

  1. Run tmsg.
  2. Search or arrow to a conversation and press Enter.
  3. Send a message and approve the Automation prompt if macOS asks.
  4. 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

terminal_messenger-0.1.0.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

terminal_messenger-0.1.0-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

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

Hashes for terminal_messenger-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6fda09ba24e1be3ab38873c48392dbf28fdfee67e987d723eaa3043672b6a0cf
MD5 0f3f25d888d8865faa3738ecbc361d0d
BLAKE2b-256 d66fe128e259ffc6b22ef10dec5421bc86211c8e0386718119f9f60f33c7fd4b

See more details on using hashes here.

File details

Details for the file terminal_messenger-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for terminal_messenger-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 606f0b5441b672848f25cbd79a805ebad52d5eba6d31f54b3f3790b873e8daab
MD5 cf96ae77f621d2890564b2b2035cd2b8
BLAKE2b-256 f9a48e5ed10ca8b67dd1d96fe332c12501e1ecc8cada9d1bc883f07600188932

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page