Transform your GitHub commits into engaging Telegram posts with AI
- π€ AI-Powered Posts - Generate engaging commit descriptions using Groq's free LLM API
- π± Telegram Integration - Automatic publishing to your Telegram channel
- π Real-time Webhooks - Instant notifications on every push event
- π³ Docker Ready - Deploy in 5 minutes with Docker Compose
- π SSL/HTTPS - Automatic certificate setup with Let's Encrypt
- π° 100% Free - Uses free Groq API (llama-3.3-70b-versatile)
- π Multi-mode - Single-user or SaaS multi-tenant deployment
βββββββββββββββ βββββββββββββββ βββββββββββββββ βββββββββββββββ
β GitHub ββββββββΆβ CommitCasterββββββββΆβ Groq AI ββββββββΆβ Telegram β
β Push βwebhookβ Server β API β Generate β API β Channel β
βββββββββββββββ βββββββββββββββ βββββββββββββββ βββββββββββββββ
- You push code to your GitHub repository
- GitHub sends a webhook to your CommitCaster server
- CommitCaster analyzes the commit and sends it to Groq AI
- AI generates an engaging post
- Post is automatically published to your Telegram channel
- VPS server (Ubuntu/Debian) or local machine with Docker
- Domain name (for production with HTTPS)
- Telegram bot and channel
- Groq API key (free)
# 1. Clone the repository
git clone https://github.com/Minkaill/commit-caster-bot.git
cd commit-caster-bot
# 2. Create .env file
nano .envAdd your configuration:
TELEGRAM_BOT_TOKEN=your_bot_token_from_BotFather
TELEGRAM_CHANNEL_ID=@yourchannel
GROQ_API_KEY=your_groq_api_key
GITHUB_WEBHOOK_SECRET=your_secret_key
PORT=8080# 3. Install Docker
apt install -y docker.io docker-compose
# 4. Start the bot
docker-compose -f docker-compose.single.yml up -d --build
# 5. (Optional) Setup Nginx + SSL
apt install -y nginx certbot python3-certbot-nginx
# Follow instructions in DEPLOYMENT.mdDone! Bot is now running at http://your-server:8080
# 1. Install dependencies
go mod download
# 2. Create .env file (see above)
# 3. Run
go run cmd/bot/main.go
# 4. Use ngrok for HTTPS URL (required by GitHub)
ngrok http 8080- Open @BotFather in Telegram
- Send
/newbot - Follow the instructions
- Copy the token
- Create a public Telegram channel
- Add your bot as an administrator with post permissions
- Use
@yourchannelor numeric ID
- Visit console.groq.com
- Sign up (Google OAuth available)
- Go to API Keys β Create API Key
- Copy the key
Generate a random secret:
openssl rand -hex 32- Open your GitHub repository
- Go to Settings β Webhooks β Add webhook
- Fill in:
- Payload URL:
https://your-domain.com/webhook/github - Content type:
application/json - Secret: your
GITHUB_WEBHOOK_SECRET - Events: Just the push event
- Payload URL:
- Click Add webhook
# Start
docker-compose -f docker-compose.single.yml up -d --build
# View logs
docker-compose -f docker-compose.single.yml logs -f
# Restart
docker-compose -f docker-compose.single.yml restart
# Stop
docker-compose -f docker-compose.single.yml down
# Check status
docker-compose -f docker-compose.single.yml psOr use the Makefile:
make docker-up # Start the bot
make logs # View logs
make docker-restart # Restart
make health # Check health
make update # Update the botCommitCaster/
βββ cmd/
β βββ bot/
β βββ main.go # Entry point
βββ config/
β βββ config.go # Configuration
βββ internal/
β βββ handlers/
β β βββ webhook.go # GitHub webhook handler
β βββ models/
β β βββ github.go # Data models
β βββ services/
β β βββ ai.go # Groq AI service
β β βββ telegram.go # Telegram API
β βββ database/ # Database (SaaS mode)
βββ docs/ # Swagger documentation
βββ docker-compose.single.yml # Single-user Docker setup
βββ docker-compose.yml # Multi-user Docker setup
βββ deploy.sh # Automatic VPS deployment
βββ update.sh # Update script
βββ Dockerfile # Multi-stage Docker build
βββ Makefile # Convenient commands
βββ .env.example # Configuration example
βββ README.md
Edit the prompt in internal/services/ai.go:
prompt := `You are an experienced developer. Write a short post for a Telegram channel...`In internal/services/ai.go, modify the model:
"model": "llama-3.3-70b-versatile", // or llama-3.1-70b, mixtral-8x7bAll models are free on Groq!
In internal/handlers/webhook.go:102, change the limit:
if i >= 5 { // Limit to 5 commits- VPS_QUICKSTART.md - Quick deployment in 5 minutes
- DEPLOYMENT.md - Detailed deployment guide
- API.md - API documentation
- Swagger UI - Interactive API docs
Check that GITHUB_WEBHOOK_SECRET in .env matches the secret in GitHub webhook settings.
- Ensure the bot is added as an administrator to the channel
- Verify
TELEGRAM_CHANNEL_IDis correct (should start with@)
- Verify
GROQ_API_KEYis correct - Check your quota at console.groq.com
- Check Recent Deliveries in GitHub webhook settings
- View logs:
docker-compose -f docker-compose.single.yml logs - Ensure domain is accessible:
curl https://your-domain.com/health
Share every commit to your Telegram channel with beautiful AI-generated descriptions.
Keep your team informed about new features and fixes automatically.
Keep your community updated on development in real-time.
- VPS: from $5/month (Digital Ocean, Vultr, Hetzner)
- Domain: from $10/year (Namecheap, Cloudflare)
- Groq API: FREE! β¨
- Telegram: free
- GitHub: free
- SSL (Let's Encrypt): free
Total: ~$5-10/month
# One-command deployment
chmod +x deploy.sh
./deploy.shThe script will:
- Install Docker, Nginx, Certbot
- Create
.envconfiguration - Setup Nginx reverse proxy
- Install SSL certificate
- Start the bot
See DEPLOYMENT.md for step-by-step instructions.
- Webhook signature verification (HMAC-SHA256)
- SSL/TLS encryption
- Environment variable isolation
- Docker container sandboxing
CommitCaster is extremely lightweight:
- RAM: ~20-50MB
- CPU: <1% at idle
- Disk: ~50MB (Docker image)
A single cheap VPS can handle thousands of webhooks per day.
Pull requests are welcome! For major changes, please open an issue first.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Built with Groq for blazing-fast AI inference
- Powered by Gin web framework
- Created with Claude Code
- π Found a bug? Create an issue
- π¬ Have questions? Start a discussion
- β Like the project? Give it a star!
Made with β€οΈ by developers, for developers