A command-line tool for fetching transactions from Rogers/Wealthsimple and Scotiabank API storing them locally and syncing them to LunchMoney.
- Parse curl-like commands to fetch transactions
- Store transactions in a SQLite database
- Interactive REPL interface
- List stored transactions
- Reconciliation and upload to LunchMoney
-
Clone the repository
-
Build the application:
go build -o lunchmoney -
Rename
config.example.yamltoconfig.yamland add your key -
If you are going to use Scotia, you'll need to install
patchright(a modified version of playwright) to bypass Akamai logins.
# Install Patchright with Pip from PyPI
pip install patchright
# Install Chromium-Driver for Patchright
patchright install chromium
./lunchmoney repl
help- Show help messagelist- List all transactions in the databaseexitorquit- Exit the REPLfetch <provider>- Fetch recent transactions from a provider (rogers, wealthsimple, scotiabank)sync- Sync transactions to LunchMoney
Transactions are stored in a SQLite database located at ~/.lunchmoney/transactions.db by default. You can specify a different location using the --db flag:
./lunchmoney --db /path/to/database.db repl
The project includes a comprehensive test suite. To run the tests:
go test ./...
This will run all tests in the project. You can also run tests for a specific package:
go test ./pkg/models
go test ./pkg/http
go test ./pkg/services
go test ./db
This project uses GitHub Actions for continuous integration. The CI pipeline runs on every push to the main branch and on every pull request. It performs the following tasks:
- Runs all tests
- Lints the code using golangci-lint
The CI configuration is defined in .github/workflows/go.yml.
When adding new features, please also add corresponding tests. The project follows a standard Go testing approach:
- Create a file named
<filename>_test.goin the same package as the code being tested - Write test functions with the naming convention
TestXxxwhereXxxis the function being tested - Use the
testingpackage to write assertions
For testing components that have external dependencies, the project uses interface-based mocking:
db/mock_db.goprovides a mock implementation of the databasepkg/http/mock_lunchmoney.goprovides a mock implementation of the LunchMoney client