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

# One-liner (recommended - works on macOS, Linux, Windows)
pipx install mmoney

# Alternative: Using uv
uv tool install mmoney

# Alternative: Using pip (may require adding to PATH)
pip install mmoney

Note: pipx and uv tool automatically handle PATH setup. If using pip and mmoney isn't found, you may need to add Python's bin directory to your PATH or use python -m mmoney_cli.cli instead.

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 securely using your system's keychain (macOS Keychain, Windows Credential Manager, or Linux Secret Service). Falls back to ~/.mmoney/session.pickle if keychain is unavailable.

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.1.tar.gz (24.3 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.1-py3-none-any.whl (25.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mmoney-0.1.1.tar.gz
  • Upload date:
  • Size: 24.3 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.1.tar.gz
Algorithm Hash digest
SHA256 a6278e6b7ce4df67a2b07a67cd1fe79031e4dac2b9b82748203b30897d909830
MD5 180e3da396b449ec042d53b4935bf15f
BLAKE2b-256 e9b2c3e912dd2f8bc5a001b2873039e015792ef9edc714242a0f18bcd8f96b6b

See more details on using hashes here.

Provenance

The following attestation bundles were made for mmoney-0.1.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: mmoney-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 25.6 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 46a6af039f1dde36dfdd79256473e8e0f780829fa79afd418ba65887b16de7bc
MD5 3f6c34e8ae57008de620d5df9b810409
BLAKE2b-256 5a65055e614cb62176dfaa3525fddd2930d078d10531e402e050284ea349e48c

See more details on using hashes here.

Provenance

The following attestation bundles were made for mmoney-0.1.1-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