A minimal Telegram bot to manage tmate sessions via chat commands.
- Create disposable SSH + Web sessions
- View & share session URLs via
/show - Kill sessions manually or all at once
- Access restricted via
AUTHORIZED_USERS - Lightweight, single-file
.envconfig - Fully async, zero-zombie subprocess handling
| Command | Description |
|---|---|
/start |
Show welcome message |
/help |
Show command list and usage info |
/new |
Spawn new tmate session |
/list |
List all active sessions |
/show <id> |
Display SSH + Web URLs for a session |
/kill <id> |
Terminate a specific session |
/killall |
Kill all active sessions |
Unauthorized users will see ⛔ You are not allowed to use this bot!.
Create a .env file in the project root:
BOT_TOKEN=your_telegram_bot_token
AUTHORIZED_USERS=12345678,987654321 # Telegram user IDs (comma-separated)Alternatively, export them before launching:
export BOT_TOKEN=your_telegram_bot_token
export AUTHORIZED_USERS=12345678,987654321Use uv for fast dependency resolution:
uvx -n .