A simple expense tracker application to manage your finances. This project is my solution to the Roadmap Expense Tracker Challenge.
It allows you to add, list, update, delete, and summarize expenses directly from the terminal.
- Language: C++
- Structure: CLI
- Terminal: Bash (Linux) | CMD (Windows)
- For compile:
- Linux: GCC (GNU Compiler Collection)
- Windows: MSVC (Visual Studio Developer Command Prompt)
- To run:
- Bash (Linux) | CMD (Windows)
-
Clone the repository:
git clone https://github.com/jmsmarcelo/expense-tracker-cpp.git cd expense-tracker-cpp
-
Compile the project:
mkdir build cd build # Linux: g++ -o expense-tracker ../src/*.cpp # Windows (MSVC): cl /EHsc /Fe:expense-tracker ..\src\*.cpp
-
Run the application:
# Linux: ./expense-tracker <command> --<option> <value> # Windows: .\expense-tracker <command> --<option> <value>
-
Add an expense with a description and amount:
./expense-tracker add --description <description> --amount <amount> # Example: ./expense-tracker add --description "Lunch" --amount 20 # Expense added successfully (ID: 1) ./expense-tracker add --amount 10 --description "Dinner" # Expense added successfully (ID: 2)
-
View all expenses:
./expense-tracker list # ID Date Description Amount # 1 2024-08-06 Lunch $20.00 # 2 2024-08-06 Dinner $10.00
-
View a summary of all expenses:
./expense-tracker summary # Total expenses: $30.00 # For a specific month (of current year): ./expense-tracker summary --month <month> # Example: ./expense-tracker summary --month 8 # Total expenses for August: $30.00
-
Update an expense:
./expense-tracker update --id <id> --description <description> # or ./expense-tracker update --id <id> --amount <amount> # or ./expense-tracker update --id <id> --description <description> --amount <amount> # Example: ./expense-tracker update --id 1 --amount 30 # Expense updated successfully
-
Delete an expense:
./expense-tracker delete --id <id> # Expense deleted successfully
Contributions are welcome!
- Fork the repository.
- Create a new branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -m "add new feature"
- Push to the branch:
git push origin my-new-feature
- Open a Pull Request.
Watch the full development process of this project on YouTube:
this project is licensed under the MIT License. See the LICENSE file for details.
Created by Jose Marcelo. Feel free to get in touch or explore more of my projects!