The Personal Finance Manager is a robust, CLI application written in Java. It allows users to track their income & expenses, set monthly category budgets, and create detailed visual HTML report.
- JDK 17 or higher
- Maven 3.6+
-
Open a terminal in the project root folder, where
pom.xmlis located -
Compile the project using Maven:
mvn clean compile
-
Run the app:
mvn exec:java -Dexec.mainClass="cz.cuni.mff.miyazakk.finance.Main"*After a successfull build, you will get
>where you can type a command. For available commands, see Available Commands*An example sequence of commands are below:
> add 5000 Salary Successfully added transaction. > add -199.99 Food Lunch in a mexican restaurant Successfully added transaction. > add -500.50 Food Groceries in Albert Successfully added transaction. > add 2000 Lottery Won lottery Successfully added transaction. > balance Current Balance: 7549.01 > filter Food ------------------------------------------------------------------- | Date | Category | Amount | Description | ------------------------------------------------------------------- | 2026-03-12| Food | -200.50 | Groceries for the week | | 2026-03-12 | Food | -199.99 | Lunch in a mexican restaurant | | 2026-03-12 | Food | -500.50 | Groceries in Albert | ------------------------------------------------------------------- > stats Total Income: 8500.00 Total Expenses: -950.99 Net Balance: 7549.01
-
(Optional) Run the unit test
mvn test
| Command | Description | Usage |
|---|---|---|
add <amount> <category> [description] |
Adds a new financial record. Use negative numbers for expenses. | add -5550.50 Food Weekly Groceries |
balance |
Displays the current net balance. | balance |
stats |
Shows advanced metrics with total income and expenses | stats |
filter <category> |
Displays the transaction for a specific category | filter Food |
budget set <limit> <category> |
Makes a max spending limit for a specific category | budget set 500 Travel |
budget check |
Generates a table comparing current spending with set budgets. | budget check |
export html |
Generates a standalone Financial_Report.html file in the root directory. |
export html |
help |
Prints the command menu | help |
exit |
Saves all data to csv and terminates the app | exit |
- It saves the record as csv (
transactions.csv). Therefore, When you open the Finance Manager again, the app loads the data from the last time and you can keep updating the balance book. - The command
export htmlcan create a html file of a summary of the transaction (asFinancial_Report.html), which allows us to see a financial record as html, for instance, as we see in the image below
Author: Kosuke Miyazaki
Institution: Charles University, Faculty of Mathematics and Physics (MFF)
