npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

phone-sms-gateway

v1.2.1

Published

Twilio alternative: turn your Android phone into a free SMS gateway. Send SMS, OTPs, and verification codes from any CLI, script, or backend without Twilio, Vonage, MessageBird, or Plivo. No per-message fees, no markups, no A2P 10DLC. Free 5-day trial at

Readme

phone-sms-gateway — turn your Android phone into a free SMS gateway

npm version npm downloads Node 18+ License: MIT

A phone SMS gateway in your terminal. Send SMS, generate and verify OTP codes, read your inbox — all routed through your own Android phone instead of paying Twilio, Vonage, MessageBird, or Plivo.

npx phone-sms-gateway send +14155550100 "Hello from my phone"

The message leaves your real mobile number and arrives in the recipient's regular SMS app. No CPaaS account. No per-SMS fees. No A2P 10DLC paperwork.


Why a phone SMS gateway?

CPaaS providers charge $0.0075 to $0.04 per SMS in the US, force you through A2P 10DLC registration, and route messages from short codes recipients don't recognise. Reply rates collapse.

A phone-based SMS gateway routes through the Android phone you already own. Messages arrive from your real local number. Recipients reply directly to you. And the cost is $29/month flat for unlimited SMS through one device.

This package gives you a CLI for that flow.

Install

# One-off
npx phone-sms-gateway send +14155550100 "Hi"

# Or install globally
npm install -g phone-sms-gateway
phone-sms-gateway send +14155550100 "Hi"
# alias also installed:
sms-gateway send +14155550100 "Hi"

Node 18 or newer.

Quick start

  1. Sign up free at sms8.io (5-day trial, no card)
  2. Install the SMS8 Android app on any Android phone, pair it with your account
  3. Grab your API key from app.sms8.io/api.php
  4. Set the key once:
    export SMS8_API_KEY=sk_xxx
  5. Send your first SMS:
    phone-sms-gateway send +14155550100 "It works!"

Commands

# SMS
phone-sms-gateway send <phone> "<message>"

# OTP / 2FA
phone-sms-gateway otp send <phone>
phone-sms-gateway otp verify <phone> <code>
phone-sms-gateway otp wait <sender-phone> [--timeout=120]

# Inbox
phone-sms-gateway inbox [--limit=25] [--received] [--sent] [--phone=+14155550100]

# Devices
phone-sms-gateway devices

# Account
phone-sms-gateway balance
phone-sms-gateway setup

Device / SIM routing

Pick which paired Android phone (and which SIM on multi-SIM phones) sends each message:

phone-sms-gateway send +14155550100 "Hi" --device-id=10700 --sim-slot=2
phone-sms-gateway send +14155550100 "Hi" --devices=10700,10701|0
phone-sms-gateway send +14155550100 "Broadcast" --option=1     # all devices
phone-sms-gateway send +14155550100 "Broadcast" --option=2     # all SIMs across all devices
phone-sms-gateway send +14155550100 "Hi" --random-device       # load-balance

The same flags work on otp send and otp wait. Run phone-sms-gateway devices to list IDs.

OTP send options

phone-sms-gateway otp send +14155550100 --length=8 --expires-in=180
phone-sms-gateway otp send +14155550100 --template="Your YourApp code: {code}"

OTP verify

otp verify checks the most-recent unverified code for the phone. No device routing needed (the code lives server-side).

phone-sms-gateway otp verify +14155550100 482937

OTP wait

otp wait watches incoming SMS on a paired Android and extracts the verification code. Pass the sender's phone or partial match:

CODE=$(phone-sms-gateway otp wait +Google --contains="Google" --timeout=180)

Example: send notifications from a cron job

# /etc/cron.hourly/server-watchdog
LOAD=$(uptime | awk -F'load average:' '{print $2}')
phone-sms-gateway send +14155550100 "Server load: $LOAD" --api-key=$SMS8_API_KEY

Example: OTP loop in CI

# Trigger your app's OTP send
curl -X POST https://staging.app.com/otp -d 'phone=+14155550100'

# Block until the SMS arrives on the test SIM
CODE=$(phone-sms-gateway otp wait +14155550100 --timeout=180)

# Hand it back to the app
curl -X POST https://staging.app.com/verify -d "code=$CODE"

What's under the hood

This package shares its codebase with sms8-cli and connects to the SMS8 SMS-gateway platform. Pick whichever package name reads better in your toolchain — they expose the same bin/sms8.js.

For an AI / MCP integration (Claude Code, Cursor, Windsurf), see sms8-mcp.

Links

License

MIT