A minimalist personal expense tracking bot that uses Telegram as the interface and LLM-powered natural language understanding.
- Add or subtract cash:
add cash 500or-200 cash - Specify dates:
add cash 1000 on 12.8.25(defaults to today) - Check balance:
current balance
- Add expenses naturally:
500 fruitsorfruits 500 - Automatic categorization via LLM with confirmation
- Specify dates:
500 batteries on 15.10.25 - Modify or delete by replying to any message:
change to 400,delete, orchange category to Food
- Time-based breakdowns:
expenses this monthorexpenses from 1 oct to 31 oct - Category-specific queries:
food expenses this month - View all categories:
show categories - Visual charts (pie and bar graphs) - TODO
Stack:
- Rust application
- Telegram Bot API for messaging
- LLM with function calling (Groq as inference provider)
- Remote Turso database (libsql)
- Chart generation for visualizations - TODO
Design:
- Message-based context tracking (no conversation state)
- Immediate commits with easy corrections
- Auto-categorization with user category caching
- Natural language date parsing
- Rust 1.89.0+
- Telegram bot token (via @BotFather)
- Turso database
- Groq API key
Create a .env file:
TELEGRAM_BOT_TOKEN=your_bot_token
ERROR_BOT_TOKEN=your_error_bot_token
TURSO_AUTH_TOKEN=your_turso_token
GROQ_API_KEY=your_groq_key
TELEGRAM_ERROR_CHANNEL_ID=your_error_channel_id# Install dependencies
cargo build
# Run the bot
cargo runBuild and run:
docker build -t cash-tracker .
docker run -d --env-file .env cash-trackerThe application is designed to run on any VPS:
# Build release binary
cargo build --release
# Run with environment variables
./target/release/cash-trackerEnsure all environment variables are properly configured in your production environment.
MIT