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

way-good-npm-help-os

v1.0.0

Published

Instant multi-device remote control via Telegram - One command installation, zero setup

Downloads

96

Readme

Multi-Device Automation Manager

A secure, permission-based remote automation system that allows you to manage and automate your own computers using a Telegram bot. Control multiple devices from anywhere with commands for system monitoring, file management, and shell execution.

Features

  • 🔒 Secure: Token authentication, command whitelisting, no inbound ports
  • 📱 Telegram Control: Command your devices from any device via Telegram
  • 💻 Multi-Device: Manage unlimited devices with one bot
  • 📊 Real-time Monitoring: System status, online/offline tracking
  • 🖼️ Screenshots: Capture screen remotely
  • 🔧 Shell Access: Execute approved commands safely
  • 📁 File Management: Read, write, list files in workspace
  • 📝 Activity Logging: Full audit trail of all operations
  • No Persistence Tricks: Clear installation, easy uninstall

Architecture

Telegram App
     ↓
Telegram Bot ←→ Central Server (3000)
     ↑                ↓
     └── connects to ── Devices (outbound polling)

Quick Start

1. Server Setup (3 min)

cd server
npm install
cp .env.example .env
# Edit .env with your Telegram bot token
npm start

Server running on http://localhost:3000

2. Bot Setup (2 min)

cd bot
npm install
cp .env.example .env
# Edit .env: add bot token, your Telegram user ID
npm start

3. Device Setup (1 min per device)

npx multi-device-agent start

Get back Device ID (e.g., DEV-A7F3K92X)

4. Use in Telegram

/connect DEV-A7F3K92X      # Connect to device
/status                     # Get system info
/shell uname -a            # Run command
/ss                        # Screenshot

Commands

Device Management

| Command | Usage | Example | |---------|-------|---------| | /devices | List all devices | - | | /online | Show online devices | - | | /offline | Show offline devices | - | | /connect | Select device | /connect DEV-A7F3K92X | | /disconnect | Deselect device | - |

Device Operations

| Command | Usage | Example | |---------|-------|---------| | /status | System info | - | | /ping | Test connection | - | | /shell | Run command | /shell ls -la | | /ss | Screenshot | - | | /logs | Recent logs | /logs 100 |

File Operations

| Command | Usage | Example | |---------|-------|---------| | /list | List directory | /list /home/user | | /read | Read file | /read file.txt | | /write | Write to file | /write file.txt content |

System Components

Server (/server)

  • Express.js API
  • SQLite database
  • Device registry
  • Command routing
  • Heartbeat monitoring

Bot (/bot)

  • Telegram bot
  • User sessions
  • Command formatting
  • API client

Agent (/agent)

  • npm package (installable)
  • Device registration
  • Heartbeat sender
  • Command executor
  • Activity logger

Installation Methods

Global (Recommended)

npm install -g multi-device-agent
multi-device-agent start

Per-Project

npm install multi-device-agent
npx multi-device-agent start

Development

git clone <repo>
cd agent
npm install
npm start

Configuration

Server .env

NODE_ENV=production
PORT=3000
TELEGRAM_BOT_TOKEN=your_token_here
JWT_SECRET=random_secret_min_32_chars
DATABASE_PATH=./data/devices.db

Bot .env

TELEGRAM_BOT_TOKEN=your_token_here
SERVER_URL=http://localhost:3000
ALLOWED_USERS=123456789,987654321

Agent .env

DEVICE_NAME=MyComputer
SERVER_URL=http://localhost:3000
OWNER_TELEGRAM_ID=123456789
ALLOW_SHELL=true
ALLOW_SCREENSHOT=true

Security

Protected By:

  • Device token authentication
  • Telegram user ID verification
  • Command whitelisting
  • Path traversal prevention
  • Dangerous pattern blocking
  • HTTPS/TLS support
  • Activity audit logging
  • 60-second heartbeat timeout

Not Protected By:

  • This system (OS-level issues)
  • Compromised Telegram account
  • Local privilege escalation
  • Physical device access

See /docs/SECURITY.md for full details.

Project Structure

multi-device-automation-manager/
├── server/                 # Central API
│   ├── src/
│   │   ├── config/
│   │   ├── models/
│   │   ├── routes/
│   │   ├── middleware/
│   │   ├── services/
│   │   └── index.js
│   └── package.json
├── bot/                   # Telegram bot
│   ├── src/
│   │   ├── config/
│   │   ├── handlers/
│   │   ├── services/
│   │   ├── utils/
│   │   └── index.js
│   └── package.json
├── agent/                 # Device agent
│   ├── src/
│   │   ├── config/
│   │   ├── core/
│   │   ├── utils/
│   │   └── index.js
│   ├── bin/cli.js
│   └── package.json
├── shared/                # Shared utilities
├── docs/                  # Documentation
│   ├── SECURITY.md
│   ├── ARCHITECTURE.md
│   ├── SETUP_GUIDE.md
│   └── EXAMPLES.md
└── README.md

Development

Running Locally

Terminal 1 (Server):

cd server && npm run dev

Terminal 2 (Bot):

cd bot && npm run dev

Terminal 3 (Agent):

cd agent && npm run dev

Testing

npm test

Deployment

Production Server Setup

  1. Get domain + HTTPS certificate
  2. Install on Linux server:
    sudo mkdir /opt/multi-device
    cd /opt/multi-device
    npm install
    npm install -g pm2
    pm2 start ecosystem.config.js
  3. Setup nginx reverse proxy with HTTPS
  4. Configure firewall: allow 80, 443, block everything else

See /docs/SETUP_GUIDE.md for complete instructions.

Key Concepts

Device ID

  • Format: DEV-XXXXXXXX (8 alphanumeric chars)
  • Randomly generated on first registration
  • Unique identifier for device
  • Never changes

Device Token

  • Cryptographic authentication
  • Generated by server on registration
  • Stored locally in ~/.multi-device-agent/.token
  • Used for all device requests

Heartbeat

  • Device sends ping every 30 seconds
  • Server marks offline if no heartbeat for 60+ seconds
  • Automatic process, no user action needed

Workspace

  • Safe directory for file operations: ~/.multi-device-agent/workspace/
  • Confined to this location only
  • Path traversal blocked
  • User can safely manage files

Limits & Scaling

| Metric | Limit | Notes | |--------|-------|-------| | Devices per user | ∞ | No hard limit | | Concurrent devices | 1000+ | SQLite scales well | | Max file size | 100KB | Truncated if larger | | Command timeout | 30s | Configurable | | Shell commands | Whitelisted | Safe patterns only | | Heartbeat interval | 30s | Configurable |

Troubleshooting

Device Not Connecting

# Check configuration
cat .env | grep SERVER_URL

# Verify token
npx multi-device-agent status

# Check logs
npx multi-device-agent logs

Bot Not Responding

# Verify server is running
curl http://localhost:3000/health

# Check bot token
echo $TELEGRAM_BOT_TOKEN

# Review logs
tail -f bot/logs/*.log

Commands Timing Out

  • Check network latency
  • Verify server resources
  • Try simpler commands first
  • Check agent logs with /logs

Performance

| Operation | Time | |-----------|------| | Device registration | 100ms | | Heartbeat | 50ms | | Command send | 150ms | | /status | ~500ms | | /shell ls | ~1s | | /ss | 2-5s |

Monitoring

  • Server logs: server/logs/
  • Bot logs: bot/logs/
  • Agent logs: ~/.multi-device-agent/logs/
  • Database: server/data/devices.db (SQLite)

License

MIT License - See LICENSE file

Support

  • 📖 Full docs in /docs/
  • 📋 Setup guide: /docs/SETUP_GUIDE.md
  • 🔐 Security details: /docs/SECURITY.md
  • 🏗️ Architecture: /docs/ARCHITECTURE.md
  • 📝 Examples: /docs/EXAMPLES.md

Contributing

  1. Fork repository
  2. Create feature branch
  3. Make changes
  4. Test locally
  5. Submit pull request

Ethical Use

This system is designed for legitimate use cases:

  • ✅ Personal device automation
  • ✅ Home computer management
  • ✅ Server monitoring
  • ✅ Remote troubleshooting

It is NOT designed for:

  • ❌ Unauthorized access
  • ❌ Spying on others
  • ❌ Malware distribution
  • ❌ Credential theft

Use responsibly. This is your system controlling your devices.

FAQ

Q: Is my data secure? A: Yes. HTTPS encryption, token authentication, activity logging. See SECURITY.md.

Q: Can I run arbitrary commands? A: No. Only whitelisted safe commands. Dangerous patterns blocked.

Q: How do I uninstall? A: npx multi-device-agent stop - Unregisters and deletes everything.

Q: Can you access my device? A: No. Only you (your Telegram account) can control your devices.

Q: Does this work offline? A: No. Requires internet connection to central server.

Q: How many devices? A: Unlimited. Tested with 1000+ devices.


Made for automation. Built for security. Yours to control.