Command Line Banking - View and manage bank accounts from the command line

Command Line Banking - View and manage bank accounts from the command line
Photo by Pankaj Patel / Unsplash

I've been working on Thunder.Money - an app that let's you control your financial data without giving it away your safety, security, or privacy to places like Mint, YNAB, etc.

During my journey of writing, I let scope creep get the better of me. I have a vision of what I want this program to be. I want it to be the best. But you don't get to the best by getting distracted, procrastinating, or being stubborn. You need to be dedicated, industrious, timely, and flexible to work through it and improve it over time. You can't turn out the best program overnight. There's already giants out there, and I'm starting out as a single cell organism. It takes time and focus.

Having said that, I jumped the gun and got distracted in trying to make a cross-platform UI that I forgot the original goal of my programming - to make banking easier for me personally. I want to be able to easily access all of my accounts from a single uniform interface. Why not make that interface the command line?

I've been journeying into the command line more and more ever since I switched from primarily being a full-stack web developer for e-commerce - there wasn't a lot of desire for command line shopping, although that does seem like an idea.

Back To Planning

I shelved my money app, and started planning a cohesive interface for CLI banking with arbitrary banks and accounts. Let's start with an end goal - I want to have a easy way to request the balance for a bank account at (insert random large bank) Chase. What would that look like? Well, here's the data we would need:

  • bank name, to determine the url
  • username + authentication data, to login into the bank
  • account name or number, to know the account to look at
  • and some sort of option to show the current balance

This results in some sort of interface like:

banking account 
    --bank chase 
    --user myLogin 
    --accountName "My Checking" 
    --currentBalance

However, I don't exactly like that syntax. I think that might get unwieldy with the number of options this would grow into. I think there's a slightly better syntax we could use. What if we treated accounts and users more like emails, such as:

 banking My-Checking@myLogin@chase account balance --current

The above seems more concise to me, and if we added some settings and fail tolerance behind it, we could make some impressive interface. For example, what if I only had one account at Chase? Why would I need to specify the account then? The program would see the single account and adjust the behavior as needed:

banking myLogin@chase account balance --current

In fact, what if I had some sort of local state, e.g. a project file, that knew already had my login information setup at chase - then the system would know I only have one username at chase, so the system could be even more simplified:

banking @chase account balance --current

What if I wanted to do something else, like transfer some money from one account to another, like a checking account at chase to a savings account at a high yield bank, like Ally or SoFi? I would need to express the bank that initiates the transfer, then the two accounts:

// as arguments:
banking @chase transfer 100.00 checking@chase savings@ally
// or as options:
banking @chase transfer 100.00 --from checking@chase --to savings@ally --amount

I believe the above is pretty clear and almost reads like an sentence - Using my chase login, I want to transfer $100 from my checking at Chase to my savings as Ally. I don't think that can be expressed much simpler with the data we need. Of course, there's a lot that can go wrong, so the app needs to be certain the transfer has successfully been submitted or outputs any errors in a sane manner. Luckily, there's no thing as a "half-transfer" through any bank's web interface I've ever used - either you submitted the transfer to the bank, or you didn't.

The lovely thing about this becoming a reality will be an easy-to-use CLI that a GUI can be built around.

If you would like to know more, please keep following this blog for future entries. I currently have a brand new mercurial repository that will host all the source code for this program, and currently has my list of proposed commands to power this.