A CLI script suite to automate MoneyLover transaction submission flows. Provides tools to parse Excel inputs, transform them and submit them to the MoneyLover app.
npm install
to install all dependencies- Retrieve the
ACCESS_TOKEN
by checking the network request Authorization header in the MoneyLover web app - Create an
.env
file with theACCESS_TOKEN
field. Paste in the access token from the previous step without theAuthJWT
prefix.
ACCESS_TOKEN=<access tokekn>
- See Usage guide to prepare & submit data using the tool
The expected data to be passed in to the submission flow is expected to be a JSON file on format:
[{
"amount": 123,
"description": "Transaction",
"date": "2023-06-24",
"category": "Category"
}, {
"amount": 124,
"description": "Transaction2",
"date": "2023-01-04",
"category": "Category2"
}, ...]
The below scripts assist in data preparation:
npm start parse-excel <input-path> <output-path>
Parses an Excel file from the input path to the output path. The output is a transaction format supported for the submission flow. Currently, only one type of parsing format is supported (see parsing.ts
for details)
npm start label-categories <input-path>
Takes in a transactions file (generated by parse-excel
) and prompts the user to fill in all UNKNOWN
categories. The transactions file is re-saved on each input.
npm start rollup-transactions <input-path>
Takes in a transactions file and rolls up all transactions of the same category on the same day to one aggregate transaction.
npm start dump-categories <output-path>
Dumps the defined MoneyLover categories for the first user wallet to the target text file. Useful to get the file handy locally.
npm start post-transactions <input-path>
Takes in a transactions file (as expected from the previous section) and submits them to the MoneyLover user's first wallet.
- Integrate zod parsing
- Continue processing transactions on errors
- Allow wallet input