Skip to main content

Bot Master

A process manager for Telegram bots with a terminal UI. Runs as a background daemon (survives reboots via systemd) with a Textual TUI client for monitoring.

Architecture

  • Daemon (bot-master-daemon) — manages bot subprocesses, auto-restarts on crash (exponential backoff), buffers logs in memory and writes to disk. Communicates via Unix socket.
  • TUI Client (bot-master) — connects to the daemon to view live status, stream logs, and send start/stop/restart commands. If the TUI crashes, bots keep running.

Quick Start

Install with uvx

uvx bot-master install

This interactive wizard will:

  1. Ask where to store config and logs (default: ~/bots/bot-master)
  2. Create a bots.yaml template
  3. Generate a systemd service file

Then follow the printed next steps to finish setup.

Connect to the dashboard

uvx bot-master

If the daemon isn't running, it will tell you how to start it.

Installation (alternative methods)

Install permanently with uv

uv tool install bot-master

Then use bot-master and bot-master-daemon directly (no uvx needed).

From source

cd ~/bots/bot-master
uv sync
uv run bot-master-daemon          # start daemon
uv run bot-master                  # connect TUI

Configuration

Edit bots.yaml:

bots:
  my-bot:
    directory: /path/to/bot
    command: uv run python main.py

  another-bot:
    directory: /path/to/another-bot
    command: uv run python main.py

systemd Service

The install wizard generates a service file. To install it manually:

sudo cp ~/bots/bot-master/bot-master.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now bot-master

This ensures the daemon starts on boot and auto-restarts on failure.

Manual daemon start (without systemd)

bot-master-daemon [path/to/bots.yaml]

TUI Keybindings

Key Action
s Start selected bot
x Stop selected bot
r Restart selected bot
a Start all bots
z Stop all bots
j/k or arrows Navigate bot list
q Quit TUI (daemon keeps running)

Logs

Logs are stored in the logs/ directory (one file per bot, 10 MB rotation with 5 backups):

logs/
  au-tomator.log
  zapier.log
  writing-assistant.log

The daemon also keeps the last 5000 lines per bot in memory for fast streaming to the TUI.

Environment Variables

Variable Default Description
BOT_MASTER_SOCK /tmp/bot-master.sock Unix socket path
BOT_MASTER_CONFIG bots.yaml Config file path
BOT_MASTER_LOG_DIR logs Log directory path

Metadata

Release files for bot-master 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bot-master 0.2.0
File Size Uploaded Provenance
bot_master-0.2.0.tar.gz 39.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for bot-master 0.2.0
File Interpreter ABI Platform
bot_master-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 51.1 kB

Release files / bot_master-0.2.0.tar.gz

Download URL bot_master-0.2.0.tar.gz
Size 39.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7287d5c7f6fd155378387f590c3889f30c7df954243317d9fa0e71bbe051aa1a
BLAKE2b-256 checksum
How to use checksums
738a423723e2bb7c00f35de261bfa80f6f940326c9fb2e24b0774f289a63ac27
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Hatch/1.16.5 cpython/3.13.12 HTTPX/0.28.1

Release files / bot_master-0.2.0-py3-none-any.whl

Download URL bot_master-0.2.0-py3-none-any.whl
Size 11.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c3340a5e4bf971e723b095e6cc52f4a0b35630ee7abc3a67f5d0bdab4027b802
BLAKE2b-256 checksum
How to use checksums
d7be2fe62aad5949af16dbb036a483f8da838c0a7f4a0aa8967083af21bd1296
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Hatch/1.16.5 cpython/3.13.12 HTTPX/0.28.1

Security for bot-master 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page