npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

monarch-money-cli

v1.0.1

Published

Command line interface for Monarch Money API - manage accounts, transactions, budgets, and cashflow

Downloads

25

Readme

monarchcli

A command line interface for Monarch Money API

Installation

pnpm install

Setup

You must set the MONARCH_TOKEN environment variable before using the CLI:

export MONARCH_TOKEN="your-token-here"

Usage

Basic Commands

# Get all accounts
monarch-cli get-accounts

# Save output to file
monarch-cli get-accounts --output accounts.json

# Get transactions with filters
echo '{"limit": 10, "startDate": "2024-01-01"}' > params.json
monarch-cli get-transactions --input params.json

# Pipe output to jq for processing
monarch-cli get-transactions | jq '.allTransactions.results[0]'

Available Commands

| Command | Description | Required Parameters | |---------|-------------|---------------------| | get-accounts | Get all accounts | None | | get-account-type-options | Get account type options | None | | get-recent-account-balances | Get recent account balances | Optional: startDate | | get-account-holdings | Get holdings for an account | accountId | | get-account-history | Get history for an account | accountId | | get-subscription-details | Get subscription details | None | | get-institutions | Get financial institutions | None | | get-account-snapshots-by-type | Get account snapshots by type | startDate, timeframe ("year" or "month") | | get-aggregate-snapshots | Get aggregate snapshots | Optional: startDate, endDate, accountType | | get-budget-settings | Get budget settings | None | | get-budgets | Get budgets | Optional: startDate, endDate, useLegacyGoals, useV2Goals | | get-transactions | Get transactions with filters | Optional: many (see below) | | get-transactions-summary | Get transactions summary | None | | get-recurring-transactions | Get recurring transactions | Optional: startDate, endDate | | get-categories | Get transaction categories | None | | get-category-groups | Get category groups | None | | get-transaction-tags | Get transaction tags | None | | get-transaction-details | Get transaction details | transactionId, optional: redirectPosted | | get-transaction-splits | Get transaction splits | transactionId | | get-cashflow | Get cashflow data | Optional: limit, startDate, endDate | | get-cashflow-summary | Get cashflow summary | Optional: limit, startDate, endDate | | get-cashflow-dashboard | Get cashflow dashboard | None |

Transaction Filters

The get-transactions command accepts these optional parameters:

{
  "limit": 100,
  "offset": 0,
  "startDate": "2024-01-01",
  "endDate": "2024-12-31",
  "search": "coffee",
  "categoryIds": ["id1", "id2"],
  "accountIds": ["id1", "id2"],
  "tagIds": ["id1", "id2"],
  "hasAttachments": true,
  "hasNotes": false,
  "hiddenFromReports": false,
  "isSplit": false,
  "isRecurring": true,
  "importedFromMint": false,
  "syncedFromInstitution": true
}

Examples

# Get account holdings
echo '{"accountId": "abc-123-def-456"}' > params.json
monarch-cli get-account-holdings --input params.json --output holdings.json

# Get transactions for a date range
echo '{"startDate": "2024-01-01", "endDate": "2024-01-31"}' > dates.json
monarch-cli get-transactions --input dates.json

# Get budget data
echo '{"startDate": "2024-01-01", "endDate": "2024-12-31"}' > budget-params.json
monarch-cli get-budgets --input budget-params.json --output budget.json

# Chain commands with jq
monarch-cli get-categories | jq '[.categories[] | {id: .id, name: .name}]'

Running the CLI

You can run the CLI in several ways:

# Through npm/pnpm scripts
pnpm start <command>

# Direct with tsx
npx tsx src/cli.ts <command>

# Make it globally available (after pnpm link)
monarch-cli <command>

Error Handling

  • All errors are written to stderr
  • JSON output is written to stdout (or specified output file)
  • Exit code is 1 on error, 0 on success

Development

TypeScript source is in src/cli.ts. The CLI uses:

  • Commander.js for command parsing
  • tsx for TypeScript execution without compilation
  • monarch-money-api for API calls