A Telegram bot powered by AI models that provides intelligent responses through the Telegram messaging platform.
- Chat with AI through Telegram
- Persistent conversation history
- Role-based access control
- Docker support
- Simple YAML configuration
- Go 1.24+
- Telegram Bot Token (from @BotFather)
- AI API Key (compatible with OpenAI API format)
- Get the bot:
git clone https://github.com/edgard/murailobot.git
cd murailobot
- Configure:
cp config.yaml.example config.yaml
# Edit config.yaml with your tokens and admin ID
- Run:
make build
./murailobot
docker pull ghcr.io/edgard/murailobot:latest
docker run -v $(pwd)/config.yaml:/app/config.yaml ghcr.io/edgard/murailobot:latest
Minimal config.yaml example:
ai:
token: "sk-your-token-here" # AI API token
base_url: "https://api.openai.com/v1" # API endpoint URL
telegram:
token: "your-telegram-bot-token" # Telegram bot token
admin_id: 123456789 # Admin's Telegram ID
For a complete configuration with all options, see config.yaml.example.
Configuration can also be provided through environment variables:
export BOT_AI_TOKEN="your-ai-token"
export BOT_AI_BASE_URL="https://api.openai.com/v1"
export BOT_TELEGRAM_TOKEN="your-telegram-token"
export BOT_TELEGRAM_ADMIN_ID="123456789"
Environment variables follow the pattern BOT_SECTION_KEY
where section and key correspond to the YAML structure.
/start
- Initialize bot conversation/mrl <message>
- Generate AI response/mrl_reset
- Clear chat history (admin only)
This project uses an automated release workflow. Here's how it works:
When code is pushed to the main
branch, the following happens automatically:
- The CI workflow detects changes in the codebase
- Version is automatically bumped based on commit messages:
fix:
orfix(scope):
→ patch bumpfeat:
orfeat(scope):
→ minor bumpBREAKING CHANGE:
in commit body → major bump
- A new git tag is created with the new version
- A GitHub release is generated with release notes
- Binary artifacts are built for multiple platforms
- Docker images are built and pushed to GitHub Container Registry
- No need to manually create version tags or releases
- Use Conventional Commits format for your commit messages
- The release type (patch, minor, major) is determined by your commit messages
All releases are available on the Releases page.
CC0 1.0 Universal - see LICENSE file