A simple command-line interface (CLI) application to manage your expenses. The Expense Tracker allows you to add, update, delete, and view your expenses. You can also view a summary of expenses and filter them by month.
- Add Expense: Add an expense with a description and amount.
- Update Expense: Modify the description or amount of an existing expense.
- Delete Expense: Remove an expense by its ID.
- View All Expenses: List all recorded expenses.
- View Expense Summary: Display the total amount spent.
- Filter Expenses by Month: Display the total expenses for a specific month.
- Expense Categories (Optional): Add categories to expenses and filter by category.
- Budget Management (Optional): Set a monthly budget and receive a warning when it is exceeded.
- Export to CSV (Optional): Export the list of expenses to a CSV file.
- Python 3.x installed on your system.
- Basic knowledge of using the terminal or command prompt.
https://roadmap.sh/projects/expense-tracker
-
Clone the Repository:
git clone https://github.com/your-username/expense-tracker-cli.git cd expense-tracker-cli
-
Run the Script:
python expense_tracker.py
Run the application using the terminal or command prompt with the following commands:
-
Add an Expense:
python expense_tracker.py add --description "Lunch" --amount 20
Output:
Expense added successfully (ID: 1)
-
List All Expenses:
python expense_tracker.py list
Output:
ID Date Description Amount 1 2024-08-06 Lunch $20 2 2024-08-06 Dinner $10
-
Delete an Expense:
python expense_tracker.py delete --id 1
Output:
Expense deleted successfully
-
View Expense Summary:
python expense_tracker.py summary
Output:
Total expenses: $20
-
View Expense Summary for a Specific Month:
python expense_tracker.py summary --month 8
Output:
Total expenses for August: $20
-
Add Expense Categories: Use the
--category
flag while adding expenses to assign a category. -
Set a Monthly Budget: You can set a budget and receive a warning when the budget is exceeded.
-
Export Expenses to CSV: Use the
export
command to save expenses to a CSV file.
- Handles invalid inputs (e.g., negative amounts).
- Manages non-existent expense IDs.
- Displays helpful error messages for incorrect commands or arguments.
- Add a graphical user interface (GUI) for a more user-friendly experience.
- Implement user authentication to store expenses for different users.
- Integrate with online services to sync expenses across multiple devices.
Feel free to contribute to the project by submitting pull requests or opening issues.
This project is open-source and available under the MIT License.
Inspired by various personal finance management tools and CLI applications.