rubick/ynab-sqlite-export — explained in plain English
Analysis updated 2026-05-18
Query your full YNAB spending history with plain SQL instead of the app's built in reports.
Schedule an hourly sync of your YNAB budget into a local database with cron or GitHub Actions.
Analyze spending by category or find your most frequent payees using example SQL queries.
Give an AI coding assistant like Claude Code safe, accurate access to your budgeting data.
| rubick/ynab-sqlite-export | alirezarezvani/promptor | ayushk58/crawlyx | |
|---|---|---|---|
| Stars | 9 | 9 | 9 |
| Language | Python | Python | Python |
| Last pushed | — | 2025-09-14 | — |
| Maintenance | — | Quiet | — |
| Setup difficulty | easy | easy | easy |
| Complexity | 2/5 | 2/5 | 2/5 |
| Audience | general | pm founder | pm founder |
Figures from each repo's GitHub metadata at analysis time.
Requires a YNAB account and a personal access token generated from YNAB's developer settings page.
This tool copies your entire YNAB budgeting account, every budget, account, category, payee, and transaction, into a local SQLite database file on your own computer. YNAB is a popular budgeting app, and this script exists because its built in reporting only shows you what the app's own screens let you see. Once your data sits in a plain SQLite file, you can query it with ordinary SQL, open it in a free tool like DB Browser for SQLite, or feed it into something like a spreadsheet or a chart tool. It is written in pure Python with no external packages needed at all, using only things already built into Python itself. You run one script, it reads a personal access token you generate from YNAB's own settings page, and it writes or updates a file called ynab.db. The first run pulls everything, but every run after that only fetches what changed since last time, using a cursor YNAB provides for this purpose, so you can safely schedule it hourly with something like cron without wasting API calls or your time. The data is organized into clear tables: budgets, accounts, category groups and categories, payees, transactions, and the smaller split pieces of transactions that are divided across categories. All dollar amounts are converted from YNAB's internal counting format into normal decimal numbers. The README includes example SQL queries, such as finding your top spending categories over the last three months or your most frequent payees. This is a one way sync from YNAB down to your local file. Any changes made directly to the SQLite database are never sent back up to YNAB or reconciled against it, so think of it purely as a read only mirror of your account. The project also ships built in guidance for AI coding assistants like Claude Code, so an assistant can correctly answer questions about your spending without tripping over details like soft deleted rows or split transactions. The script is released under the MIT License, a permissive license that allows commercial use as long as the copyright notice stays intact, and it respects YNAB's API rate limits by using only a handful of requests per budget on each run.
A zero dependency Python script that copies your entire YNAB budget into a local SQLite file, updating incrementally so you can query your finances with SQL.
Mainly Python. The stack also includes Python, SQLite.
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly general.
This repo across BitVibe Labs
double-check against the repo, no cap.