Split restaurant bills effortlessly with AI.
A Telegram bot that takes your voice note + receipt photo and automatically splits the bill among friends. Just say who ordered what, snap a photo of the receipt, and let AI handle the rest.
cheqmate eliminates the tedious part of splitting restaurant bills:
- Record a voice note - "Петя взял борщ и пиво, я взял салат..."
- Snap a photo of the receipt - AI reads it (even in foreign languages!)
- Get the split - Automatically matches dishes to people and calculates shares
- Export - Send to Splitwise/Tricount with one tap
Perfect for group dinners where apps like Splitwise help track IOUs but don't simplify data entry.
- Python 3.13+
- uv - Fast Python package manager (install here)
- API Keys:
- Telegram Bot Token (free)
- Anthropic API Key - to OCR bill and then split it using LLM
The fastest way to get started is using GitHub Codespaces - a fully configured development environment in your browser:
- Click the badge above or open in Codespaces
- Wait ~10 seconds for the environment to load (prebuilt!)
- Add your API keys as Codespaces secrets:
- Go to GitHub Settings → Codespaces → Secrets
- Add
TELEGRAM_BOT_TOKEN, - ADD
ANTHROPIC_API_KEY, - Or manually edit the
.envfile in the codespace
- Run the bot:
uv run python main.py
You can easily switch between different versions:
# Switch to a specific branch
git checkout stage/split_bill_v0
# Switch to a specific tag
git checkout empty_bot
# Create a new branch
git checkout -b my-featureNo need to rebuild the container - just switch and code!
# Clone the repo
git clone https://github.com/xechehot/cheqmate.git
cd cheqmate
# Install dependencies
uv sync
# Set up environment variables
cp .env.example .env
# Edit .env with your API keysuv run python main.py# All tests
uv run pytest
# Specific test file
uv run pytest tests/test_splitter.py
# With coverage
uv run pytest --cov# Type checking
uv run mypy .
# Linting
uv run ruff check .
# Auto-format code
uv run ruff format .Voice Note → Whisper API → Extract participants & orders
Photo → GPT-4 Vision → Extract receipt items & prices
↓
Fuzzy Matching → Assign dishes to people
↓
Calculate Split → Including tax/tip
↓
Export → Splitwise/Tricount
- Python 3.13 + uv
- python-telegram-bot - Bot framework
- thefuzz - Fuzzy string matching
- SQLAlchemy - Conversation state
See CLAUDE.md for development guidelines and architecture details.
MIT License - see LICENSE for details.