A CLI for exporting financial data from various banks.
Currently supports: Monzo, and Starling.
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.
- Ensure you have Go 1.24 or later installed.
- Install the clu:
go install github.com/HallyG/fingrab@latest
- 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
- Ensure you have Docker installed.
- Build the docker image:
make docker/build
- 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.
- Go to Starling Developer Portal.
- Log in to your Starling developer account.
- Create a new personal access token.
- Use the generated access token.
# API Auth with cli flag
fingrab monzo transactions --token <monzo-api-token> --start 2025-03-01 --end 2025-03-31
# API Auth with env var
export MONZO_TOKEN=<monzo-api-token>
fingrab monzo transactions --start 2025-03-01 --end 2025-03-31
# API Auth with OAuth2 env var
export MONZO_CLIENT_ID=<monzo-client-id>
export MONZO_CLIENT_SECRET=<monzo-client-secret>
fingrab monzo transactions --start 2025-03-01 --end 2025-03-31
# Exporting to Moneydance format
fingrab monzo transactions --token <monzo-api-token> --start 2025-03-01 --end 2025-03-31 --format moneydance
# Verbose logging
fingrab monzo transactions --token <monzo-api-token> --start 2025-03-01 --end 2025-03-31 --verbose
# Logging without colour
fingrab monzo transactions --token <monzo-api-token> --start 2025-03-01 --end 2025-03-31 --verbose --no-colour# API Auth with cli flag
fingrab starling transactions --token <starling-api-token> --start 2025-03-01 --end 2025-03-31
# API Auth with env var
export STARLING_TOKEN=<starling-api-token>
fingrab starling transactions --start 2025-03-01 --end 2025-03-31
# API Auth with OAuth2 env var
export STARLING_CLIENT_ID=<starling-client-id>
export STARLING_CLIENT_SECRET=<starling-client-secret>
fingrab starling transactions --start 2025-03-01 --end 2025-03-31
# Exporting to Moneydance format
fingrab starling transactions --token <starling-api-token> --start 2025-03-01 --end 2025-03-31 --format moneydance
# Verbose logging
fingrab starling transactions --token <starling-api-token> --start 2025-03-01 --end 2025-03-31 --verbose
# Logging without colour
fingrab starling transactions --token <starling-api-token> --start 2025-03-01 --end 2025-03-31 --verbose --no-colourTo 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
Formatterinterface defined informat.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.
This project is licensed under the MIT License. See the LICENSE file for details.