Skip to main content

CLI for Monarch Money - access your financial data from the command line

Project description

mmoney-cli

CI

Disclaimer: This is an unofficial, community-built CLI tool. It is not affiliated with, endorsed by, or supported by Monarch Money. Use at your own risk.

CLI for Monarch Money - access your financial data from the command line.

Built on top of monarchmoneycommunity.

Installation

# Using uv (recommended)
uv tool install mmoney-cli

# Or using pip
pip install mmoney-cli

Development

# Clone and install with uv
git clone https://github.com/theFong/mmoney-cli.git
cd mmoney-cli
uv sync

# Run CLI
uv run mmoney --help

Quick Start

# Best: Email + Password + MFA Secret (longest lasting, fully automated)
# Enable MFA in Monarch settings, copy the secret key when setting up authenticator
mmoney auth login -e your@email.com -p yourpassword --mfa-secret YOUR_SECRET --no-interactive

# Good: Email + Password + MFA Code (requires manual code entry)
mmoney auth login -e your@email.com -p yourpassword --mfa-code 123456

# Alternative: Email + Password + Device UUID (requires browser)
# 1. Open app.monarch.com, login, open DevTools Console
# 2. Run: copy(localStorage.getItem('monarchDeviceUUID'))
mmoney auth login -e your@email.com -p yourpassword --device-uuid YOUR_UUID --no-interactive

# Fallback: Token from browser (shortest lived)
# 1. Open app.monarch.com, login, open DevTools Network tab
# 2. Click any 'graphql' request, find 'Authorization: Token YOUR_TOKEN' in Headers
mmoney auth login --token YOUR_TOKEN

Commands

Authentication

mmoney auth login      # Login to Monarch Money
mmoney auth logout     # Delete saved session
mmoney auth status     # Check authentication status

Accounts

mmoney accounts list              # List all accounts
mmoney accounts types             # List account types
mmoney accounts create            # Create manual account
mmoney accounts update <id>       # Update account
mmoney accounts delete <id>       # Delete account
mmoney accounts refresh           # Refresh from institutions
mmoney accounts refresh-status    # Check refresh status

Holdings

mmoney holdings list <account_id>     # List holdings
mmoney holdings history <account_id>  # Balance history
mmoney holdings snapshots             # Aggregate snapshots
mmoney holdings balances              # Recent balances

Transactions

mmoney transactions list              # List transactions
mmoney transactions get <id>          # Get transaction details
mmoney transactions summary           # Transaction summary
mmoney transactions splits <id>       # Get splits
mmoney transactions create            # Create transaction
mmoney transactions update <id>       # Update transaction
mmoney transactions delete <id>       # Delete transaction

Categories

mmoney categories list      # List categories
mmoney categories groups    # List category groups
mmoney categories create    # Create category
mmoney categories delete    # Delete category

Tags

mmoney tags list                    # List tags
mmoney tags create                  # Create tag
mmoney tags set <transaction_id>    # Set tags on transaction

Budgets

mmoney budgets list    # List budgets
mmoney budgets set     # Set budget amount

Cashflow

mmoney cashflow summary    # Income, expenses, savings
mmoney cashflow details    # By category and merchant

Other

mmoney recurring list       # Recurring transactions
mmoney institutions list    # Linked institutions
mmoney subscription status  # Subscription details

Common Options

Most list commands support filtering:

  • --limit, -l: Number of records
  • --start-date, -s: Start date (YYYY-MM-DD)
  • --end-date, -e: End date (YYYY-MM-DD)

Example:

mmoney transactions list --limit 50 --start-date 2024-01-01 --end-date 2024-12-31

Output

All commands output JSON by default, making it easy to pipe to tools like jq:

mmoney accounts list | jq '.accounts[] | {name: .displayName, balance: .currentBalance}'

Session Storage

Sessions are stored in .mm/mm_session.pickle in the current directory.

Authentication Methods

Recommended authentication methods in order of preference:

  1. MFA Secret (Best): Enable MFA in Monarch, copy the secret key when setting up your authenticator. Use --mfa-secret for fully automated, long-lasting auth
  2. MFA Code: Use --mfa-code with the 6-digit code from your authenticator app
  3. Device UUID: Get from browser console with localStorage.getItem('monarchDeviceUUID') and use --device-uuid
  4. Token: Get from browser Network tab (Authorization header) and use --token - shortest lived

Run mmoney auth login --help for detailed instructions on each method.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mmoney-0.1.0.tar.gz (24.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mmoney-0.1.0-py3-none-any.whl (25.1 kB view details)

Uploaded Python 3

File details

Details for the file mmoney-0.1.0.tar.gz.

File metadata

  • Download URL: mmoney-0.1.0.tar.gz
  • Upload date:
  • Size: 24.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mmoney-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e4a714fb7d91759925d2b2e2d8781e33d951ced2b3985575588103e92a56221e
MD5 e07c208e8f80e79b24c457d96e016557
BLAKE2b-256 5fe89e024c42351cc1e8872758a32c66b3d2dc153cb6fed4c13c081aff9287a4

See more details on using hashes here.

Provenance

The following attestation bundles were made for mmoney-0.1.0.tar.gz:

Publisher: publish.yml on theFong/mmoney-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mmoney-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mmoney-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 25.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mmoney-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0a1e95e7189370b74884d593fb60d9a5b4a2f0f4eafc79c06c8c320b51ae8115
MD5 5b92c00f6666e5a6d8034d5177a23b4c
BLAKE2b-256 713ae358b1755cc1b2f16f786a79c53a904ae0c6c92249511dfa01a604bbcd4f

See more details on using hashes here.

Provenance

The following attestation bundles were made for mmoney-0.1.0-py3-none-any.whl:

Publisher: publish.yml on theFong/mmoney-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page