Get found, even if you can't buy ads →

imsg: iMessage from the Terminal

Cameron, Velli's co-founder, wrote a free command-line tool that reads, searches, sends and streams iMessages on a Mac. Our AI agents use it to text us.

The short answer

imsg is a free, open-source command-line tool for macOS by Cameron Olechowski. It reads your Messages history on your Mac, sends through the Messages app, and can stream new messages as one line of JSON each, for scripts and AI agents. Install it with npm i -g imsg-cli. It needs Node 22.13 or newer, or Bun, and Full Disk Access for your terminal.

On this page
  1. What is imsg?
  2. What can it do?
  3. How do you set it up?
  4. How do our agents use it?
  5. Can you limit who it texts?
  6. Questions people ask

Most of our day-to-day talk happens in iMessage. So when we started running AI agents that build and watch things for us, the question was how they would reach us. The answer was not another app. It was a command line.

What is imsg?

imsg is an iMessage tool for the Mac terminal that Cameron wrote and published under the MIT license. It reads the Messages database on your Mac and sends through the Messages app. There is no extra server or account in the middle.

Read, search, send, poll, watch, and stream iMessages from the terminal. Zero runtime dependencies.

The imsg README, github.com/camolechowski/imsg

What can it do?

CommandWhat it does
imsg chatsLists recent conversations
imsg readShows one conversation
imsg searchFull-text search, the last 30 days unless you say otherwise
imsg sendSends a text, or a file
imsg watchShows new messages live as they arrive
imsg pollReturns new messages since a marker, without waiting
imsg streamA live feed of events, one line of JSON each, for agents
imsg doctorChecks permissions and setup

Every command takes --json for output a program can read.

How do you set it up?

  1. Install itnpm i -g imsg-cli or bun add -g imsg-cli. Needs Node 22.13 or newer, or Bun.
  2. Allow Full Disk AccessSystem Settings, Privacy & Security, Full Disk Access: add your terminal, then restart it.
  3. Check itRun imsg doctor. Your first real send asks once for permission to control Messages.

To try it without installing: npx -y imsg-cli doctor. It is for macOS only.

How do our agents use it?

  1. Check for textsimsg poll, on one thread
  2. Read the replyAs JSON
  3. Do the workBuild, check, report
  4. Text backimsg send, same thread

A deploy finishing or a check failing at 2am becomes a text in the conversation we were already in. A bot would need a server, a token and a platform's rules. A command line needs a Mac that is already signed in, and it works with anything: a shell script, a scheduled job, an agent loop.

Can you limit who it texts?

Yes, if you opt in. A small config file can hold an allowlist, so it only sends to and watches the people on it, and confirmSend, so every send needs --yes. Without the file, nothing is restricted. We set our own rules on top for who our agents may text without a person saying so.

Questions people ask

Is imsg free?

Yes. It is open source under the MIT license, on GitHub and on npm as imsg-cli.

Does it work on Windows or Linux?

No. It installs anywhere, but its README says every command except help prints a warning and stops on platforms other than macOS.

Why does it need Full Disk Access?

Your Messages history is a database in your home Library folder (~/Library/Messages/chat.db). The README says reading it requires Full Disk Access for your terminal.

Can an AI agent use it?

Yes. imsg stream prints one JSON line per event and imsg poll returns new messages since a marker, which is what an agent loop needs. The repo also ships instructions written for agents.

More on how we work: how we build, ship and deploy and why we build on Cloudflare.

Next step: run the free AI Read Test on your homepage. It takes a few seconds. Want us to do the work? Book a free call.

Sources: the imsg README and command reference on GitHub, and the imsg-cli package listing, all read November 18, 2026.

Free AI Read Test

Can AI read your site?

It reads your homepage the way ChatGPT, Claude, Perplexity and Gemini do and scores it out of 100, in seconds. No sign-up.

Talk to one of us

Want us to do it for you?

Pick a time and one of us calls you. Free, and nothing to prepare. Or call (773) 997-4600.

  • You talk to one of the two founders.
  • You see the scope before any work starts.
Book a free call

Follow along: InstagramXRSS

Next guideHow We Build, Ship and DeployRead it →

Get new guides by email.

One email per guide. Nothing else.