An fast and user-friendlySend CLI to SMS instantly from your terminal using FreeMobile API
# Install globally with npm
npm install -g send-sms-freemobile
# Or use directly with npx (no installation)
npx send-sms-freemobile --help
# With Bun
bun install -g send-sms-freemobile
bunx send-sms-freemobile --helpYou can configure your FreeMobile credentials using environment variables or CLI arguments. See the Configuration Methods section below for details.
You need a FreeMobile subscription to use this tool.
- Go to FreeMobile account
- Login with your FreeMobile credentials
- Get your User ID
- Navigate to "Mes Options"
- Enable "Notification par SMS" if not already enabled
- Generate an API key if you don't have one yet
# Simple message
send-sms-freemobile -m "Hello World!"
# From a file
send-sms-freemobile -s message.txt
# Multi-line message
send-sms-freemobile -m "Line 1
Line 2
Line 3"
# With specific credentials (overrides saved config)
send-sms-freemobile -u 12345678 -p your_api_key -m "Hello!"This tool supports 4 different ways to provide your message:
send-sms-freemobile -m "Your message here"echo "Server is down!" > alert.txt
send-sms-freemobile -s alert.txtecho "Build completed successfully!" | send-sms-freemobile
curl -s https://api.status.io/myservice | send-sms-freemobile# Just run without message - it will prompt you
send-sms-freemobile
# Offers single-line or multi-line editorecho "FREEMOBILE_USER=12345678" > .env
echo "FREEMOBILE_PASS=your_api_key" >> .env
send-sms-freemobile -m "Hello!"export FREEMOBILE_USER=12345678
export FREEMOBILE_PASS=your_api_key
send-sms-freemobile -m "Hello!"send-sms-freemobile -u 12345678 -p your_api_key -m "Hello!"| Option | Alias | Description | Example |
|---|---|---|---|
--message |
-m |
SMS message text | -m "Hello World!" |
--source |
-s |
Read message from file | -s message.txt |
--user |
-u |
FreeMobile user ID (8 digits) | -u 12345678 |
--pass |
-p |
FreeMobile API key | -p your_api_key |
--version |
-v |
Show version number | -v |
--help |
-h |
Show help message | -h |
Messages are automatically processed for maximum compatibility thanks to freemobile-api package:
- URL decoded:
Hello%20WorldβHello World - Newline handling:
Line 1\nLine 2β Multi-line SMS - Long message chunking: Messages >999 chars split automatically
- Emoji support: Compatible emojis preserved, others converted safely
# Add to your monitoring script
if ! ping -c 1 your-server.com; then
echo "β οΈ Server your-server.com is DOWN!" | send-sms-freemobile
fi# In your CI/CD pipeline
echo "π Production deployment completed successfully!" | send-sms-freemobile# In your backup script
echo "β
Daily backup completed - $(date)" | send-sms-freemobile# CPU usage alert
cpu_usage=$(top -l1 | grep "CPU usage" | cut -d% -f1 | cut -d: -f2)
if [ $cpu_usage -gt 80 ]; then
echo "β οΈ High CPU usage: ${cpu_usage}%" | send-sms-freemobile
fi# Clone and setup
git clone https://github.com/davlgd/send-sms-freemobile.git
cd send-sms-freemobile
bun install # or npm install
# Run locally
bun run index.ts --help
# Run tests
bun test
# Code quality checks
bun run validateApache 2.0 License - see the LICENSE file for details.
β Found this useful? Give it a star on GitHub and share it with others!
Made with β€οΈ for the Open Source Community