Home / Sendblue CLI
@sendblue/cli npm · v0.7.6

Real iMessages,
from your terminal.

Run sendblue setup to provision an iMessage number, then send messages, manage contacts, and configure webhooks — entirely from the terminal.

Create a free account or
$ npm install -g @sendblue/cli Copied
Free sandbox account macOS · Linux · Windows No iPhone or Mac required
~/sendblue — zsh
# Get an iMessage number
$ sendblue setup
  Email:    you@example.com
  Code:     12345678
  Company:  acme
  Contact:  +14155551234
   Account created · line provisioned

# Send your first iMessage
$ sendblue send +14155551234 "Hey from the terminal 👋"
   Sent
Setting this up with an AI agent?
Hand it a Markdown quickstart with the full command surface, plan model, and webhook events.
Quick start

Install. Set up.
Send.

Three commands stand between an empty terminal and a real iMessage delivered to a real phone.

1

Install the CLI

Anywhere Node.js runs. npm install -g @sendblue/cli drops a sendblue binary on your $PATH.

2

Run sendblue setup

Interactive flow: it prompts for your email, an emailed verification code, your company name, and a first contact — and provisions an iMessage line for you. On the free sandbox, that contact needs to text your Sendblue number first to verify before you can message them. Already have a Sendblue account? Run sendblue login instead.

3

Send your first iMessage

sendblue send +14155551234 "Hello" delivers a real iMessage. Pipe it from any script, cron job, or CI runner.

4

Wire up replies (optional)

Use sendblue webhooks add <url> --type receive to forward inbound messages to your endpoint, then watch the live thread with sendblue messages.

setup.sh
# 1 · Install
$ npm install -g @sendblue/cli

# 2 · Create an account + line
$ sendblue setup

# 3 · Add a contact
$ sendblue add-contact +14155551234

# 4 · Free sandbox: have them text your Sendblue line first

# 5 · Send
$ sendblue send +14155551234 \
           "Hello from the terminal"
   Sent

# 6 · Read the thread
$ sendblue messages -n +14155551234
   "On my way."
Command reference

Every sendblue command, on one page.

Verbatim from sendblue --help in v0.7.6 — grouped by what you'll reach for.

Account & auth Sign up, log in, inspect credentials.
sendblue setup [--email --code --company --contact]
Create a new Sendblue account and get an iMessage number. Free sandbox contacts must verify by texting your Sendblue number inbound first.
sendblue login
Log in to an existing Sendblue account on this machine.
sendblue whoami
Show the credentials currently in use.
sendblue show-keys
Print your API key and secret — handy for piping into your .env or another tool.
sendblue status
Check your account status.
Messaging Send, group-send, indicate typing, read history.
sendblue send <number> <message> [--media <path>]
Send an iMessage to a single recipient. --media attaches an image, video, or file (local path or URL).
sendblue send-group <num1> <num2> … <message> [--media]
Send a group iMessage. Phone numbers first, message last. Same --media support.
sendblue typing <number>
Send a typing indicator to a recipient.
sendblue messages [-n <num>] [-l <count>] [--inbound|--outbound]
View recent messages. Filter by contact, limit count (default 10), and restrict to inbound or outbound.
Contacts & lines Manage who you can text and which numbers you send from.
sendblue add-contact <number>
Add a contact to your account. On the free sandbox, they need to text your Sendblue number first before you can message them.
sendblue contacts
List contacts and their verification status.
sendblue lines
List the phone numbers attached to your account.
Webhooks Subscribe to inbound messages and account events.
sendblue webhooks list
List configured webhooks.
sendblue webhooks add <url> --type <event>
Register a webhook URL. Event types: receive, outbound, call_log, line_blocked, line_assigned, contact_created.
sendblue webhooks remove <url> --type <event>
Remove a registered webhook.
TOTP (2FA) Store and read 2FA codes from your terminal — handy when an agent has to log into something on your behalf.
sendblue totp add [--label] [--uri | --secret] [--issuer]
Store a new TOTP secret. Pass an otpauth:// URI from a QR code, or a base32 secret directly.
sendblue totp list
List stored TOTP secrets.
sendblue totp code <secret-id>
Print the current TOTP code for a stored secret.
sendblue totp remove <secret-id>
Delete a stored TOTP secret.
What's in the box

Everything you need
to send real iMessages.

One binary, the same surface area as the REST API, wrapped for the terminal.

Real iMessages

Sendblue delivers your messages as blue bubbles through Apple's iMessage protocol — not gateway SMS.

Group threads & typing

send-group addresses a multi-recipient thread; typing sends a real Apple typing indicator.

Media attachments

Pass --media <path> to send or send-group to attach an image, video, or file (local path or URL).

Webhooks for inbound

Subscribe to receive, outbound, call_log, and account events with one command.

TOTP storage

Stash 2FA secrets and pull current codes from the terminal — agents and scripts can log into your tools without you typing.

Scriptable

Plain CLI ergonomics — fits cleanly into bash, cron, GitHub Actions, or any process that can exec.

Where it fits

A scriptable iMessage
endpoint for any process.

Anything that can exec a shell command can now send and receive iMessages.

agents

AI assistants that text

Hand an agent sendblue send and it can message customers, partners, or you. sendblue totp handles the 2FA wall.

support

Helpdesk handoff

Forward inbound iMessages into Zendesk, Slack, or your own backend with sendblue webhooks add <url> --type receive.

ops

Cron-driven reminders

A one-line cron entry plus sendblue send covers appointment reminders, status pings, and follow-ups.

growth

Group sends from a CSV

Loop a CSV through sendblue send-group with --media for rich attachments.

internal

Ops tools & scripts

Wrap sendblue send in a Make/n8n/Zapier step or a small bash helper for your team.

debug

Local development

Read live threads with sendblue messages, inspect contacts and lines, and check delivery without leaving your editor.

Pricing

Free sandbox to start.
Dedicated lines for production.

The CLI is free. Sandbox accounts include full API access in a rate-limited test environment. When you need a dedicated number, plans start at $100/line/month.

  • Sandbox: every command, rate-limited
  • Dedicated line: webhooks, contacts, group threads, media
  • Upgrade from your dashboard, no downtime
~/sendblue — free sandbox
$ sendblue status
  account   acme
  plan      sandbox
  lines     1
  contacts  3

$ sendblue lines
  +14155557890  · sandbox
  · upgrade in dashboard for a dedicated line
FAQ

Frequently asked questions

If something's not covered here, the docs usually have it.

How do I send an iMessage from the command line?

Install the Sendblue CLI with npm install -g @sendblue/cli, then run sendblue setup to create a Sendblue account and provision an iMessage number. On the free sandbox, your first contact needs to text your Sendblue number inbound once to verify before you can message them. Once verified, run sendblue send +14155551234 "Hello" to deliver a real iMessage.

What commands does the CLI support?

Top-level: setup, login, send, send-group, typing, messages, add-contact, contacts, lines, webhooks (list/add/remove), totp (add/list/code/remove), status, whoami, and show-keys. Run sendblue help at any time for the full list, or sendblue help <command> for per-command flags.

How do I send images, videos, or files?

Pass --media <path> to sendblue send or sendblue send-group. The path can be a local file or a URL. The same flag attaches images, videos, or other media to a one-to-one or group thread.

How do I receive inbound messages?

Register a webhook URL with sendblue webhooks add <url> --type receive. Sendblue will POST inbound messages to that endpoint. You can subscribe to other events the same way: outbound, call_log, line_blocked, line_assigned, contact_created. Use sendblue webhooks list to see what's configured and sendblue messages to read recent traffic from the terminal.

Is the Sendblue CLI free?

The CLI itself is free to install and use. Sendblue accounts include a free sandbox with full API access in a rate-limited test environment. Production traffic on a dedicated line starts at $100/line/month — see /pricing for the current plans.

Does the CLI work on Windows, Mac, and Linux?

Yes. The CLI runs anywhere Node.js runs — macOS, Linux, and Windows. You do not need a Mac or an iPhone: Sendblue handles the Apple infrastructure in the cloud, so your CLI commands work the same on any operating system.

What's the TOTP command for?

sendblue totp lets you store TOTP (2FA) secrets and pull the current 6-digit code on demand. It's useful when you want a script or AI agent to log into a tool on your behalf without you having to type the code yourself. Add a secret with sendblue totp add, then read the current code with sendblue totp code <secret-id>.

Get an iMessage number.
Send your first message.

Install @sendblue/cli, run sendblue setup, then sendblue send.

Free sandbox account · See pricing for production plans