Code Monkey home page Code Monkey logo

cheddardog's Introduction

cheddardog

a poor mans Mint, Personal Capital or other, in the making

  • Download transactions from your financial institutions
  • Save them in a json file
  • Generate an html spending summary report
  • Generate an html balance report for all accounts
  • Email the spending summary
  • Why?
    • Financial insights without spraying your data to third parties.
    • Enable 2 Factor auth on your financial accounts and they still work
    • Local db of balances & transactions to whatever you want

sample report

Supports

  • American Express
  • Bank of America (CA)
  • Etrade
  • Fidelity
  • Schwab
  • Vanguard
  • 2 Factor Auth: works, but you'll have to babysit the run and enter the 2nd factor manually

Download Ledger from Financial Institutions

credentials come from env vars, config is in config.json

  • update config.json with which accounts you want refreshed.
  • Set BOFA_USER and BOFA_PW env variable and/or
  • Set AMEX_USER and AMEX_PW env variable and/or
  • Set SCHWAB_USER and SCHWAB_PW env variable and/or
  • Set VANGUARD_USER and VANGUARD_PW env variable
  • npm install
  • npm run build
  • npm run refresh to generate ./out/txndb.json

Tip: Use 1password cli or set env vars without saving to history

To simplify repetitive execution, consider something like this in a .zshrc file

cheddardog() {
    eval $(op signin)

    echo 'Configuring AMEX...'
    TEMP=`op get item amex | jq -r "(.details.fields[1].value, .details.fields[2].value)"`
    export AMEX_USER=`echo $TEMP | head -1`
    export AMEX_PW=`echo $TEMP | tail -1`

    // .... more accounts credentials

    export SENDGRID_API_KEY=`op get item sendgrid_account_name | jq -r .details.fields[0].value`
}

Send Report

  • Set SENDGRID_API_KEY env variable
  • update config.json with the email sender (from) and receipients (to)
  • npm run send to generate ./out/index.html and have it emailed

Known issues

  • Only works on Mac OS (download dir is hardcoded, not tested on other platforms)

Basic design

design

Donate

paypal

cheddardog's People

Contributors

dependabot[bot] avatar skhavari avatar skhavarisc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cheddardog's Issues

Error: ENOENT: no such file or directory, open 'out\txndb.json'

Hi. This is an extremely helpful script. Unfortunately, I keep getting the same error each time I run it.

I start the script with, 'npm run refresh'.
The script runs.
It opens up the browser and successfully logs in to my bank.
It navigates to the correct page and downloads the transactions.
Then, it ends with an error code.

Here is the output of the script:

[email protected] refresh D:\Google Drive\Finances\Automate transaction downloads\cheddardog_2
node dist/src/refresh.js

Refresh configuration:
√ refresh configuration read. Will refresh 1 accounts

Starting cheddardog v2.2.77:
√ browser launched
√ page created

Fetching BofA Transactions:
√ rm -rf C:\Users\danny\Downloads\stmt*.csv
https://www.bankofamerica.com loaded
√ username entered
√ password entered
√ signed in
√ account page loaded
√ download form opened
√ file type selected
√ custom date range 11/29/2019 to 01/29/2020 configured
√ download complete
√ statement loaded
√ loaded 51 transactions

❌ Error: ENOENT: no such file or directory, open 'out\txndb.json'
❌ Error: ENOENT: no such file or directory, open 'out\txndb.json'
at Object.openSync (fs.js:440:3)
at Object.readFileSync (fs.js:342:35)
at Function.load (D:\Google Drive\Finances\Automate transaction downloads\cheddardog_2\dist\src\store\store.js:40:36)
at Function.update (D:\Google Drive\Finances\Automate transaction downloads\cheddardog_2\dist\src\store\store.js:48:26)
at D:\Google Drive\Finances\Automate transaction downloads\cheddardog_2\dist\src\refresh.js:19:19
npm ERR! code ELIFECYCLE
npm ERR! errno 4294967295
npm ERR! [email protected] refresh: node dist/src/refresh.js
npm ERR! Exit status 4294967295
npm ERR!
npm ERR! Failed at the [email protected] refresh script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\danny\AppData\Roaming\npm-cache_logs\2020-01-29T13_45_05_191Z-debug.log
PS D:\Google Drive\Finances\Automate transaction downloads\cheddardog_2>

I've attached the log file:
2020-01-29T13_45_05_191Z-debug.log

Thanks for any help you can provide in getting past this error.

Per account stats

Include per account stats in the report

  • balances per account
  • 1/7/14/28 day spending per account (do we need this?)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.