A lightweight command-line tool for tracking personal expenses, organizing them into categories, and generating monthly summary reports. Data is stored locally in a SQLite database — no server, no account, no internet connection required.
- Add expenses with an amount, category, date, and optional note
- List and filter expenses by category or month
- Generate a monthly summary report grouped by category
- Delete expenses by id
- Export all data to CSV
git clone https://github.com/<your-username>/expense-tracker-cli.git
cd expense-tracker-cli
pip install -r requirements.txtRequires Python 3.9+. The tool itself only uses the standard library;
requirements.txt only pulls in pytest for running the test suite.
# Add an expense
python expense_tracker.py add 42.50 groceries --note "weekly shop"
# Add an expense with an explicit date
python expense_tracker.py add 12.00 transport --date 2026-06-15
# List all expenses
python expense_tracker.py list
# List expenses for a specific month
python expense_tracker.py list --month 2026-06
# List expenses in a category
python expense_tracker.py list --category groceries
# Generate a monthly report
python expense_tracker.py report 2026-06
# Delete an expense by id
python expense_tracker.py delete 3
# Export everything to CSV
python expense_tracker.py export expenses.csvBy default, data is stored in ~/.expense_tracker.db. Use --db path/to/file.db
to point at a different database, which is also handy for keeping separate
ledgers (e.g. personal vs. business).
pip install -r requirements.txt
pytestMIT