Messaging Adapters
fleet-bot communicates through messaging adapters. Each adapter implements the same interface, so commands work identically regardless of which messaging platform you use.
Available adapters
Telegram
The default adapter. Uses the Telegram Bot API with long polling.
Config (/etc/fleet/bot.json):
{ "adapters": { "telegram": { "token": "123456:ABC-DEF...", "allowedChatIds": [221714512], "alertChatIds": [221714512] } }}token— Bot token from @BotFatherallowedChatIds— Chat IDs authorised to use the botalertChatIds— Where to send automated alerts
The adapter polls for updates and routes messages to the command handler. Outbound messages support text, photos, documents, and inline keyboard buttons.
BlueBubbles (iMessage)
Connects to a BlueBubbles server running on macOS to send and receive iMessages.
Config:
{ "adapters": { "bluebubbles": { "url": "https://bb.example.com", "password": "your-api-password", "allowedNumbers": ["+447..."], "cfAccessClientId": "...", "cfAccessClientSecret": "..." } }}url— BlueBubbles server URLpassword— API password configured in BlueBubblesallowedNumbers— Phone numbers authorised to use the botcfAccessClientId/cfAccessClientSecret— Optional Cloudflare Access credentials if the server is behind a Cloudflare tunnel
The adapter registers a webhook with the BlueBubbles server and listens for incoming messages. Outbound messages are sent via the BlueBubbles REST API.
Running multiple adapters
You can enable both adapters simultaneously. Configure both in bot.json and the bot will start both, routing messages from either platform to the same command handler.
The Adapter interface
Both adapters implement this Go interface:
type Adapter interface { Name() string Start(ctx context.Context, inbox chan<- InboundMessage) error Send(chatID string, msg OutboundMessage) error SendAlert(text string) error Stop() error}See Custom Adapter for how to implement your own.