Fingrab

A CLI for exporting financial data from various banks.
Currently supports: Monzo, and Starling.
Table of Contents
Disclaimer
This project is not affiliated with or endorsed by Starling Bank or Monzo. It is an unofficial, independent, open-source implementation using their public APIs.
Installation
Install via Go
- Ensure you have Go 1.24 or later installed.
- Install the clu:
go install github.com/HallyG/fingrab@latest
From Source
- Ensure you have Go 1.24 or later installed.
- Clone the repository:
git clone https://github.com/hallyg/fingrab.git
cd fingrab
- Build the project:
make build
Using Docker
- Ensure you have Docker installed.
- Build the docker image:
make docker/build
Usage
Obtaining API Tokens
Monzo
- Go to Monzo Developer Portal.
- Log in to your Monzo developer account.
- Open the Monzo App and allow API Playground access to your account.
- Use the displayed access token.
Starling
- Go to Starling Developer Portal.
- Log in to your Starling developer account.
- Create a new personal access token.
- Use the generated access token.
Exporting Transactions
Monzo
# API Auth with cli flag
fingrab export monzo --token <monzo-api-token> --start 2025-03-01 --end 2025-03-31
# API Auth with env var
export MONZO_TOKEN=<monzo-api-token>
fingrab export monzo --start 2025-03-01 --end 2025-03-31
# Exporting to Moneydance format
fingrab export monzo --token <monzo-api-token> --start 2025-03-01 --end 2025-03-31 --format moneydance
# Verbose output
fingrab export monzo --token <monzo-api-token> --start 2025-03-01 --end 2025-03-31 --verbose
Starling
# API Auth with cli flag
fingrab export starling --token <starling-api-token> --start 2025-03-01 --end 2025-03-31
# API Auth with env var
export STARLING_TOKEN=<starling-api-token>
fingrab export starling --start 2025-03-01 --end 2025-03-31
# Exporting to Moneydance format
fingrab export starling --token <starling-api-token> --start 2025-03-01 --end 2025-03-31 --format moneydance
# Verbose output
fingrab export starling --token <starling-api-token> --start 2025-03-01 --end 2025-03-31 --verbose
Contributing
To add a new format for exporting financial data, follow these steps:
- Navigate to the
internal/format.
- Create a new Go file for your format (e.g.
exampleformat.go).
- Add a new format by implementing the
Formatter interface defined in format.go. For example:
package format
import (
"io"
"github.com/HallyG/fingrab/internal/domain"
)
const FormatTypeExample FormatType = "newformat"
type ExampleFormatter struct {
w io.Writer
}
func NewExampleFormatter(w io.Writer) *ExampleFormatter {
return &ExampleFormatter{w: w}
}
func (e *ExampleFormatter) WriteHeader() error {
_, err := e.w.Write([]byte("header content\n"))
return err
}
func (e *ExampleFormatter) WriteTransaction(transaction *domain.Transaction) error {
_, err := e.w.Write([]byte("transaction content\n"))
return err
}
func (e *ExampleFormatter) Flush() error {
return nil
}
func init() {
Register(FormatTypeExample, func(w io.Writer) Formatter {
return NewExampleFormatter(w)
})
}
- Ensure the init function registers the new format with a unique
FormatType.
License
This project is licensed under the MIT License. See the LICENSE file for details.