Skip to main content

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

Project description

mmoney-cli

CI

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_cli-0.1.0.tar.gz (25.2 kB view details)

Uploaded Source

Built Distribution

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

mmoney_cli-0.1.0-py3-none-any.whl (25.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mmoney_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a837dce6e246d3a656d09bf19e7ce85f79c9e759af2e4683e9407b8dcc34e6de
MD5 f8cde5dc151eab289bd4e4a30e8de10a
BLAKE2b-256 4e3c0f9a0e69b7ab43d69c9cbaad70d5b5d1d2932b10599b43443ec75858e96d

See more details on using hashes here.

Provenance

The following attestation bundles were made for mmoney_cli-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_cli-0.1.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for mmoney_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c34f347647371dc03dd5604f8067950e65d9dcc04485cbc0ec53ac9e523152f9
MD5 f0b66948458c928bf9db8e2c329f7010
BLAKE2b-256 df207278ac566635ef33d72daf77ff1de6ff53f2c27948c4f68729ff37c6cbf4

See more details on using hashes here.

Provenance

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