Last active
August 26, 2025 13:15
-
-
Save pckilgore/92a8bab3b073e585dd2374b1134f4a25 to your computer and use it in GitHub Desktop.
Simple YNAB Node JS Export Every Budget Script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env node | |
| import { writeFile } from "node:fs/promises" | |
| const token = "<YOUR API TOKEN>" | |
| const f = (route = "") => | |
| fetch(`https://api.youneedabudget.com/v1/budgets/${route}`, { | |
| headers: { | |
| "authorization": `Bearer ${token} ` | |
| } | |
| }) | |
| const budgets = await f().then(r => r.json()).then(j => j.data.budgets) | |
| budgets.forEach(async ({ id, name }) => { | |
| const budget = await f(id) | |
| let path = name.replaceAll(/[ '",.()\[\]]/g, "_") | |
| await writeFile(`./ynab/${path}.json`, await budget.text(), "utf-8") | |
| }) |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Have an LLM/Chatbot teach you how to install Node on your system and run this.
You'll need to replace the token with your own token from YNAB
And fuck these guys for just raising prices every fucking year on a product that doesn't get any better.
Enshittification.