Telegram

kaja telegram runs a bot that uses the same personas, tools, and models as the terminal chat — including the shell-command approve/decline flow, shown as an inline keyboard.

Setup

  1. Create a bot and get a token. In Telegram, message @BotFather, send /newbot, and follow the prompts (name + a unique username ending in bot). BotFather replies with an API token like 123456789:AAH....

  2. Get your numeric Telegram user id. Message @userinfobot (or @RawDataBot) — it replies with your numeric id. That’s what goes in allowedUserIds, not your @username.

  3. Add a [telegram] section to ~/.config/kaja/services.toml (who’s allowed in):

    [telegram]
    allowedUserIds = [YOUR_NUMERIC_ID]
    

    …and one to ~/.config/kaja/secrets.toml (the token itself):

    [telegram]
    botToken = "123456789:AAH..."
    
  4. Run it:

    kaja telegram
    

    The bot preflights with getMe() — an invalid token fails immediately with a one-line error, no stack trace. On success it logs “ready” and starts long-polling.

Then open a DM with your bot and send anything. Messages from accounts not in allowedUserIds are silently ignored — it must be non-empty, there’s no “open to everyone” mode.


Next:

Development