@cmdop/bot
TL;DR
@cmdop/bot is a Node.js multi-channel bot framework for remote machine access. It provides a unified IntegrationHub API that works across Telegram (grammy), Discord (discord.js), and Slack (@slack/bolt). Install once with npm install @cmdop/bot, add channels, and control servers via chat commands like /shell, /agent, and /ls.
Multi-channel bot framework for remote machine access. Built on IntegrationHub — one API for Telegram, Discord, and Slack.
# Install the @cmdop/bot package (includes all channel adapters)
npm install @cmdop/botHow do I get started with @cmdop/bot?
// Import the hub and the Telegram channel adapter
import { IntegrationHub } from '@cmdop/bot';
import { TelegramChannel } from '@cmdop/bot/telegram';
// Create a hub instance with your CMDOP API key and target machine
const hub = new IntegrationHub({
apiKey: process.env.CMDOP_API_KEY!,
machine: 'my-server',
});
// Register the Telegram channel with bot token and allowed user IDs
hub.addChannel(new TelegramChannel({
token: process.env.TELEGRAM_BOT_TOKEN!,
allowedUsers: [123456789],
}));
// Start listening for commands across all registered channels
hub.start();What channels are supported?
| Channel | Adapter | Install |
|---|---|---|
| Telegram | @cmdop/bot/telegram (grammy) | npm install @cmdop/bot |
| Discord | @cmdop/bot/discord (discord.js) | npm install @cmdop/bot |
| Slack | @cmdop/bot/slack (@slack/bolt) | npm install @cmdop/bot |
What commands are available?
| Command | Description |
|---|---|
/shell <cmd> | Execute shell command |
/agent <task> | Run AI agent task |
/ls [path] | List directory |
/cat <path> | Read file |
/machine <host> | Set target machine |
/status | Show connection status |
How does the architecture work?
# All channels feed into a single IntegrationHub, which delegates to @cmdop/node agent
Telegram (grammy) ──┐
Discord (discord.js)──┤── IntegrationHub ── @cmdop/node ── Agent
Slack (@slack/bolt) ──┘What should I set up next?
Setup Telegram bot with grammy
Setup Discord bot with discord.js
Setup Slack app with @slack/bolt
Built-in and custom handlers
Control access to your bot
Last updated on