himynameisjonas/gocardless-lunchmoney
Sync EU/UK bank/credit card accounts with LunchMoney
GoCardless LunchMoney Integration
This project syncs EU/UK bank/credit card accounts with LunchMoney, allowing for seamless synchronization of bank transactions into the LunchMoney budgeting app. The integration leverages GoCardless for bank account data and Pushover for notifications.
Features
- List available banks for a given country.
- Create requisitions to authorize access to bank accounts.
- Sync bank accounts and transactions with LunchMoney.
- Notifications for expired requisitions and account issues via Pushover.
Installation (Using Docker and Docker Compose)
-
Create a
docker-compose.ymlfile with the following contents:services: gocardless-lunchmoney: restart: unless-stopped image: ghcr.io/himynameisjonas/gocardless-lunchmoney:latest env_file: - .env volumes: - /path/to/sqlite-file.db:/usr/src/app/db/bank_sync.db
-
Create a
.envfile in the same directory with the following environment variables:NORDIGEN_SECRET_ID=your_nordigen_secret_id NORDIGEN_SECRET_KEY=your_nordigen_secret_key LUNCH_MONEY_ACCESS_TOKEN=your_lunch_money_access_token PUSHOVER_TOKEN=your_pushover_token PUSHOVER_USER=your_pushover_user
-
Run the migrations to create the database tables:
docker compose run gocardless-lunchmoney migrate
-
Start the service:
This will start the sync service and run it in the background with a default interval of 8 hours.docker-compose up -d
Usage (Using Docker and Docker Compose)
List Available Banks
To list available banks for a given country (default is Sweden):
docker compose run gocardless-lunchmoney setup --list-banks [COUNTRY_CODE]Create Requisition
To create a new requisition for a bank:
docker compose run gocardless-lunchmoney setup --create-requisition INSTITUTION_IDRecreate Expired Requisition
To recreate a expired requisition:
docker compose run gocardless-lunchmoney setup --recreate-requisitionSync Accounts
To sync accounts from GoCardless:
docker compose run gocardless-lunchmoney setup --sync-accountsList Accounts
To list all accounts and their mapping to LunchMoney:
docker compose run gocardless-lunchmoney setup --list-accountsMap Account to LunchMoney Asset
To map a GoCardless account to a LunchMoney asset:
docker compose run gocardless-lunchmoney setup --map_account ACCOUNT_ID --map_asset ASSET_IDSync Transactions
To sync transactions:
docker compose run gocardless-lunchmoney syncDatabase Migrations
To run database migrations:
docker compose run gocardless-lunchmoney migrateContributing
Contributions are welcome! Please open an issue or submit a pull request.
License
This project is licensed under the MIT License. See the LICENSE file for details.