A fast, no-nonsense expense tracker you can run anywhere.
Single-file Java, no frameworks, persists to disk, does filters, reports, and CSV.
- ➕ Add expenses with date, amount, category, description, payment method, note
- 🔍 List & filter by month, date range, category, or search text
- 📊 Monthly report: total + category breakdown with percentages
- 💾 Persistent storage in a simple TSV file
- 📤 Export to CSV, 📥 Import from CSV
- 🧰 Single-file Java 11+, no external libraries
# 1) Compile
javac ExpenseTracker.java
You’ll see a prompt like:
===== Expense Tracker (CLI) =====
Storage: expenses.tsv
>
add <amount> <description> [/date yyyy-mm-dd] [/cat category] [/pay method] [/note text]
list [all | month yyyy-mm | today | range yyyy-mm-dd..yyyy-mm-dd] [/cat name] [/sort date|amt|cat] [/rev]
edit <id> [/amt number] [/t new description] [/date yyyy-mm-dd] [/cat category] [/pay method] [/note text]
del <id>
search <text>
report month <yyyy-mm>
export [filename.csv]
import <filename.csv>
save | exit
> add 249.99 Headphones /cat electronics /pay upi /date 2025-08-27
> add 120.50 Groceries at LocalMart /cat food /pay cash
> list month 2025-08 /cat food
> search headphones
> report month 2025-08
> export my_expenses.csv
ID Date Amount Category Description Payment Note
---- ------------ ----------- ---------------- -------------------------------- ---------- ------------------------
1 2025-08-27 249.99 electronics Headphones upi
2 2025-08-27 120.50 food Groceries at LocalMart cash
Total: 370.49
-
expenses.tsv – human-readable storage
-
expenses.tsv.meta – tracks next ID
-
expenses_export.csv – default export name (override in command)
Java 11+
MIT – free to use and modify. PRs welcome! 🚀