A powerful DevOps assistant that allows you to control your Mac or Linux machine remotely via Telegram. Create custom automation tasks and execute commands seamlessly from your phone or any device with Telegram.
- ๐ค Control your machine remotely via Telegram
- ๐ Send voice messages for hands-free operation (transcription via Whisper API)
- ๐ ๏ธ Create, edit, and manage custom automation tasks
- ๐ฅ๏ธ Run shell commands on your machine
- ๐ Secure access limited to authorized Telegram user ID
- ๐ง Powered by Claude AI (Anthropic) for natural language understanding
Watch the video demonstration:
- Python 3.10+
- Conda (recommended for environment management)
- Mac or Linux machine
- Telegram account
- Anthropic API key (for Claude)
- OpenAI API key (for Whisper transcription)
- Clone the repository:
git clone https://github.com/yourusername/devops_agent.git
cd devops_agent- Set up the environment:
conda env create -f environment.yml
conda activate devops_agent- Configure your environment variables (see Configuration section below)
- Open Telegram and search for "BotFather" (@BotFather)
- Send the command
/newbotto BotFather - Follow the instructions to name your bot and create a username for it
- Once created, BotFather will provide you with a token that looks like
123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ - Save this token as you'll need it for configuration
Create a .env file in the root directory with the following variables:
TELEGRAM_BOT_TOKEN="your_telegram_bot_token_here"
TELEGRAM_USER_ID="your_telegram_user_id"
ANTHROPIC_API_KEY="your_anthropic_api_key"
OPENAI_API_KEY="your_openai_api_key"
LLM_MODEL="claude-3-7-sonnet-20250219"
To find your Telegram user ID:
- Send a message to @userinfobot on Telegram
- It will reply with your user ID
To start the Telegram bot:
python telegram_bot.pyFor local command line usage:
python cli_bot.pyOnce your bot is running, you can:
- Send text messages to the bot with commands or questions
- Send voice messages that will be transcribed and processed
- Create custom tasks by sending a message like "Create a task to check system status"
- Run shell commands by asking the bot to perform specific actions
- Get help by asking the bot about its capabilities
- The bot only responds to the Telegram user ID specified in your
.envfile - API keys should be kept secret and never committed to version control
- The bot can execute shell commands on your machine, so ensure it's running in a secure environment
- Consider using a restricted user account for running the bot in production
You can create custom automation tasks that can be executed later:
- Ask the bot to create a new task: "Create a task called check_disk that checks disk space"
- The bot will help you define the steps and commands for the task
- Once created, you can run the task by name: "Run check_disk task"
Contributions are welcome! Please feel free to submit a Pull Request.
