A Python CLI app to track income and expenses, set savings goals and visualize spending patterns using SQLite for persistent storage and Matplotlib for charts.
Finance Tracker CLI is a lightweight, menu-driven command-line application for managing your personal finances. Log income, categorize expenses, check your balance at a glance, set savings targets and generate spending charts - all from the terminal. Data is stored persistently in a local SQLite database, so nothing is lost between sessions.
- 💵 Add Income: Record earnings with an amount and description
- 🧾 Add Expense: Log spending by amount, category, and description
- 📊 View Summary: Instantly see total income, total expenses and current balance
- 🎯 Set Savings Goals: Define a savings target and track your progress toward it
- 📈 Visualize Spending: Generate bar, pie, and line charts powered by Matplotlib
- 🗄️ Persistent Storage: All records saved to a local SQLite database, no data lost on exit
- 🖥️ Zero GUI dependency: Runs entirely in the terminal, no display server required
| Tool | Purpose |
|---|---|
Python 3 |
Core language |
SQLite3 |
Local persistent database for all transactions |
Matplotlib |
Spending charts (bar, pie, line) |
Pandas |
Data manipulation and summary calculations |
- Python 3.7+
matplotlibpandas
1. Clone the repository
git clone https://github.com/MusaIslamFahad/finance-tracker-cli.git
cd finance-tracker-cli2. Install dependencies
pip install matplotlib pandas3. Run the app
python Personal_Finance_Tracker/main.pyA
finance.dbSQLite file will be created automatically in the project directory on first run.
When you run the app, you'll see an interactive numbered menu:
========================================
💰 Personal Finance Tracker
========================================
1. Add Income
2. Add Expense
3. View Summary
4. Set Savings Goal
5. Visualize Spending
6. Exit
========================================
Enter your choice:
| Option | Action | What You Enter |
|---|---|---|
1 |
Add Income | Amount + description |
2 |
Add Expense | Amount + category + description |
3 |
View Summary | (no input - displays instantly) |
4 |
Set Savings Goal | Target savings amount |
5 |
Visualize Spending | Chart type selection |
6 |
Exit | (closes the app) |
Enter your choice: 1
Enter income amount: 50000
Enter description: Monthly salary
✅ Income of 50000 added successfully!
Enter your choice: 2
Enter expense amount: 8000
Enter category: Rent
Enter description: Monthly rent payment
✅ Expense of 8000 added successfully!
Enter your choice: 3
----------------------------------------
📥 Total Income : 50,000.00
📤 Total Expenses: 8,000.00
💳 Balance : 42,000.00
🎯 Savings Goal : 20,000.00 (Progress: 42%)
----------------------------------------
Data is stored in a local finance.db SQLite file with two core tables:
transactions
| Column | Type | Description |
|---|---|---|
id |
INTEGER | Auto-incremented primary key |
type |
TEXT | "income" or "expense" |
amount |
REAL | Transaction amount |
category |
TEXT | Category label (expenses only) |
description |
TEXT | User-provided note |
date |
TEXT | Timestamp of the entry |
goals
| Column | Type | Description |
|---|---|---|
id |
INTEGER | Auto-incremented primary key |
target_amount |
REAL | Savings goal set by the user |
finance-tracker-cli/
│
├── Personal_Finance_Tracker/
│ └── main.py # Entry point — menu loop, all features
│
├── finance.db # Auto-generated SQLite database (gitignored)
├── screenshots/ # README screenshots (add your own)
└── README.md
Tip: Add
finance.dbto your.gitignoreso your personal financial data is never accidentally pushed to GitHub.
- 📅 Monthly / weekly reports: filter summaries by date range
- 🏷️ Custom expense categories: define and manage your own spending labels
- 📤 CSV / Excel export: download your full transaction history
- 🔔 Budget alerts: get warned when spending in a category exceeds a set limit
- 🌐 Web dashboard: migrate the CLI to a Flask or Streamlit interface
- 📱 Multi-user support: separate profiles with login authentication
Contributions are welcome! To get started:
- Fork the repository
- Create a feature branch (
git checkout -b feature/your-feature) - Commit your changes (
git commit -m 'Add your feature') - Push to the branch (
git push origin feature/your-feature) - Open a Pull Request
Musa Islam Fahad
- GitHub: @MusaIslamFahad
⭐ If this helped you manage your money a little better, a star would be greatly appreciated!