llmopenfinance 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- llmopenfinance-0.1.1/LICENSE +21 -0
- llmopenfinance-0.1.1/PKG-INFO +298 -0
- llmopenfinance-0.1.1/README.md +274 -0
- llmopenfinance-0.1.1/pyproject.toml +75 -0
- llmopenfinance-0.1.1/setup.cfg +4 -0
- llmopenfinance-0.1.1/src/llmopenfinance/__init__.py +3 -0
- llmopenfinance-0.1.1/src/llmopenfinance/__main__.py +889 -0
- llmopenfinance-0.1.1/src/llmopenfinance/agent.py +211 -0
- llmopenfinance-0.1.1/src/llmopenfinance/analytics.py +774 -0
- llmopenfinance-0.1.1/src/llmopenfinance/categorize.py +319 -0
- llmopenfinance-0.1.1/src/llmopenfinance/chat.py +342 -0
- llmopenfinance-0.1.1/src/llmopenfinance/connect.py +272 -0
- llmopenfinance-0.1.1/src/llmopenfinance/constants.py +50 -0
- llmopenfinance-0.1.1/src/llmopenfinance/i18n.py +157 -0
- llmopenfinance-0.1.1/src/llmopenfinance/messages_en.py +318 -0
- llmopenfinance-0.1.1/src/llmopenfinance/messages_pt.py +322 -0
- llmopenfinance-0.1.1/src/llmopenfinance/pluggy.py +377 -0
- llmopenfinance-0.1.1/src/llmopenfinance/session.py +341 -0
- llmopenfinance-0.1.1/src/llmopenfinance/store.py +797 -0
- llmopenfinance-0.1.1/src/llmopenfinance/sync.py +299 -0
- llmopenfinance-0.1.1/src/llmopenfinance/tools.py +445 -0
- llmopenfinance-0.1.1/src/llmopenfinance/ui.py +544 -0
- llmopenfinance-0.1.1/src/llmopenfinance/web.py +699 -0
- llmopenfinance-0.1.1/src/llmopenfinance/web_page.py +798 -0
- llmopenfinance-0.1.1/src/llmopenfinance/web_stream.py +178 -0
- llmopenfinance-0.1.1/src/llmopenfinance.egg-info/PKG-INFO +298 -0
- llmopenfinance-0.1.1/src/llmopenfinance.egg-info/SOURCES.txt +45 -0
- llmopenfinance-0.1.1/src/llmopenfinance.egg-info/dependency_links.txt +1 -0
- llmopenfinance-0.1.1/src/llmopenfinance.egg-info/entry_points.txt +3 -0
- llmopenfinance-0.1.1/src/llmopenfinance.egg-info/requires.txt +9 -0
- llmopenfinance-0.1.1/src/llmopenfinance.egg-info/top_level.txt +1 -0
- llmopenfinance-0.1.1/tests/test_agent.py +282 -0
- llmopenfinance-0.1.1/tests/test_analytics.py +472 -0
- llmopenfinance-0.1.1/tests/test_catalog.py +228 -0
- llmopenfinance-0.1.1/tests/test_categorize.py +147 -0
- llmopenfinance-0.1.1/tests/test_chat.py +279 -0
- llmopenfinance-0.1.1/tests/test_cli.py +1630 -0
- llmopenfinance-0.1.1/tests/test_connect.py +165 -0
- llmopenfinance-0.1.1/tests/test_i18n.py +222 -0
- llmopenfinance-0.1.1/tests/test_pluggy.py +246 -0
- llmopenfinance-0.1.1/tests/test_session.py +495 -0
- llmopenfinance-0.1.1/tests/test_store.py +249 -0
- llmopenfinance-0.1.1/tests/test_sync.py +197 -0
- llmopenfinance-0.1.1/tests/test_tools.py +445 -0
- llmopenfinance-0.1.1/tests/test_ui.py +747 -0
- llmopenfinance-0.1.1/tests/test_web.py +1635 -0
- llmopenfinance-0.1.1/tests/test_web_page_js.py +262 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Jorge Albuquerque
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: llmopenfinance
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: Console chat with an LLM financial assistant over your Open Finance (Pluggy) data
|
|
5
|
+
Author: Jorge Albuquerque
|
|
6
|
+
License: MIT
|
|
7
|
+
Keywords: open finance,pluggy,llm,pyllmrouter,ollama,claude,duckdb,personal finance
|
|
8
|
+
Classifier: Development Status :: 3 - Alpha
|
|
9
|
+
Classifier: Environment :: Console
|
|
10
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
12
|
+
Requires-Python: >=3.12
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Requires-Dist: duckdb>=2.0.1
|
|
16
|
+
Requires-Dist: httpx>=0.28.1
|
|
17
|
+
Requires-Dist: pyllmrouter[all]>=0.4.2
|
|
18
|
+
Requires-Dist: rich>=15.0.0
|
|
19
|
+
Requires-Dist: typer>=0.29.2
|
|
20
|
+
Provides-Extra: web
|
|
21
|
+
Requires-Dist: flask>=3.1.3; extra == "web"
|
|
22
|
+
Requires-Dist: waitress>=3.0.2; extra == "web"
|
|
23
|
+
Dynamic: license-file
|
|
24
|
+
|
|
25
|
+
# llm open finance
|
|
26
|
+
|
|
27
|
+
Talk to your own bank data from the terminal. `llmopenfinance` is a web chat with an LLM financial assistant
|
|
28
|
+
(**Claude**, **Codex**, **Gemini** (no paid API, using only regular OAUTH sign-in) or a local **Ollama** / **llama.cpp**
|
|
29
|
+
model (recommended for privacy), all through [pyllmrouter](https://github.com/fortalbrz/pyllmrouter)). It answers questions about your accounts, credit cards, investments and
|
|
30
|
+
loans, using data pulled through:
|
|
31
|
+
|
|
32
|
+
- **Open Finance US** via [Teller](https://teller.io/).
|
|
33
|
+
- **Open Finance Brasil** via [Pluggy](https://pluggy.ai).
|
|
34
|
+
|
|
35
|
+
The responses are consistent (and free of hallucinations), generated by a local, deterministic SQL process.
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
- [[Documentação em Português (pt-BR)](README.pt-BR.md)]
|
|
39
|
+
|
|
40
|
+

|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
```text
|
|
45
|
+
$ llmopenfinance
|
|
46
|
+
Financial assistant ready. Commands: /help /summary (data sent to the model) /sync /reset /history exit
|
|
47
|
+
======================================================================
|
|
48
|
+
|
|
49
|
+
You: Which subscriptions do I have?
|
|
50
|
+
|
|
51
|
+
Assistant:
|
|
52
|
+
↳ consultando detect_subscriptions(months=12)
|
|
53
|
+
| Service | Value | Last charge | Annual cost |
|
|
54
|
+
|---------|---------|-----------------|-------------|
|
|
55
|
+
| Netflix | $ 8.99 | 2026-11-08 | $ 107.88 |
|
|
56
|
+
| Spotify | $ 6.99 | 2026-11-12 | $ 83.88 |
|
|
57
|
+
...
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Example questions (answers are in Brazilian Portuguese by default; set `LLMOPENFINANCE_LANG=en` for English,
|
|
61
|
+
see [Language](#language)):
|
|
62
|
+
|
|
63
|
+
- *what services do I subscribe to?*
|
|
64
|
+
- *how much do I spend on online shopping each month?*
|
|
65
|
+
- *how can I improve my finances?*
|
|
66
|
+
- *what were my 3 largest expenses in November?*
|
|
67
|
+
- *how much is left on my loan, and what is its total effective cost?*
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
## Open Finance US
|
|
71
|
+
|
|
72
|
+
- TODO
|
|
73
|
+
|
|
74
|
+
## Open Finance Brasil
|
|
75
|
+
|
|
76
|
+
### Connecting Banks in "My Pluggy" and Generating Tokens (Brazilian Open Finance)
|
|
77
|
+
|
|
78
|
+
Before you begin:
|
|
79
|
+
1. Connect your bank accounts via Open Finance in **Meu Pluggy** ( [meu.pluggy.ai](https://meu.pluggy.ai) ) - Brazilian Open Finance.
|
|
80
|
+
2. Obtain your credentials (`Client ID` and `Client Secret`) from the **Pluggy Dashboard** ( [dashboard.pluggy.ai](https://dashboard.pluggy.ai) ).
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
### Part 1: How to connect your banks via Open Finance (`meu.pluggy.ai`)
|
|
85
|
+
|
|
86
|
+
**Meu Pluggy** ( [meu.pluggy.ai](https://meu.pluggy.ai) ) is Pluggy’s free portal designed for **personal use** (tracking expenses, populating spreadsheets, feeding your own systems, or providing data to AI agents using information from your own accounts).
|
|
87
|
+
|
|
88
|
+
> **Important:** Pluggy is an institution regulated by the Central Bank of Brazil. Data sharing is handled directly through your bank’s official Open Finance flow.
|
|
89
|
+
|
|
90
|
+
#### Step 1: Create your "Meu Pluggy" account
|
|
91
|
+
1. Go to [https://meu.pluggy.ai](https://meu.pluggy.ai).
|
|
92
|
+
2. Create a new account using your **email** and a **password**.
|
|
93
|
+
3. Registration is immediate (self-service); no invitation or manual approval is required.
|
|
94
|
+
|
|
95
|
+
#### Step 2: Initiate the connection with your bank
|
|
96
|
+
1. Once logged into the "Meu Pluggy" dashboard, click the **"Connect My Account"** button.
|
|
97
|
+
2. In the list of financial institutions, search for and select the bank you wish to connect (e.g., Nubank, Itaú, Inter, Banco do Brasil, Bradesco, Santander, etc.).
|
|
98
|
+
|
|
99
|
+
#### Step 3: Authorize data sharing via Open Finance
|
|
100
|
+
1. You will be automatically redirected to your bank’s **official app or website**.
|
|
101
|
+
2. Log in to your bank as you normally would and review the data-sharing permissions (balances, statements, cards, investments).
|
|
102
|
+
3. Confirm the authorization within your bank’s interface.
|
|
103
|
+
|
|
104
|
+
> ⚠️ **Important (Common cause of errors):** Stay on the final confirmation screen provided by your bank and **wait for the automatic redirect back to Meu Pluggy**. Closing the app or navigating back manually before the process is complete will cancel the connection.
|
|
105
|
+
|
|
106
|
+
#### Step 4: Verify that the connection is complete
|
|
107
|
+
1. Once back on the Meu Pluggy dashboard, check that the account appears in your list, showing both your **balance** and **transaction history (statement)**.
|
|
108
|
+
2. If the account does not appear, please repeat the authorization process.
|
|
109
|
+
3. Do you have accounts at other banks? Simply click **"Connect My Account"** again and repeat the process for each institution.
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
### Part 2: How to create credentials and generate tokens (`dashboard.pluggy.ai`)
|
|
114
|
+
|
|
115
|
+
To consume data via the API (or integrate it into external tools), you will need to create an application in the **Pluggy Dashboard**, obtain your credentials, and generate an authentication token.
|
|
116
|
+
|
|
117
|
+
#### Step 1: Create your Dashboard account
|
|
118
|
+
1. Go to [https://dashboard.pluggy.ai](https://dashboard.pluggy.ai).
|
|
119
|
+
2. Register your account — **it is recommended to use the same email address** you registered with on `meu.pluggy.ai`.
|
|
120
|
+
3. *Note:* If a notice regarding a trial period (e.g., 15 days) appears, you can disregard it for the personal use flow integrated with "Meu Pluggy."
|
|
121
|
+
|
|
122
|
+
#### Step 2: Create an Application
|
|
123
|
+
1. In the Dashboard menu, go to the **Applications** section and click to create a new application.
|
|
124
|
+
2. Give it an identifying name (e.g., `My Personal Finances`).
|
|
125
|
+
3. A single application is sufficient to access all the bank accounts you connected in Part 1.
|
|
126
|
+
|
|
127
|
+
#### Step 3: Copy the `Client ID` and `Client Secret`
|
|
128
|
+
1. Open the newly created application and go to the **"Application"** tab (or the credentials settings section).
|
|
129
|
+
2. Locate and copy the following two values:
|
|
130
|
+
- **`Client ID`**: The unique identifier for the application (in UUID format).
|
|
131
|
+
- **`Client Secret`**: The application's secret key (new keys typically begin with `pluggy_sk_`).
|
|
132
|
+
|
|
133
|
+
> 🔒 **Security best practices:**
|
|
134
|
+
> - The `Client Secret` may only be displayed **once**—at the moment of creation. Store it in a secure location (such as a password manager or an `.env` file). If you lose it, you will need to rotate it or generate a new one via the Dashboard. > - **Never** expose the `Client Secret` in front-end code, mobile applications, or public repositories (GitHub).
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
## Quick start
|
|
139
|
+
|
|
140
|
+
```powershell
|
|
141
|
+
# 1. Install (uv only)
|
|
142
|
+
uv sync
|
|
143
|
+
|
|
144
|
+
# 2. Credentials (Pluggy application clientId/clientSecret from dashboard.pluggy.ai)
|
|
145
|
+
$env:PLUGGY_USERNAME = "<clientId>"
|
|
146
|
+
$env:PLUGGY_PASSWORD = "<clientSecret>"
|
|
147
|
+
|
|
148
|
+
# 3. One LLM provider (see "LLM providers" below): an API key, a sign-in or a local server
|
|
149
|
+
$env:ANTHROPIC_API_KEY = "<key>" # e.g. Claude through the Anthropic API
|
|
150
|
+
|
|
151
|
+
# 4. Connect your banks (MeuPluggy, free for personal use) — see docs/pluggy-setup.md
|
|
152
|
+
uv run llmopenfinance items add <item-id> # item ids copied from the Pluggy dashboard
|
|
153
|
+
# or: uv run llmopenfinance connect # opens the Pluggy Connect widget in your browser
|
|
154
|
+
|
|
155
|
+
# 5. Chat (syncs first)
|
|
156
|
+
uv run llmopenfinance # auto-detects the first usable provider
|
|
157
|
+
uv run llmopenfinance --provider anthropic # a specific provider
|
|
158
|
+
uv run llmopenfinance --provider ollama --model qwen3.5:9b # 100% local
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## LLM providers
|
|
162
|
+
|
|
163
|
+
The LLM layer is [pyllmrouter](https://github.com/fortalbrz/pyllmrouter), which is the only LLM service this project uses
|
|
164
|
+
(it is installed from GitHub with the project: `uv sync`). Pick the provider with `--provider <name>`, the
|
|
165
|
+
`LLMOPENFINANCE_PROVIDER` variable, or leave it out to let pyllmrouter auto-detect.
|
|
166
|
+
|
|
167
|
+
| `--provider` | Backend | Needs |
|
|
168
|
+
|---|---|---|
|
|
169
|
+
| `claude-agent-token` | Claude Agent SDK, long-lived token | `CLAUDE_CODE_OAUTH_TOKEN` |
|
|
170
|
+
| `claude-agent-login` | Claude Agent SDK, Claude CLI login | `claude auth login` |
|
|
171
|
+
| `anthropic` (alias `claude`) | Anthropic Messages API | `ANTHROPIC_API_KEY` |
|
|
172
|
+
| `gemini` | Gemini API | `GEMINI_API_KEY` |
|
|
173
|
+
| `antigravity` | Gemini through the Antigravity CLI (`agy`) | `agy` signed in |
|
|
174
|
+
| `codex` | OpenAI Codex (ChatGPT plan or API key) | `codex login` |
|
|
175
|
+
| `ollama` | Local Ollama server | a running server (`OLLAMA_SERVER`) |
|
|
176
|
+
| `llamacpp` | Local llama.cpp `llama-server` | a running server (`LLAMACPP_SERVER`) |
|
|
177
|
+
|
|
178
|
+
- **Chosen explicitly** (`--provider`, or `LLMOPENFINANCE_PROVIDER`): that provider is used, never replaced. An unknown
|
|
179
|
+
name stops the program with exit status 2 and the list of valid names; an unusable one (missing key, SDK or server)
|
|
180
|
+
is reported before the chat starts.
|
|
181
|
+
- **Not chosen** (or `auto`): pyllmrouter reads its own `LLMROUTER_PROVIDER` variable and otherwise probes the providers
|
|
182
|
+
in the order of the table and uses the first one that works. A machine with `ANTHROPIC_API_KEY` set therefore picks
|
|
183
|
+
Claude; use `--provider ollama` to stay local.
|
|
184
|
+
- `--model` (or the provider's own variable, e.g. `OLLAMA_MODEL`) picks the model; empty means the provider's default.
|
|
185
|
+
- `uv run pyllmrouter providers` shows why each provider is or is not available. pyllmrouter accepts more aliases
|
|
186
|
+
(`llama.cpp`, `google`, ...): `uv run pyllmrouter describe` lists them all.
|
|
187
|
+
- pyllmrouter is a plain chat API, so the tools are called through a small text protocol that works the same on every
|
|
188
|
+
provider (see [docs/architecture.md](docs/architecture.md#how-tools-are-called)). Small local models follow it less
|
|
189
|
+
reliably than the large hosted ones.
|
|
190
|
+
|
|
191
|
+
## Commands
|
|
192
|
+
|
|
193
|
+
| Command | What it does |
|
|
194
|
+
|---|---|
|
|
195
|
+
| `llmopenfinance` / `llmopenfinance chat` | Interactive chat. Syncs first; skip with `--no-sync` |
|
|
196
|
+
| `llmopenfinance server [--host H] [--port N]` | Serves the same chat as a local web page (needs `uv sync --extra web`) |
|
|
197
|
+
| `llmopenfinance ask "pergunta"` | Asks one question and exits |
|
|
198
|
+
| `llmopenfinance sync [--force]` | Downloads accounts, transactions, card bills, investments and loans |
|
|
199
|
+
| `llmopenfinance status` | Shows connections, consent expiry dates and local row counts |
|
|
200
|
+
| `llmopenfinance connect [--sandbox]` | Connects accounts through the Pluggy Connect widget on a local page |
|
|
201
|
+
| `llmopenfinance items add/list/remove` | Manages the registered Pluggy item ids |
|
|
202
|
+
|
|
203
|
+
Global options: `--provider <pyllmrouter provider>|auto`, `--model <id>`, `--db <file>`, `-v`.
|
|
204
|
+
See [docs/usage.md](docs/usage.md) for the full reference.
|
|
205
|
+
|
|
206
|
+
## Language
|
|
207
|
+
|
|
208
|
+
The application speaks Brazilian Portuguese (`pt-BR`, the default) or English (`en`): the command help, every message,
|
|
209
|
+
the assistant's system prompt and its answers. Pick one with the `LLMOPENFINANCE_LANG` environment variable. There is
|
|
210
|
+
no command-line option for it.
|
|
211
|
+
|
|
212
|
+
```powershell
|
|
213
|
+
$env:LLMOPENFINANCE_LANG = "en" # or "pt-BR"
|
|
214
|
+
uv run llmopenfinance
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
- English shows money as `R$ 1,234.56` and dates as `YYYY-MM-DD`. Portuguese keeps `R$ 1.234,56` and `DD/MM/AAAA`.
|
|
218
|
+
- An unsupported value stops the program with a short message on stderr and exit status 2.
|
|
219
|
+
- Stored data such as category labels (`Alimentação`) is never translated, and the chat commands of both languages
|
|
220
|
+
(`/ajuda` and `/help`, `/resumo` and `/summary`, `sair` and `exit`) work in either.
|
|
221
|
+
|
|
222
|
+
## Web chat
|
|
223
|
+
|
|
224
|
+
`llmopenfinance server` serves the same assistant as a chat page in your browser, with buttons for `/help`, `/summary`,
|
|
225
|
+
`/sync`, `/reset` and `/history` and a language that follows `LLMOPENFINANCE_LANG`. It needs the optional `web` extra
|
|
226
|
+
(Flask and Waitress):
|
|
227
|
+
|
|
228
|
+
```powershell
|
|
229
|
+
uv sync --extra web
|
|
230
|
+
uv run llmopenfinance server # syncs, prints a URL with a token and opens the browser
|
|
231
|
+
uv run llmopenfinance server --no-browser --no-sync --port 8123
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
Options: `--host` (default `127.0.0.1`), `--port` (`8000`), `--threads` (`4`, at least 2), `--browser/--no-browser`,
|
|
235
|
+
`--sync/--no-sync` and `--sql/--no-sql` (the last two work as in `chat`); the global `--provider` and `--model` choose
|
|
236
|
+
the LLM. Without the extra the command prints the install line and exits with status 1.
|
|
237
|
+
|
|
238
|
+
Security, in short (details in [docs/usage.md](docs/usage.md#server)):
|
|
239
|
+
|
|
240
|
+
- It listens on the loopback address only, unless you pass another `--host`; the page then travels over **plain HTTP**
|
|
241
|
+
and `server` prints a warning. With a wildcard host (`0.0.0.0`, `::`) the token alone protects access.
|
|
242
|
+
- Every launch creates a new secret token. The URL with the token (`http://127.0.0.1:8000/?token=...`) is printed once
|
|
243
|
+
and never logged; the browser keeps it in an `HttpOnly` cookie and the address bar drops it.
|
|
244
|
+
- Requests whose `Host` header is not this server are refused (DNS-rebinding defence).
|
|
245
|
+
- One server process holds one conversation, shared by every tab. A request that arrives while the assistant is busy is
|
|
246
|
+
refused with "busy"; requests are not queued.
|
|
247
|
+
|
|
248
|
+
## How it works
|
|
249
|
+
|
|
250
|
+
```text
|
|
251
|
+
Pluggy API ──sync──▶ DuckDB (local) ──read-only──▶ tools ◀──tool calls── LLM (any pyllmrouter provider)
|
|
252
|
+
│ ▲
|
|
253
|
+
└──── financial snapshot (aggregates) ───────────────┘ system prompt
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
- **Sync** (`sync.py`) pulls each item's full history. It is incremental per item and skips unchanged items.
|
|
257
|
+
A failing item or product is reported, and the rest of the sync continues.
|
|
258
|
+
- **Local enrichment** (`categorize.py`):
|
|
259
|
+
- Every transaction gets a pt-BR category and a *kind*: expense, refund, income, transfer or investment.
|
|
260
|
+
- Card bill payments and transfers between your own accounts are never counted as spending.
|
|
261
|
+
- This works even after Pluggy's paid categorization stops at the end of the trial.
|
|
262
|
+
- **Assistant** (`agent.py`, `tools.py`, `analytics.py`):
|
|
263
|
+
- The system prompt carries a compact snapshot of your finances.
|
|
264
|
+
- The model calls deterministic SQL tools to get the details, so the numbers it gives come from your data.
|
|
265
|
+
- For remote providers there is also a guarded `run_sql` escape hatch (off by default for local ones).
|
|
266
|
+
|
|
267
|
+
Details: [docs/architecture.md](docs/architecture.md).
|
|
268
|
+
|
|
269
|
+
## Privacy
|
|
270
|
+
|
|
271
|
+
With a local provider (`ollama` or `llamacpp`) nothing leaves your machine except the Pluggy sync itself. With any
|
|
272
|
+
other provider, the snapshot and the rows returned by tools are sent to that provider's service, and the chat prints a
|
|
273
|
+
notice saying so. Each tool result is capped at 100 rows, but `run_sql` (on by default for remote providers) can select
|
|
274
|
+
any column, including the full raw Pluggy record of a transaction. Use `--no-sql` to limit the model to the curated
|
|
275
|
+
tools. The local database
|
|
276
|
+
lives at `~/.llmopenfinance/finance.duckdb` (change it with `--db` or `LLMOPENFINANCE_DB`).
|
|
277
|
+
|
|
278
|
+
## Development
|
|
279
|
+
|
|
280
|
+
```powershell
|
|
281
|
+
uv run ruff format . ; uv run ruff check . ; uv run pyrefly check ; uv run pytest
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
The tests use synthetic Pluggy payloads, `httpx.MockTransport` and a pyllmrouter chat with a scripted backend, so they never touch the network.
|
|
285
|
+
The coverage gate is 90%. See [AGENTS.md](AGENTS.md).
|
|
286
|
+
|
|
287
|
+
## Author
|
|
288
|
+
|
|
289
|
+
- **[Jorge Albuquerque](mailto:quantamentalguy@gmail.com)**, Ph.D. [[LinkedIn](https://www.linkedin.com/in/jorgealbuquerque)] [[X](https://x.com/quantamentalguy)]
|
|
290
|
+
- GitHub: [fortalbrz/llmopenfinance](https://github.com/fortalbrz/llmopenfinance)
|
|
291
|
+
- Companion project: [fortalbrz/pyllmrouter](https://github.com/fortalbrz/pyllmrouter) – the LLM layer, reusable in other projects
|
|
292
|
+
- Also, check out the [ollama2cpp](https://github.com/fortalbrz/ollama2cpp) project for a simple and optimized migration from the local LLM server [ollama](https://ollama.com/) to [llama-cpp](https://llama-cpp.com/) (increase your local token generation rate by tunning algorithm).
|
|
293
|
+
|
|
294
|
+
## License
|
|
295
|
+
|
|
296
|
+
[MIT](LICENSE)
|
|
297
|
+
|
|
298
|
+
The companion project [pyllmrouter](https://github.com/fortalbrz/pyllmrouter) is MIT-licensed too.
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
# llm open finance
|
|
2
|
+
|
|
3
|
+
Talk to your own bank data from the terminal. `llmopenfinance` is a web chat with an LLM financial assistant
|
|
4
|
+
(**Claude**, **Codex**, **Gemini** (no paid API, using only regular OAUTH sign-in) or a local **Ollama** / **llama.cpp**
|
|
5
|
+
model (recommended for privacy), all through [pyllmrouter](https://github.com/fortalbrz/pyllmrouter)). It answers questions about your accounts, credit cards, investments and
|
|
6
|
+
loans, using data pulled through:
|
|
7
|
+
|
|
8
|
+
- **Open Finance US** via [Teller](https://teller.io/).
|
|
9
|
+
- **Open Finance Brasil** via [Pluggy](https://pluggy.ai).
|
|
10
|
+
|
|
11
|
+
The responses are consistent (and free of hallucinations), generated by a local, deterministic SQL process.
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
- [[Documentação em Português (pt-BR)](README.pt-BR.md)]
|
|
15
|
+
|
|
16
|
+

|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
$ llmopenfinance
|
|
22
|
+
Financial assistant ready. Commands: /help /summary (data sent to the model) /sync /reset /history exit
|
|
23
|
+
======================================================================
|
|
24
|
+
|
|
25
|
+
You: Which subscriptions do I have?
|
|
26
|
+
|
|
27
|
+
Assistant:
|
|
28
|
+
↳ consultando detect_subscriptions(months=12)
|
|
29
|
+
| Service | Value | Last charge | Annual cost |
|
|
30
|
+
|---------|---------|-----------------|-------------|
|
|
31
|
+
| Netflix | $ 8.99 | 2026-11-08 | $ 107.88 |
|
|
32
|
+
| Spotify | $ 6.99 | 2026-11-12 | $ 83.88 |
|
|
33
|
+
...
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Example questions (answers are in Brazilian Portuguese by default; set `LLMOPENFINANCE_LANG=en` for English,
|
|
37
|
+
see [Language](#language)):
|
|
38
|
+
|
|
39
|
+
- *what services do I subscribe to?*
|
|
40
|
+
- *how much do I spend on online shopping each month?*
|
|
41
|
+
- *how can I improve my finances?*
|
|
42
|
+
- *what were my 3 largest expenses in November?*
|
|
43
|
+
- *how much is left on my loan, and what is its total effective cost?*
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
## Open Finance US
|
|
47
|
+
|
|
48
|
+
- TODO
|
|
49
|
+
|
|
50
|
+
## Open Finance Brasil
|
|
51
|
+
|
|
52
|
+
### Connecting Banks in "My Pluggy" and Generating Tokens (Brazilian Open Finance)
|
|
53
|
+
|
|
54
|
+
Before you begin:
|
|
55
|
+
1. Connect your bank accounts via Open Finance in **Meu Pluggy** ( [meu.pluggy.ai](https://meu.pluggy.ai) ) - Brazilian Open Finance.
|
|
56
|
+
2. Obtain your credentials (`Client ID` and `Client Secret`) from the **Pluggy Dashboard** ( [dashboard.pluggy.ai](https://dashboard.pluggy.ai) ).
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
### Part 1: How to connect your banks via Open Finance (`meu.pluggy.ai`)
|
|
61
|
+
|
|
62
|
+
**Meu Pluggy** ( [meu.pluggy.ai](https://meu.pluggy.ai) ) is Pluggy’s free portal designed for **personal use** (tracking expenses, populating spreadsheets, feeding your own systems, or providing data to AI agents using information from your own accounts).
|
|
63
|
+
|
|
64
|
+
> **Important:** Pluggy is an institution regulated by the Central Bank of Brazil. Data sharing is handled directly through your bank’s official Open Finance flow.
|
|
65
|
+
|
|
66
|
+
#### Step 1: Create your "Meu Pluggy" account
|
|
67
|
+
1. Go to [https://meu.pluggy.ai](https://meu.pluggy.ai).
|
|
68
|
+
2. Create a new account using your **email** and a **password**.
|
|
69
|
+
3. Registration is immediate (self-service); no invitation or manual approval is required.
|
|
70
|
+
|
|
71
|
+
#### Step 2: Initiate the connection with your bank
|
|
72
|
+
1. Once logged into the "Meu Pluggy" dashboard, click the **"Connect My Account"** button.
|
|
73
|
+
2. In the list of financial institutions, search for and select the bank you wish to connect (e.g., Nubank, Itaú, Inter, Banco do Brasil, Bradesco, Santander, etc.).
|
|
74
|
+
|
|
75
|
+
#### Step 3: Authorize data sharing via Open Finance
|
|
76
|
+
1. You will be automatically redirected to your bank’s **official app or website**.
|
|
77
|
+
2. Log in to your bank as you normally would and review the data-sharing permissions (balances, statements, cards, investments).
|
|
78
|
+
3. Confirm the authorization within your bank’s interface.
|
|
79
|
+
|
|
80
|
+
> ⚠️ **Important (Common cause of errors):** Stay on the final confirmation screen provided by your bank and **wait for the automatic redirect back to Meu Pluggy**. Closing the app or navigating back manually before the process is complete will cancel the connection.
|
|
81
|
+
|
|
82
|
+
#### Step 4: Verify that the connection is complete
|
|
83
|
+
1. Once back on the Meu Pluggy dashboard, check that the account appears in your list, showing both your **balance** and **transaction history (statement)**.
|
|
84
|
+
2. If the account does not appear, please repeat the authorization process.
|
|
85
|
+
3. Do you have accounts at other banks? Simply click **"Connect My Account"** again and repeat the process for each institution.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
### Part 2: How to create credentials and generate tokens (`dashboard.pluggy.ai`)
|
|
90
|
+
|
|
91
|
+
To consume data via the API (or integrate it into external tools), you will need to create an application in the **Pluggy Dashboard**, obtain your credentials, and generate an authentication token.
|
|
92
|
+
|
|
93
|
+
#### Step 1: Create your Dashboard account
|
|
94
|
+
1. Go to [https://dashboard.pluggy.ai](https://dashboard.pluggy.ai).
|
|
95
|
+
2. Register your account — **it is recommended to use the same email address** you registered with on `meu.pluggy.ai`.
|
|
96
|
+
3. *Note:* If a notice regarding a trial period (e.g., 15 days) appears, you can disregard it for the personal use flow integrated with "Meu Pluggy."
|
|
97
|
+
|
|
98
|
+
#### Step 2: Create an Application
|
|
99
|
+
1. In the Dashboard menu, go to the **Applications** section and click to create a new application.
|
|
100
|
+
2. Give it an identifying name (e.g., `My Personal Finances`).
|
|
101
|
+
3. A single application is sufficient to access all the bank accounts you connected in Part 1.
|
|
102
|
+
|
|
103
|
+
#### Step 3: Copy the `Client ID` and `Client Secret`
|
|
104
|
+
1. Open the newly created application and go to the **"Application"** tab (or the credentials settings section).
|
|
105
|
+
2. Locate and copy the following two values:
|
|
106
|
+
- **`Client ID`**: The unique identifier for the application (in UUID format).
|
|
107
|
+
- **`Client Secret`**: The application's secret key (new keys typically begin with `pluggy_sk_`).
|
|
108
|
+
|
|
109
|
+
> 🔒 **Security best practices:**
|
|
110
|
+
> - The `Client Secret` may only be displayed **once**—at the moment of creation. Store it in a secure location (such as a password manager or an `.env` file). If you lose it, you will need to rotate it or generate a new one via the Dashboard. > - **Never** expose the `Client Secret` in front-end code, mobile applications, or public repositories (GitHub).
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
## Quick start
|
|
115
|
+
|
|
116
|
+
```powershell
|
|
117
|
+
# 1. Install (uv only)
|
|
118
|
+
uv sync
|
|
119
|
+
|
|
120
|
+
# 2. Credentials (Pluggy application clientId/clientSecret from dashboard.pluggy.ai)
|
|
121
|
+
$env:PLUGGY_USERNAME = "<clientId>"
|
|
122
|
+
$env:PLUGGY_PASSWORD = "<clientSecret>"
|
|
123
|
+
|
|
124
|
+
# 3. One LLM provider (see "LLM providers" below): an API key, a sign-in or a local server
|
|
125
|
+
$env:ANTHROPIC_API_KEY = "<key>" # e.g. Claude through the Anthropic API
|
|
126
|
+
|
|
127
|
+
# 4. Connect your banks (MeuPluggy, free for personal use) — see docs/pluggy-setup.md
|
|
128
|
+
uv run llmopenfinance items add <item-id> # item ids copied from the Pluggy dashboard
|
|
129
|
+
# or: uv run llmopenfinance connect # opens the Pluggy Connect widget in your browser
|
|
130
|
+
|
|
131
|
+
# 5. Chat (syncs first)
|
|
132
|
+
uv run llmopenfinance # auto-detects the first usable provider
|
|
133
|
+
uv run llmopenfinance --provider anthropic # a specific provider
|
|
134
|
+
uv run llmopenfinance --provider ollama --model qwen3.5:9b # 100% local
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## LLM providers
|
|
138
|
+
|
|
139
|
+
The LLM layer is [pyllmrouter](https://github.com/fortalbrz/pyllmrouter), which is the only LLM service this project uses
|
|
140
|
+
(it is installed from GitHub with the project: `uv sync`). Pick the provider with `--provider <name>`, the
|
|
141
|
+
`LLMOPENFINANCE_PROVIDER` variable, or leave it out to let pyllmrouter auto-detect.
|
|
142
|
+
|
|
143
|
+
| `--provider` | Backend | Needs |
|
|
144
|
+
|---|---|---|
|
|
145
|
+
| `claude-agent-token` | Claude Agent SDK, long-lived token | `CLAUDE_CODE_OAUTH_TOKEN` |
|
|
146
|
+
| `claude-agent-login` | Claude Agent SDK, Claude CLI login | `claude auth login` |
|
|
147
|
+
| `anthropic` (alias `claude`) | Anthropic Messages API | `ANTHROPIC_API_KEY` |
|
|
148
|
+
| `gemini` | Gemini API | `GEMINI_API_KEY` |
|
|
149
|
+
| `antigravity` | Gemini through the Antigravity CLI (`agy`) | `agy` signed in |
|
|
150
|
+
| `codex` | OpenAI Codex (ChatGPT plan or API key) | `codex login` |
|
|
151
|
+
| `ollama` | Local Ollama server | a running server (`OLLAMA_SERVER`) |
|
|
152
|
+
| `llamacpp` | Local llama.cpp `llama-server` | a running server (`LLAMACPP_SERVER`) |
|
|
153
|
+
|
|
154
|
+
- **Chosen explicitly** (`--provider`, or `LLMOPENFINANCE_PROVIDER`): that provider is used, never replaced. An unknown
|
|
155
|
+
name stops the program with exit status 2 and the list of valid names; an unusable one (missing key, SDK or server)
|
|
156
|
+
is reported before the chat starts.
|
|
157
|
+
- **Not chosen** (or `auto`): pyllmrouter reads its own `LLMROUTER_PROVIDER` variable and otherwise probes the providers
|
|
158
|
+
in the order of the table and uses the first one that works. A machine with `ANTHROPIC_API_KEY` set therefore picks
|
|
159
|
+
Claude; use `--provider ollama` to stay local.
|
|
160
|
+
- `--model` (or the provider's own variable, e.g. `OLLAMA_MODEL`) picks the model; empty means the provider's default.
|
|
161
|
+
- `uv run pyllmrouter providers` shows why each provider is or is not available. pyllmrouter accepts more aliases
|
|
162
|
+
(`llama.cpp`, `google`, ...): `uv run pyllmrouter describe` lists them all.
|
|
163
|
+
- pyllmrouter is a plain chat API, so the tools are called through a small text protocol that works the same on every
|
|
164
|
+
provider (see [docs/architecture.md](docs/architecture.md#how-tools-are-called)). Small local models follow it less
|
|
165
|
+
reliably than the large hosted ones.
|
|
166
|
+
|
|
167
|
+
## Commands
|
|
168
|
+
|
|
169
|
+
| Command | What it does |
|
|
170
|
+
|---|---|
|
|
171
|
+
| `llmopenfinance` / `llmopenfinance chat` | Interactive chat. Syncs first; skip with `--no-sync` |
|
|
172
|
+
| `llmopenfinance server [--host H] [--port N]` | Serves the same chat as a local web page (needs `uv sync --extra web`) |
|
|
173
|
+
| `llmopenfinance ask "pergunta"` | Asks one question and exits |
|
|
174
|
+
| `llmopenfinance sync [--force]` | Downloads accounts, transactions, card bills, investments and loans |
|
|
175
|
+
| `llmopenfinance status` | Shows connections, consent expiry dates and local row counts |
|
|
176
|
+
| `llmopenfinance connect [--sandbox]` | Connects accounts through the Pluggy Connect widget on a local page |
|
|
177
|
+
| `llmopenfinance items add/list/remove` | Manages the registered Pluggy item ids |
|
|
178
|
+
|
|
179
|
+
Global options: `--provider <pyllmrouter provider>|auto`, `--model <id>`, `--db <file>`, `-v`.
|
|
180
|
+
See [docs/usage.md](docs/usage.md) for the full reference.
|
|
181
|
+
|
|
182
|
+
## Language
|
|
183
|
+
|
|
184
|
+
The application speaks Brazilian Portuguese (`pt-BR`, the default) or English (`en`): the command help, every message,
|
|
185
|
+
the assistant's system prompt and its answers. Pick one with the `LLMOPENFINANCE_LANG` environment variable. There is
|
|
186
|
+
no command-line option for it.
|
|
187
|
+
|
|
188
|
+
```powershell
|
|
189
|
+
$env:LLMOPENFINANCE_LANG = "en" # or "pt-BR"
|
|
190
|
+
uv run llmopenfinance
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
- English shows money as `R$ 1,234.56` and dates as `YYYY-MM-DD`. Portuguese keeps `R$ 1.234,56` and `DD/MM/AAAA`.
|
|
194
|
+
- An unsupported value stops the program with a short message on stderr and exit status 2.
|
|
195
|
+
- Stored data such as category labels (`Alimentação`) is never translated, and the chat commands of both languages
|
|
196
|
+
(`/ajuda` and `/help`, `/resumo` and `/summary`, `sair` and `exit`) work in either.
|
|
197
|
+
|
|
198
|
+
## Web chat
|
|
199
|
+
|
|
200
|
+
`llmopenfinance server` serves the same assistant as a chat page in your browser, with buttons for `/help`, `/summary`,
|
|
201
|
+
`/sync`, `/reset` and `/history` and a language that follows `LLMOPENFINANCE_LANG`. It needs the optional `web` extra
|
|
202
|
+
(Flask and Waitress):
|
|
203
|
+
|
|
204
|
+
```powershell
|
|
205
|
+
uv sync --extra web
|
|
206
|
+
uv run llmopenfinance server # syncs, prints a URL with a token and opens the browser
|
|
207
|
+
uv run llmopenfinance server --no-browser --no-sync --port 8123
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
Options: `--host` (default `127.0.0.1`), `--port` (`8000`), `--threads` (`4`, at least 2), `--browser/--no-browser`,
|
|
211
|
+
`--sync/--no-sync` and `--sql/--no-sql` (the last two work as in `chat`); the global `--provider` and `--model` choose
|
|
212
|
+
the LLM. Without the extra the command prints the install line and exits with status 1.
|
|
213
|
+
|
|
214
|
+
Security, in short (details in [docs/usage.md](docs/usage.md#server)):
|
|
215
|
+
|
|
216
|
+
- It listens on the loopback address only, unless you pass another `--host`; the page then travels over **plain HTTP**
|
|
217
|
+
and `server` prints a warning. With a wildcard host (`0.0.0.0`, `::`) the token alone protects access.
|
|
218
|
+
- Every launch creates a new secret token. The URL with the token (`http://127.0.0.1:8000/?token=...`) is printed once
|
|
219
|
+
and never logged; the browser keeps it in an `HttpOnly` cookie and the address bar drops it.
|
|
220
|
+
- Requests whose `Host` header is not this server are refused (DNS-rebinding defence).
|
|
221
|
+
- One server process holds one conversation, shared by every tab. A request that arrives while the assistant is busy is
|
|
222
|
+
refused with "busy"; requests are not queued.
|
|
223
|
+
|
|
224
|
+
## How it works
|
|
225
|
+
|
|
226
|
+
```text
|
|
227
|
+
Pluggy API ──sync──▶ DuckDB (local) ──read-only──▶ tools ◀──tool calls── LLM (any pyllmrouter provider)
|
|
228
|
+
│ ▲
|
|
229
|
+
└──── financial snapshot (aggregates) ───────────────┘ system prompt
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
- **Sync** (`sync.py`) pulls each item's full history. It is incremental per item and skips unchanged items.
|
|
233
|
+
A failing item or product is reported, and the rest of the sync continues.
|
|
234
|
+
- **Local enrichment** (`categorize.py`):
|
|
235
|
+
- Every transaction gets a pt-BR category and a *kind*: expense, refund, income, transfer or investment.
|
|
236
|
+
- Card bill payments and transfers between your own accounts are never counted as spending.
|
|
237
|
+
- This works even after Pluggy's paid categorization stops at the end of the trial.
|
|
238
|
+
- **Assistant** (`agent.py`, `tools.py`, `analytics.py`):
|
|
239
|
+
- The system prompt carries a compact snapshot of your finances.
|
|
240
|
+
- The model calls deterministic SQL tools to get the details, so the numbers it gives come from your data.
|
|
241
|
+
- For remote providers there is also a guarded `run_sql` escape hatch (off by default for local ones).
|
|
242
|
+
|
|
243
|
+
Details: [docs/architecture.md](docs/architecture.md).
|
|
244
|
+
|
|
245
|
+
## Privacy
|
|
246
|
+
|
|
247
|
+
With a local provider (`ollama` or `llamacpp`) nothing leaves your machine except the Pluggy sync itself. With any
|
|
248
|
+
other provider, the snapshot and the rows returned by tools are sent to that provider's service, and the chat prints a
|
|
249
|
+
notice saying so. Each tool result is capped at 100 rows, but `run_sql` (on by default for remote providers) can select
|
|
250
|
+
any column, including the full raw Pluggy record of a transaction. Use `--no-sql` to limit the model to the curated
|
|
251
|
+
tools. The local database
|
|
252
|
+
lives at `~/.llmopenfinance/finance.duckdb` (change it with `--db` or `LLMOPENFINANCE_DB`).
|
|
253
|
+
|
|
254
|
+
## Development
|
|
255
|
+
|
|
256
|
+
```powershell
|
|
257
|
+
uv run ruff format . ; uv run ruff check . ; uv run pyrefly check ; uv run pytest
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
The tests use synthetic Pluggy payloads, `httpx.MockTransport` and a pyllmrouter chat with a scripted backend, so they never touch the network.
|
|
261
|
+
The coverage gate is 90%. See [AGENTS.md](AGENTS.md).
|
|
262
|
+
|
|
263
|
+
## Author
|
|
264
|
+
|
|
265
|
+
- **[Jorge Albuquerque](mailto:quantamentalguy@gmail.com)**, Ph.D. [[LinkedIn](https://www.linkedin.com/in/jorgealbuquerque)] [[X](https://x.com/quantamentalguy)]
|
|
266
|
+
- GitHub: [fortalbrz/llmopenfinance](https://github.com/fortalbrz/llmopenfinance)
|
|
267
|
+
- Companion project: [fortalbrz/pyllmrouter](https://github.com/fortalbrz/pyllmrouter) – the LLM layer, reusable in other projects
|
|
268
|
+
- Also, check out the [ollama2cpp](https://github.com/fortalbrz/ollama2cpp) project for a simple and optimized migration from the local LLM server [ollama](https://ollama.com/) to [llama-cpp](https://llama-cpp.com/) (increase your local token generation rate by tunning algorithm).
|
|
269
|
+
|
|
270
|
+
## License
|
|
271
|
+
|
|
272
|
+
[MIT](LICENSE)
|
|
273
|
+
|
|
274
|
+
The companion project [pyllmrouter](https://github.com/fortalbrz/pyllmrouter) is MIT-licensed too.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "llmopenfinance"
|
|
7
|
+
version = "0.1.1"
|
|
8
|
+
description = "Console chat with an LLM financial assistant over your Open Finance (Pluggy) data"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.12"
|
|
11
|
+
authors = [{ name = "Jorge Albuquerque" }]
|
|
12
|
+
license = { text = "MIT" }
|
|
13
|
+
keywords = ["open finance", "pluggy", "llm", "pyllmrouter", "ollama", "claude", "duckdb", "personal finance"]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Development Status :: 3 - Alpha",
|
|
16
|
+
"Environment :: Console",
|
|
17
|
+
"Intended Audience :: End Users/Desktop",
|
|
18
|
+
"Programming Language :: Python :: 3.12",
|
|
19
|
+
]
|
|
20
|
+
dependencies = [
|
|
21
|
+
"duckdb>=2.0.1",
|
|
22
|
+
"httpx>=0.28.1",
|
|
23
|
+
"pyllmrouter[all]>=0.4.2",
|
|
24
|
+
"rich>=15.0.0",
|
|
25
|
+
"typer>=0.29.2",
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
[project.scripts]
|
|
29
|
+
llmopenfinancenance = "llmopenfinance.__main__:main"
|
|
30
|
+
llmopenfinance = "llmopenfinance.__main__:main"
|
|
31
|
+
|
|
32
|
+
[project.optional-dependencies]
|
|
33
|
+
web = [
|
|
34
|
+
"flask>=3.1.3",
|
|
35
|
+
"waitress>=3.0.2",
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
[tool.setuptools]
|
|
39
|
+
packages = ["llmopenfinance"]
|
|
40
|
+
|
|
41
|
+
[tool.setuptools.package-dir]
|
|
42
|
+
"" = "src"
|
|
43
|
+
|
|
44
|
+
[tool.pytest.ini_options]
|
|
45
|
+
testpaths = ["tests"]
|
|
46
|
+
python_files = ["test_*.py"]
|
|
47
|
+
addopts = "-v --strict-markers --cov=src/llmopenfinance --cov-report=term-missing --cov-fail-under=90"
|
|
48
|
+
markers = [
|
|
49
|
+
"slow: marks tests as slow",
|
|
50
|
+
"live: hits real external services (Pluggy / Claude / Ollama); deselected by default",
|
|
51
|
+
]
|
|
52
|
+
|
|
53
|
+
[tool.coverage.run]
|
|
54
|
+
branch = true
|
|
55
|
+
|
|
56
|
+
[tool.coverage.report]
|
|
57
|
+
exclude_lines = [
|
|
58
|
+
"pragma: no cover",
|
|
59
|
+
"if __name__ == .__main__.:",
|
|
60
|
+
"if TYPE_CHECKING:",
|
|
61
|
+
]
|
|
62
|
+
|
|
63
|
+
[tool.pyrefly]
|
|
64
|
+
project-includes = ["src/**/*.py", "tests/**/*.py"]
|
|
65
|
+
search-path = ["src", "."]
|
|
66
|
+
|
|
67
|
+
[dependency-groups]
|
|
68
|
+
dev = [
|
|
69
|
+
"flask>=3.1.3",
|
|
70
|
+
"pyrefly>=1.5.0",
|
|
71
|
+
"pytest>=9.2.0",
|
|
72
|
+
"pytest-cov>=7.1.0",
|
|
73
|
+
"ruff>=0.17.6",
|
|
74
|
+
"waitress>=3.0.2",
|
|
75
|
+
]
|