This repository helps couples fairly manage shared expenses using CSV files and GitHub Actions.
Features:
- Contributions to the shared bank account can be entered in a csv file
- Virtual contributions: To offset an agreed upon contributions gap, partner A can enter -123 and person B 123 as a virtual payment to the shared bank account. This would ensure that the calculated balance does not consider this agreed payment gap of $123 of partner B.
- Paid sums can be entered into another csv file
- The report script generates a report and shows how much each partner overpaid/underpaid. This is based on the assumptions that all payments were made from the shared bank account and that each partner is paying into it.
data/— Monthly raw CSV data filesreports/— Auto-generated reportsexpense_tracker/— Report-generation logic and cli tool.github/workflows/— GitHub Actions
With Github Actions (runs fully on Github, you can edit your csvs there; no local Python setup needed):
- Fork this repo
- Add your monthly expenses to
data/YYYY-MM.csv - Add your monthly contributions to
data/YYYY-MM-contributions.csv - Commit
- GitHub Actions runs
./expense_tracker.sh report, just wait a minute for it to complete - The report appears in
reports/YYYY-MM-report.md
Locally:
- Clone this repo
- $ poetry install
- Add your monthly expenses to
data/YYYY-MM.csvor run./expense_tracker.sh add-expense --paid-by Bob --amount 42 --notes "Weekly shopping" - Add your monthly contributions to
data/YYYY-MM-contributions.csvor run./expense_tracker.sh add-contribution --name Alice --amount 100 --notes "Monthly deposit" - Run
./expense_tracker.sh report - The report appears in
reports/YYYY-MM-report.md
You can record expenses and contributions easily from the command line:
./expense_tracker.sh add-expense --date 2025-07-01 --category Groceries --paid-by Alice --amount 42.50 --notes "Weekly shopping"
./expense_tracker.sh add-contribution --date 2025-07-01 --name Bob --amount 1000 --notes "Monthly deposit"This will append to the appropriate CSV files in the data/ directory.
To trigger report generation on the command line, run
./expense_tracker.sh report| Column | Description |
|---|---|
| Date | The date of the expense (format: YYYY-MM-DD). |
| Category | The category of the expense (e.g., Rent, Groceries, Utilities, etc.). |
| Paid By | The person who paid for the expense ("Alice", "Bob", or "Both"). |
| Amount | The amount of the expense (numeric, in dollars). |
| Notes | Optional notes or description for the expense. |
Example file 1970-01.csv:
Date,Category,Paid By,Amount,Notes
2025-06-01,Rent,Both,1200,Split evenly
2025-06-03,Groceries,Alice,350,Weekly groceries
2025-06-05,Dining Out,Bob,220,Dinners
| Column | Description |
|---|---|
| Date | The date of the contribution (format: YYYY-MM-DD). |
| Name | The name of the person making the contribution ("Alice" or "Bob"). |
| Amount | The amount contributed (numeric, in dollars). |
| Virtual Contribution | Indicates if this is a virtual contribution to offset an agreed payment gap ("Yes" or "No"). |
| Notes | Optional notes or description for the contribution. |
Example file 1970-01-contributions.csv:
Date,Name,Amount,Notes
2025-06-01,Alice,1000,Virtual Contribution,Monthly contribution
2025-06-01,Bob,1000,No,Monthly contribution
2025-06-15,Bob,75,No,Extra payment to cover shortfall
- you used money from the shared account for a personal purpose: Add a negative contribution
Date,Name,Amount,Virtual Contribution,Notes
2025-06-01,Alice,-100,No,Accidental withdrawal for ..
- you paid something for your partner from your private account that served only them: This is not considered as relevant for the shared account -- ask to be repaid directly. Alternatively, add a negative contribution for your partner
Date,Name,Amount,Virtual Contribution,Notes
2025-06-01,Bob,-100,No,Alice bought you ..
- something you bought together served your partner more than you: In addition to the expense, also add a negative contribution for your partner if you must, with the fraction of the expense you would like back
Contributions are welcome! To contribute:
- Fork this repository on GitHub.
- Create a new branch for your feature or bugfix.
- Make your changes and add tests if appropriate.
- Run the test suite to ensure everything passes: $ make test
- Run the linter: $ make lint
- Open a pull request describing your changes.
For major changes, please open an issue first to discuss what you would like to change.