
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
signalbot-js
Advanced tools
A minimal JavaScript/TypeScript Signal bot framework for building automated Signal messaging applications
A minimal, clean JavaScript/TypeScript Signal bot framework for building automated Signal messaging applications.
Before starting, you'll need:
# Install the framework
npm install signalbot-js dotenv
# Copy a working example
cp node_modules/signalbot-js/examples/basic-bot.js my-bot.js
# Configure your phone number
echo 'SIGNAL_PHONE="+1234567890"' > .env
# Edit .env with your actual Signal number
# Ensure your project supports ES modules
echo '{"type": "module", "dependencies": {"signalbot-js": "*", "dotenv": "*"}}' > package.json
# Set up Signal API (see setup section below)
# Then run your bot
node my-bot.js
npm install signalbot-js dotenv
Create bot.js:
import { SignalBot, Command } from 'signalbot-js';
import { config } from 'dotenv';
config();
class PingCommand extends Command {
get name() { return 'ping'; }
async handle(ctx) {
if (ctx.startsWith('ping')) {
await ctx.send('pong 🏓');
return true;
}
return false;
}
}
const bot = new SignalBot({
signal_service: 'localhost:8080',
phone_number: process.env.SIGNAL_PHONE,
poll_interval: 3000,
debug: true
});
bot.register(new PingCommand());
await bot.start();
Create .env:
SIGNAL_PHONE="+1234567890"
Make sure your package.json has:
{
"type": "module"
}
Your bot uses signal-cli-rest-api to communicate with Signal servers:
docker run -d \
--name signal-api \
-p 8080:8080 \
-v $(pwd)/bot-config:/home/.local/share/signal-cli \
-e 'MODE=native' \
bbernhard/signal-cli-rest-api:latest
# Generate QR code
curl -X GET 'http://localhost:8080/v1/qrcodelink?device_name=MyBot' --output qr.png
open qr.png # macOS
# start qr.png # Windows
# xdg-open qr.png # Linux
# Scan with Signal app: Settings → Linked Devices → Link New Device
node bot.js
# Send "ping" to your Signal number, should get "pong 🏓" back
Need detailed setup help? See our complete guide
git clone https://github.com/PaulAndreRada/signal-bot.js.git
cd signal-bot.js
pnpm install
pnpm build
# Copy environment template
cp .env.example .env
# Edit .env and add your Signal phone number
# SIGNAL_PHONE="+1234567890"
docker run -d \
--name signal-api \
-p 8080:8080 \
-v $(pwd)/bot-config:/home/.local/share/signal-cli \
-e 'MODE=native' \
bbernhard/signal-cli-rest-api:latest
# Generate QR code
curl -X GET 'http://localhost:8080/v1/qrcodelink?device_name=SignalBot' --output qr.png
open qr.png
# Scan with Signal app: Settings → Linked Devices → Link New Device
node examples/basic-bot.js
Send "ping" to your Signal number and get "pong 🏓" back!
// Complete example showing the full bot setup
import { SignalBot, Command } from 'signalbot-js';
import { config } from 'dotenv';
// Load environment variables
config();
class PingCommand extends Command {
get name() { return 'ping'; }
get description() { return 'Responds to ping with pong'; }
async handle(ctx) {
if (ctx.startsWith('ping')) {
console.log(`Ping received from ${ctx.sender}`);
await ctx.send('pong 🏓');
return true; // Command handled
}
return false; // Try next command
}
}
class EchoCommand extends Command {
get name() { return 'echo'; }
get description() { return 'Echo back your message'; }
async handle(ctx) {
if (ctx.startsWith('echo')) {
const [, ...words] = ctx.args();
await ctx.send(`You said: ${words.join(' ')}`);
return true;
}
return false;
}
}
class HelpCommand extends Command {
get name() { return 'help'; }
get description() { return 'Show available commands'; }
async handle(ctx) {
if (ctx.startsWith('help')) {
const commands = bot.registeredCommands;
const helpText = [
'🤖 Available Commands:',
...commands.map(cmd => `• ${cmd.name} - ${cmd.description}`)
].join('\n');
await ctx.send(helpText);
return true;
}
return false;
}
}
// Create bot instance
const bot = new SignalBot({
signal_service: 'localhost:8080',
phone_number: process.env.SIGNAL_PHONE,
poll_interval: 3000,
debug: true
});
// Register commands
bot.register(new PingCommand());
bot.register(new EchoCommand());
bot.register(new HelpCommand());
// Start the bot
console.log('🤖 Starting Signal bot...');
try {
await bot.start();
console.log('✅ Bot is running! Send "ping", "echo hello", or "help"');
} catch (error) {
console.error('❌ Failed to start bot:', error.message);
}
FAQs
A minimal JavaScript/TypeScript Signal bot framework for building automated Signal messaging applications
The npm package signalbot-js receives a total of 2 weekly downloads. As such, signalbot-js popularity was classified as not popular.
We found that signalbot-js demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.