Skip to content

TypeScript alternative: monarch-money-ts #189

@chernetsov

Description

@chernetsov

Hi! I've been using this library as reference while building a TypeScript client for the Monarch Money API. Wanted to share it here since many people land on this repo looking for a non-Python option.

monarch-money-ts — an unofficial TypeScript client with Zod-validated types, published on npm.

npm install monarch-money-ts

What makes it different

The library is built using an agent-driven reverse engineering workflow. Instead of manually inspecting network requests:

  1. A Chrome extension captures live GraphQL traffic from Monarch Money
  2. A traffic analyzer tool (mmtraf) lets you explore and inspect captured requests/responses
  3. An AI coding agent then builds the typed API client, Zod schemas, and integration tests directly from the observed traffic

This means the TypeScript types are derived from real API responses (not guessed), and every API module has integration tests that validate the schemas against live data — if Monarch changes their API shape, the strict schemas catch the drift immediately.

Current coverage

  • Accounts — list with filters
  • Transactions — list, get, update
  • Categories — list groups, get detail
  • Budgets — report, status, settings
  • Portfolio — holdings
  • Rules — list, preview

Full coverage table: README

Quick example

import {
  EmailPasswordAuthProvider,
  MonarchGraphQLClient,
  getAccounts,
} from 'monarch-money-ts';

const auth = new EmailPasswordAuthProvider({
  email: process.env.MONARCH_EMAIL!,
  password: process.env.MONARCH_PASSWORD!,
});
const client = new MonarchGraphQLClient();

const accounts = await getAccounts(auth, client);

The API surface is still growing — contributions welcome. The traffic-driven workflow makes it straightforward to add new endpoints.

Thanks for building the original Python library — it was invaluable as a reference for understanding the API surface!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions