Telegram Bot

Run commands from your phone via Telegram.

Setup

  1. Message @BotFather on Telegram
  2. Send /newbot and follow the prompts
  3. Copy the bot token to your .env file
  4. Get your user ID from @userinfobot
  5. Add your user ID to TELEGRAM_ALLOWED_USERS
TELEGRAM_BOT_TOKEN=123456789:ABCdefGHIjklMNOpqrsTUVwxyz
TELEGRAM_ALLOWED_USERS=987654321

Predefined Commands

CommandDescription
/startShow help message
/helpList all commands
/statusGit status
/pullGit pull
/logRecent commits
/diffGit diff summary
/lsList files
/branchList branches
/buildRun build
/testRun tests
/devStart dev server
/urlShow web terminal URL
/stop_procStop background process

Raw Commands

Send any command directly (without /) and it will be executed:

ls -la
git log --oneline -10
npm run build
cat package.json

LLM Mode

Enable natural language mode with /llm:

/llm
> show me files changed today
> find all TODO comments
> what's in the config file?

See LLM Mode for more details.

Security

  • Only users in TELEGRAM_ALLOWED_USERS can use the bot
  • Unauthorized users will see their user ID (so you can add them)
  • All commands run with your user permissions