Hi! I'm Jax and I've been building this cool little terminal app for myself to track my expenses and budgets!
Other than challenging myself to learn Python, I built this mainly around the habit of budget tracking at the end of the day. (I tried tracking on-the-go, but the balance was always out of sync.) All data is stored in a single sqlite file, so you can export and process them all you want!
The app is built using the textual API for Python! Awesome framework which feels like I'm doing webdev haha.
You can check out some screenshots on gh: https://github.com/EnhancedJax/Bagels
Thanks!
Shout-out to Charmbracelet's stuff such as Glow (https://github.com/charmbracelet/glow) and Gum (https://github.com/charmbracelet/gum) for rendering markdown nicely in the terminal and for using TUI in your shell scripts
Are there any frameworks or examples of this being done?
Nevertheless, the TUI looks very clean and shows nicely how powerful the Textual application framework is.
[1] https://ledger-cli.org [2] https://plaintextaccounting.org
For me, I just need a way to keep track of the money. That being said, I don't care too much about how it does things under the hood.
Question: Is there a good equivalent of the Dewey Decimal system for household and/or business expenses? I like your two level breakdown in default_categories.yaml and the must/need/want system and I’m wondering what prior art you used to put that together?
I see about 800 payees for my own transactions over the past two years and while the big ticket items are easy enough to spot — my favourite grocery store, my landlord, etc. — having a taxonomy that can encompass the long tail of spending would give me confidence that I have 100% understanding of my finances.
Edit: Here’s one from some UN statisticians. Turn to page 40 of the PDF (p27 in print) for the basic structure overview:
https://unstats.un.org/unsd/classifications/Econ/Download/In...
The overview felt quite ergonomic but rebalancing the overview to maintain constant branching might be useful. Section 625 on “retail services” is very large.
I primarily built Bagels starting from my use case, so maybe some of the modelling might not suit expenses of large quantities. I haven't got to the point in life where I have to pay taxes and bills yet haha
For example from that PDF, bagels would have the classification "23490 Bread and other bakers' wares". That's under "23 Grain mill products, starches and starch products; other food products" -> "234 Bakery products".
To be able to see how often one buys grain products, and then bread products, is either funny, or an unnecessary amount of detail.
I've thought of scanning all my grocery store receipts, for example to calculate how many liters of Coca-Cola I've bought in a time period...
Great job!
If anyone is looking for tools or TUIs out there in Python or other languages we host a collection of them here [0] [1]
[0] https://terminaltrove.com/
[1] https://terminaltrove.com/language/python/
Dead Comment
I ask because funny enough over the weekend I spent 4 hours writing a terminal based expense tracker with a sole focus on making it easy to see income vs expenses vs business expenses totals to make it easier for me to file quarterly and yearly taxes. It's not a TUI but it lets me put items into a category and it tallies up the amounts with counts.
It's simple input / output with CSV files that you can edit with whatever editor you want and that's the main reason I wrote it. I've been using GnuCash for almost 10 years and it's kind of inefficient to input data quickly.
It's nice to see your project on the other side of the spectrum (super polished, TUI, etc.). What's it like to quickly add in items or generate income / expense / business expense reports? Ideally I'd like to be able to open my code editor of choice and do whatever operations I need to quickly insert multiple items into multiple categories.
The TUI is the frontend for the schema. You can do all CRUD with the UI, and I designed it to be able to add multiple records quickly, with input modes and templates!
For instance, running `uvx --python 3.13 Bagels` made a temporary environment and installed all dependencies in 1.01s on my computer, and it took less than 10 seconds for the program to start after creating a database etc. Next start takes less than 2 seconds since it's cached. If I decide I want to keep using it, I can install it using the uv tool command, if not I just do nothing.
https://docs.astral.sh/uv/guides/tools/
The author probably really likes uv, thus the biased instructions.
I also think uv is great, but I wouldn't mention it in the user facing installation instructions. People are used to pip/pipx, thus asking them to install yet another tool might drive potential users away.
The usual pip or pipx command should work fine. It's listed on PyPI: https://pypi.org/project/Bagels
I would only mention uv in the Development Setup section (https://github.com/EnhancedJax/Bagels?tab=readme-ov-file#dev...)
It's only for dev-specifics dependencies that they are using the uv-specifics section.
You can try uv in 2 min and see if you like it or not.