Skip to content

Instantly share code, notes, and snippets.

@pckilgore
Last active August 26, 2025 13:15
Show Gist options
  • Select an option

  • Save pckilgore/92a8bab3b073e585dd2374b1134f4a25 to your computer and use it in GitHub Desktop.

Select an option

Save pckilgore/92a8bab3b073e585dd2374b1134f4a25 to your computer and use it in GitHub Desktop.
Simple YNAB Node JS Export Every Budget Script
#!/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")
})
@pckilgore
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment