A command-line application built with C# for tracking personal expenses. You can add, update, delete, list, summarize, budget, and export your expenses — all from the terminal.
- .NET 10.0 SDK or later
git clone https://github.com/alchemistlowkey/ExpenseTrackerCli.git
cd ExpenseTrackerCli/ExpenseTrackerCli
dotnet buildAll commands follow this pattern:
dotnet run <command> [arguments]Add a new expense with today's date:
dotnet run add "Groceries" 45.50 "food"Add a new expense with a custom date:
dotnet run add "Groceries" 45.50 "food" --date "2026-07-26"Valid categories: transport, food, entertainment, bills, other
Update an existing expense by its Id:
dotnet run update 1 "Grocery Shopping" 50.00 "food"Delete an expense by its Id:
dotnet run delete 1List all expenses:
dotnet run listList expenses by category:
dotnet run list --category "food"Example output:
Id | Description | Amount | Category | Date
--------------------------------------------------------------------------------------------------------------
1 | Groceries | 45.50 | food | 2026-07-26
2 | BRT Ticket | 1.20 | transport | 2026-05-26
View total expenses across all time:
dotnet run summaryView total expenses for a specific month and year:
dotnet run summary --month 07 --year 2026Example output:
Total expenses for July 2026: $45.50
Note: The month must be zero-padded, e.g.
05for May,07for July.
Set a monthly spending limit. This is saved in a config.json file:
dotnet run set-budget 500When adding a new expense, you will automatically be notified of your remaining budget or warned if you have exceeded it:
⚠️ WARNING: You have exceeded your monthly budget!
Budget: $500
Spent: $530
Over by: $30
Export all expenses to a expenses.csv file in the project directory:
dotnet run exportExample output:
Data successfully exported to expenses.csv
The CSV file includes the following columns: Id, Description, Amount, Category, Date.
| File | Purpose |
|---|---|
expenses.json |
Stores all expense records |
config.json |
Stores the monthly budget setting |
expenses.csv |
Generated on export |
Both JSON files are auto-created in the project directory on first use.
ExpenseTrackerCli/
├── ExpenseTrackerCli/
│ ├── Program.cs # CLI entry point and command handling
│ ├── ExpenseItem.cs # Expense model
│ ├── expenses.json # Auto-generated expense data file
| ├── expenses.csv
| ├── BudgetConfig.cs
| └── config.json
All dates must follow the yyyy-MM-dd format, e.g. 2026-07-26.
This project is based on the Expense Tracker project idea from roadmap.sh.