Skip to content

GoodVaibhs/expense-tracker-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Expense Tracker CLI

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.

Features

  • 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

Installation

git clone https://github.com/<your-username>/expense-tracker-cli.git
cd expense-tracker-cli
pip install -r requirements.txt

Requires Python 3.9+. The tool itself only uses the standard library; requirements.txt only pulls in pytest for running the test suite.

Usage

# 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.csv

By 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).

Running tests

pip install -r requirements.txt
pytest

License

MIT

About

Command-line tool for tracking personal expenses, categorizing them, and generating monthly reports. SQLite-backed, no server required.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages