Giter VIP home page Giter VIP logo

lunchmoney-amazon's Introduction

Enhance Amazon Transactions in LunchMoney

LunchMoney is a indie-developed personal finance application. I spend a lot on amazon, and always thought it would be neat to break open the massive black bucket of money that's funneled into Amazon to understand what categories of spending it represents.

The trick is, Amazon doesn't have an order export. There's a sneaky extension that allows you to export your orders to a CSV file. This tool ingests that CSV and categorizes your Amazon transactions in Lunch Money.

Setup

  1. asdf install and npm install to setup node & npm packages
  2. Optional: tsc . to compile the typescript

Usage

  1. Use the amazon order scraper to pull your amazon history.
    1. Do not use the "show items not orders"
  2. Get a lunch money API key. Run cp .env-example .env and add your API key to .env, or input it directly via the command line.
Usage: amazon-lunchmoney [options]

Options:
  -v, --verbose                      output verbose logs
  -f, --file <path>                  amazon history file
  -k --lunch-money-key <key>         lunch money api key
  -m --mapping-file <path>           category mapping file
  -d, --dry-run                      dry run mode (default: false)
  -n, --owner-name <name>            the name of the owner of the account, used to determine if a order is a gift
  -c, --default-category <category>  default category
  -h, --help                         display help for command

Here's an example command:

node out/run.js -f '~/Downloads/amazon_order_history.csv' -c Shopping -n "Michael Bianco"

Development

Development with bun is easier:

bun run.ts --help

TODO

  • Indicate which purchases are HSA/FSA eligible and maybe generate receipt?
  • publish on npm
  • Should match up refunds and categorize them appropriately
  • add item name to notes

lunchmoney-amazon's People

Contributors

iloveitaly avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

lunchmoney-amazon's Issues

No Prettier config checked in

Because there is no .prettierrc file checked in and it appears the code has been formatted with different settings than my default Prettier config, when I run Prettier it causes a bunch of formatting changes.

@iloveitaly I know you don't have time to spend on this, but do you know what prettier config settings you were using? I'd be happy to open a PR to add them. I think I'd like to contribute some features to this project if I can get my dev environment to be happy :)

Update Usage instructions

I got further with using the bun instructions.

It seems like the setup instructions are out of date?

Happy to make a PR with some instructions from my experiences, but just not sure which one you're using yourself?

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.