9 ms·
Show HN: Bagels – TUI expense tracker
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 https://github.com/EnhancedJax/Bagels
Thanks!
- pmarreck 2y agoI don't know why (other than being a Gen X nerd) but I have a bizarre affinity for nicely-written TUI apps of late! Things like btop++ that respond to mouse clicks and smoothly reflow when the terminal window is resized etc... Shout-out to Charmbracelet's stuff such as Glow (https://github.com/charmbracelet/glow https://github.com/charmbracelet/glow) and Gum (https://github.com/charmbracelet/gum https://github.com/charmbracelet/gum) for rendering markdown nicely in the terminal and for using TUI in your shell scripts
- matt3210 2y agoTUI is the superior ui. Works locally and via ssh.
- dewey 2y agoBut not on mobile, which is a big draw back especially for something you might want to do on the go (Op said that’s not the goal, but for me it would be)
- nejsjsjsbsb 2y agoOn Android you can install a Linux app and run it there. UX may be lacking. But add a BT keyboard and mouse and it ain't bad.
- dewey 2y agoThat’s really not what people understand as a “mobile” experience.
- nejsjsjsbsb 2y agoIn that case best option is if this writes to files use Dropbox and another app that understands the format.
- jeffhuys 2y agoiOS has terminals too now, but of course sandboxed. You could install this in there, though, and no linux needed.
- sorenjan 2y agoTextual can run the tui apps as web apps. https://github.com/Textualize/textual-web https://github.com/Textualize/textual-web
- nejsjsjsbsb 2y agok9s is also nice
- marcyb5st 2y agolazydocker as well. Also a big fan of bottom (https://github.com/ClementTsang/bottom https://github.com/ClementTsang/bottom) , which surprisignly enough even though it has charts and everything, it consumes way fewer resources on my system compared to htop.
- liamwire 2y agoHuge fan of wrapping simple PowerShell tools with Gum for making things a bit nicer for colleagues to use, Charm’s entire catalogue is art
- danielvaughn 2y agoI love Charm so much.
- stanac 2y agoThis TUI is really beautiful. Looking at those rounded corners I am wondering if it is using some specific font created just for TUI.
- EnhancedJax 2y agoBaked into the Textual framework!
- joshka 2y agoThey're in the Unicode box drawing block. https://en.wikipedia.org/wiki/Box-drawing_character https://en.wikipedia.org/wiki/Box-drawing_character
- stanac 2y agoI am aware of those, I have used them, but this font has rounded corners on boxes, that's why I believe it is a custom font.
- 8organicbits 2y agoThe code references FiraCode: https://github.com/EnhancedJax/Bagels/blob/7b4bfd051f6beff8fabdcf4ed53bab7c88a3c9d8/tests/__snapshots__/snapshot/TestBasic.test_1_welcome.svg#L8 https://github.com/EnhancedJax/Bagels/blob/7b4bfd051f6beff8f... But the actual character is: ╯
- Thorrez 2y ago256F ╯ Box Drawings Light Arc Up And Left https://www.unicode.org/charts/nameslist/n_2500.html https://www.unicode.org/charts/nameslist/n_2500.html
- EnhancedJax 2y agoTextual automatically has a rounded border style for containers!
- Gshaheen 2y agoI too am obsessed with beautiful TUI apps. I would love to see them inside a browser to lower the barrier to entry for the majority of folks. Almost like an emulated terminal inside the browser that’s simply accessed by url. Are there any frameworks or examples of this being done?
- withinboredom 2y agossh in the browser + self-hosting is usually all you need.
- alchemist1e9 2y agobrowser terminal + ssh + self hosting! I’ve not looked into this is years but I once had this idea that in browser terminal and I remember discovering there exists javascript xterm implementation. For me though I was thinking the setup needs custom MFA security since public browsers or devices can be compromised. Haven’t researched yet how to somehow add that to the access. If it worked how I’d imagine you can just walk up to any computer with a modern browser, go to your self-hosted IP, it sends you access code to phone, or uses authenticator or rsa token, something, and you get your terminal access.
- withinboredom 2y agoI currently host an ssh-only game that logs you in based on your github user. Ie: ssh withinboredom@my-game and it looks your keys up at github.com/withinboredom.keys ... then uses that as the authorized keys (this is all built-in to ssh btw). It wouldn't be too difficult to extend this to support webauthn/passkeys via a little bit of magic. Actually... that sounds like a pretty interesting project.
- Gshaheen 2y agoI was thinking more completely self contained. Did some research and seems it might be possible with xterm + webcontainer.
- pmarreck 2y ago
- tartoran 2y agoGood TUI apps are written for efficiency. With a few keystroke you can navigate around and take actions that can be slower and tax more using GUIs and even more using modern GUIs. It appears to me that TUIs are seeing a rise in interest and that is probably not just fad driven, they're a lot more efficient for some tasks. Of course TUIs aren't for everyone and the learning curve could be steeper (not necessarily so though).
- joeevans1000 2y agoWTF! This is absolutely so cool. Thank you!!
- EnhancedJax 2y agoThanks!
- teruakohatu 2y agoThat is a very slick UI. I was expecting something a lot simpler.
- gorgoiler 2y agoKudos, great execution on the project and on the code too. 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%20Text/CPCv2.1_complete(PDF)_English.pdf 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.
- EnhancedJax 2y agoSorry, I don't seem to understand your question... I think you're talking about categories and subcategories? You can have household as the parent category and all the expenses under it. The must/need/want system (I think) is used by a lot of expense trackers, and for Bagels I used it as a way to limit unnecessary spending (want%). 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
- netsharc 2y agoSeems like grandparent commenter wants to add classifying codes to items s/he's bought. 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...
- djvu97 2y agoHow different is this from ledger in terms of storing transactions???
- dnel 2y agoSeems like a missed trick, I'm not going to change my accounting system for one app but if it was in the pta ecosystem I could easily see myself using it as a nice front end for my existing data files.
- NoboruWataya 2y agoAs a GnuCash user, my pipe dream in this area is all of these tools--ledger, beancount, GnuCash, this--operating on the same data format. There are some things I like about each of them but it is not easy to switch back and forth.
- dnel 2y agoConverting between pta formats is easy but between pta and database formats will always be difficult.
- skydiver7373 2y agothis is so cool! thank you for building this.
- nighthawk454 2y agoTo run without setup: uv run --python 3.13 --no-project --with bagels bagels
- Temporary_31337 2y agoSuperb application and I agree the terminal simplicity plus some minima amount of visualisation is what appeals to me. But my online banking provides all of this plus automatic categorisation and if needed I can always export to csv. So not sure why I would enter these manually, I guess it’s different in the US? (I live in Europe where things like easy export and account transfers are required by law)
- EnhancedJax 2y agoI live in Hong Kong, and the problem is I juggle around 5 different accounts, including transit cards, mobile wallet apps and cash. I use my transit card to pay for transit and food, wallet apps to online shop etc. and there's no centralized system to manage expenses other than a tracker.
- Temporary_31337 2y agoGood to understand - HongKong was a finiancial hub for Asia and an early adopter of 'fintech' which means you are stuck with banks running on tech from the 1980s while some developing countries went straight to mobile payments....
- withinboredom 2y agoSame. But since it is just sqlite; it should be rather simple-ish to export my account as json and import it. It'd probably take a weekend, max. However, there is some value in entering your expenses manually... either you won't; or you'll spend less so you have less to enter.
- wiseowise 2y agoLooks absolutely awesome. But, man, Textual is such a chore to write and docs are crap. Is there HTML based TUI toolkit? I know there’s https://github.com/vadimdemedes/ink https://github.com/vadimdemedes/ink, anything else besides it?
- marcyb5st 2y agoIn rust land there is a Dioxus renderer for TUIs (https://docs.rs/dioxus-tui/latest/dioxus_tui/ https://docs.rs/dioxus-tui/latest/dioxus_tui/ but I believe it is no longer one of the supported renderers). In JS there is Ink (https://github.com/vadimdemedes/ink https://github.com/vadimdemedes/ink).
- EnhancedJax 2y agoMy first choice of framework was ink (came from web dev background), but couldn't get it to work how I wanted it to. Textual adopts the component model, and IMO the docs are awesome! It's like writing React honestly (without the reactive part. Textual does support reactivity, but couldn't get it to work and just wrote code to update the UI jQuery style). It also uses CSS to style, which is great and works as expected most of the time! Maybe give it a second try haha
- ramon156 2y agoIm going to try this for myself. One questions though, does it support imports from stuff like gocardless[0]? Actual Budget supports this so I can import from EU banks. [0] https://gocardless.com/guides/posts/european-payments/ https://gocardless.com/guides/posts/european-payments/
- EnhancedJax 2y agoNot atm. But you can write a script to feed your data into the sqlite db file! The schema can be found in https://github.com/EnhancedJax/Bagels/tree/main/src/bagels/models https://github.com/EnhancedJax/Bagels/tree/main/src/bagels/m...
- dammaj 2y agoGreat use of TUI ! I wonder if this app implements a method to import spending from bank account exported to a .csv for example, this would be very useful !
- EnhancedJax 2y agoNot atm. But you can write a script to feed your data into the sqlite db file! The schema can be found in https://github.com/EnhancedJax/Bagels/tree/main/src/bagels/models https://github.com/EnhancedJax/Bagels/tree/main/src/bagels/m...
- zznnzzzzzz 2y agoWhat I would like to know is where you are able to find bagels for $2.5! Looks very slick though, congrats on getting it to this level of polish!
- EnhancedJax 2y ago:D
- terminaltrove 2y agoThanks for making Bagels Jax, this is a very advanced TUI which is nicely shown in the screenshots, and also showcases the power of Textual which is a very powerful framework. 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/ https://terminaltrove.com/ [1] https://terminaltrove.com/language/python/ https://terminaltrove.com/language/python/
- alwyn 2y agoThank you for introducing me to Terminal Trove. So many tools to try and experience, loving it!
- EnhancedJax 2y agoThank you! Actually, I've submitted Bagels to terminaltrove I think a few weeks back but haven't got any replies, should I send an email to the curator instead?
- terminaltrove 2y ago[dead]
- nanna 2y agoI must say that as an Emacs user, I do feel a bit jealous of UIs like this. Is it something about doing everything in buffers which means we don't make complex layouts like this? Could/should we take inspiration from something like Textual, which this expense tracker is built on top of? https://textual.textualize.io/ https://textual.textualize.io/
- skwee357 2y agoThis is amazing! But I wish it would use the ledger/beancount file format, as I don't have plans to migrate years of transactions.
- oneeyedpigeon 2y agoIt looks great, but I don't feel enthusiastic about installing yet another package manager. Are there really enough benefits from uv to justify it as the only option?
- EnhancedJax 2y agoI believe you can simply use pipx, if you have that. I picked uv because it handles installing python for you. I do want to add Bagels to homebrew, but have to do a bit more reading to figure that out.
- sorenjan 2y agoI think you should change the Windows install section in the readme. Instead of installing uv by downloading and running a Powershell script you can use winget: winget install --id=astral-sh.uv -e https://docs.astral.sh/uv/getting-started/installation/#winget https://docs.astral.sh/uv/getting-started/installation/#wing...
- EnhancedJax 2y agoThanks! Will check out!
- wdroz 2y agoThey are using the "normal" dependencies section in the pyproject.toml, so you should be able to install with pip or other tools if you want. 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.
- lpedrosa 2y ago> Are there really enough benefits from uv to justify it as the only option? 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 https://pypi.org/project/Bagels I would only mention uv in the Development Setup section (https://github.com/EnhancedJax/Bagels?tab=readme-ov-file#development-setup https://github.com/EnhancedJax/Bagels?tab=readme-ov-file#dev...)
- jimmcslim 2y agoLooks great. I've scanned the front page of the GH repo and I don't see a mention of double-entry accounting, so curious if it is doing that under the hood?
- jaxlover69 2y ago[flagged]
- jaxlover69 2y agoI love jax
- jaxlover69 2y agoI love jax !
- danielvaughn 2y agoDude this is so pretty. I’m definitely going to be using this, as I’ve been trying to find a good expense tracker but the web platforms all suck in various ways.
- roydivision 2y agoLooks gorgeous! Respect to Jax.
- anonymous344 2y agoi have expense tracker in my long "todos" list, it should have the following: - copy and paste bank transfers from online bank. not just the monthly report because then it's not real time - offline or self-host, no cloud - no ai, but pattern match to auto tag each line and learn from it don't think will ever have a time to do this, so feel free to steal these
- nickjj 2y agoHave you given consideration on using CSV files for the back-end? 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.
- EnhancedJax 2y agoNo, it never came across my mind unfortunately. There are a handful of relations between each table for my schema design, so never though CSV would be viable for my use case. 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!
- TheTaytay 2y agoOh wow! That looks really nice. I’ve been wanting to okay with Textual too. This makes me even more intrigued.
- EnhancedJax 2y agoDefinitely try textual! Their support on Discord is really nice too
- bvrmn 2y agoAmazing project! > I built this mainly around the habit of budget tracking at the end of the day. I've built 3 personal financial trackers. 2 CLI based and last a web-based to be able to serve it in termux as a local android app. Anecdote: the only thing which make it usable in the end is a joint account (most transactions are happened there) which reduced monthly transaction count to low acceptable level and did not become a chore without fancy importing from bank statements. Joint account allows to record only transfers and not individual expenses. It easily could be a separate account for small expenses, it has a low value to know which kind of grocery takes most of money.
- EnhancedJax 2y agoCool, are they open source? Would love to check them out! > which make it usable in the end is a joint account (most transactions are happened there) which reduced monthly transaction count to low acceptable level I'm not sure if I understand...
- garyrob 2y agoFeedback requested: while I see that there is a bit of controversy about the author's using uv, I am wondering how much of a barrier that really is. Suppose someone were to write a Python terminal app such that the docs required uv OR pipx. And it installed all its own dependencies, etc. using those mechanisms. Would that be an acceptable way to write a useful utility these days? Or, if that person wanted to write a utility, would they get far more uptake if it were to be provided as an executable written in Rust?
- JTyQZSnP3cQGa8B 2y agoIMHO there is no controversy. If you write applications in Python, you must have a modern package manager whether it’s uv or hatch or anything else. I think that uv is the best so far but it doesn’t matter.
- garyrob 2y agoI understand. But what I'm hoping for feedback about is: would I lose a lot of potential users of my utility if I write it in Python and require them to have uv, pipx, etc.? Because I could write it in Rust and just provide it as an executable. But Python would be easier for me as the developer.
- JTyQZSnP3cQGa8B 2y agoIs there an envelope system? I would definitely help write one if that’s not the case. Anyway it’s great, that’s exactly what I needed.
- thih9 2y agoNote: if anyone doesn't want to install the uv package manager via piping to shell, the: pip install uv also works; more information: https://github.com/astral-sh/uv#installation https://github.com/astral-sh/uv#installation
- mrusme 2y agoYou have built a beautiful TUI, hats off. Having that said, however, if feels like a missed opportunity for this project to use an SQLAlchemy-based database backend over the more simplistic and widely supported ledger [1] format. While I understand that the your tool might not want to leverage the full complexity of a double-entry accounting system, as a friend of plain text accounting [2] I would have preferred a format that I can alter with existing tools, in order to be able to integrate _Bagels_ into an existing workflow. Nevertheless, the TUI looks very clean and shows nicely how powerful the Textual application framework is. [1] https://ledger-cli.org https://ledger-cli.org [2] https://plaintextaccounting.org https://plaintextaccounting.org
- globular-toast 2y agoThis was my first thought too. Looking at the code it seems pretty tightly coupled to SQLAlchemy right now, but I imagine this could be replaced with a generic repository with a (probably read only) ledger backend to complement the SQLAlchemy one.
- withinboredom 2y agoGod. Please no. I hate double-entry accounting. I fiddled with Bagels for a bit and really like how simple it is to keep up to date. I don't need non-sensical accounts like "accounts receivable" and stuff like that. That's for my accountant. 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.
- globular-toast 2y agoYou can do whatever you want with your own accounts. I don't have anything like an "accounts receivable" in mine.
- insane_dreamer 2y agoVery nice design! Kudos. Looks like something I would use. For me personally, bank/CC sync is a dealbreaker for any personal budgeting/expense app as there is no way I have the time to enter those in manually or even download monthly CSVs and import them. (I presently use Copilot -- not related to MSFT, though I don't know how they'll survive without a rename now that MSFT has gone "all-in" with "Copilot-everything" :/ -- for this feature alone.)
- 4m1rk 2y agoNice job, you should add it here: https://textual.textualize.io/#built-with-textual https://textual.textualize.io/#built-with-textual