Metadata-Version: 2.5
Name: braavos
Version: 0.2.1
Summary: Data analytics on your bank account data
Project-URL: Repository, https://git.marut.network/exler/braavos
Project-URL: Issues, https://git.marut.network/exler/braavos/issues
Author-email: Kamil Marut <kamil@kamilmarut.com>
License-File: LICENSE
Keywords: analytics,banking,finance,open-banking,tui
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Office/Business :: Financial
Requires-Python: >=3.12
Requires-Dist: niquests>=3.21.0
Requires-Dist: pyjwt[crypto]>=2.13.0
Requires-Dist: rich>=15.0.0
Requires-Dist: textual>=8.2.8
Requires-Dist: typer>=0.27.1
Description-Content-Type: text/markdown

# braavos

<p align="center">
    <img align="center" src="https://git.marut.network/exler/braavos/raw/branch/main/docs/logo.png" width="128">
    <p align="center">🏦 Data analytics on your bank account data</p>
</p>

## Features

- A terminal TUI over the [Enable Banking API](https://enablebanking.com/).
- View, filter and sort your transaction history
- Categorize each transaction with custom rules

## Setup

1. Generate a key and register an application (sandbox to start) at
   [enablebanking.com](https://enablebanking.com/applications/):

```sh
openssl genrsa -out braavos.pem 2048
openssl req -new -x509 -key braavos.pem -out braavos.crt -days 365 -subj "/CN=braavos"
```

Upload `braavos.crt`, note the application ID,
and register the default redirect URL (https://enablebanking.com/auth_redirect) - you can then paste the redirected URL back into the CLI.

You can also choose to generate the new key in the browser and download it as a `.pem` file.

`init` copies the key into `~/.config/braavos/private_key.pem` (mode `0600`)
rather than remembering where you left it, so afterwards the original can be archived offline or deleted.

2. Install

The `braavos` CLI is available on [PyPi](https://pypi.org/project/braavos/) and can be installed via `pip`.

```sh
pip install braavos
# or via uv:
uv tool install braavos
```

3. Get started with the app

```sh
braavos init          # copies key + app ID into ~/.config/braavos/
braavos connect       # bank consent in the browser, paste redirect URL back
braavos sync          # pull transactions into the local SQLite cache
braavos               # open the TUI
```

`~/.config/braavos/` (mode `0700`) then holds your private key and your full
transaction history. Back it up; don't sync it to a shared drive.

## Development

Install the development dependencies and run the CLI from source:

```sh
uv sync
uv run braavos
```

## Categories

Spending categories live in the local database and are managed in the TUI's
**Categories** tab.

A category doesn't need a rule. One with no keywords is simply never assigned
automatically, which is what you want for something you only ever tag by hand.

Keywords match case-insensitively as plain substrings against counterparty and
description; first match wins, everything else lands in `Other` (which can't be
renamed or deleted). Ruled categories are tried in the order they were created and
listed in that order, so a narrow rule you want to win should be created before a
broad one; editing a rule keeps its place.

Every transaction's category is stored, and saving a rule re-categorises all history
immediately.

### Overriding a single transaction

Press `c` (or Enter) on a transaction to pick its category from a list. A category you
chose by hand is shown in yellow and is never touched by rule changes again — pick
**— automatic (rules) —** to hand it back to the keyword rules.

## License

Copyright (c) 2026 by Kamil Marut

`braavos` is under the terms of the MIT License, following all clarifications stated in the license file.
