thedavidweng/monarchmoney-cli
关于
A local, agent-friendly command-line tool for Monarch Money. Written in Go.
开发工具可以做什么
- Agent-first: stable JSON output, distinct stdout/stderr, and predictable exit codes
- Safety-first: --read-only, --dry-run, and --confirm gates for financial data mutations
- Auditable: local JSONL audit logs for remote mutations
- Plain-text ownership: one-way regenerating hledger backups of your complete financial history (monarch hledger backup)
实测星标增长
- 24小时
- 0
- 7天
- +1
- 15天
- +1
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文
monarchmoney-cli
Local, agent-friendly command-line tool for Monarch Money.
monarchmoney-cli lets you query, manage, and automate Monarch Money data from the terminal or via AI agents, with stable JSON output and explicit safety gates around financial mutations.
Highlights
- Agent-first: stable JSON output, distinct stdout/stderr, and predictable exit codes
- Safety-first:
--read-only,--dry-run, and--confirmgates for financial data mutations - Auditable: local JSONL audit logs for remote mutations
- Plain-text ownership: one-way regenerating hledger backups of your complete financial history (
monarch hledger backup) - Full-fidelity local archive: SQLite cache for offline queries, so your data outlives any subscription
- Fast single binary with broad Monarch surface: accounts, transactions, budgets, cashflow, rules, splits, recurring items, investments, and more
Why
Monarch Money is powerful in the browser, but automations and agents need a deterministic command surface. monarchmoney-cli exposes account, transaction, budget, rule, and cashflow workflows as auditable commands rather than fragile browser steps.
Quickstart
Install
Run the following on macOS or Linux:
curl -fsSL https://raw.githubusercontent.com/thedavidweng/monarchmoney-cli/main/install.sh | sh
Run the following on Windows:
powershell -ExecutionPolicy ByPass -c "irm https://raw.githubusercontent.com/thedavidweng/monarchmoney-cli/main/install.ps1 | iex"
The installer detects Homebrew automatically and uses it when available (recommended for easy upgrades). Otherwise it downloads the binary to ~/.local/bin.
Other installation methods
Homebrew Cask (macOS/Linux):
brew install --cask thedavidweng/tap/monarchmoney-cli
If you installed the old Homebrew formula, migrate to the cask:
brew update
brew uninstall --formula thedavidweng/tap/monarchmoney-cli
brew install --cask thedavidweng/tap/monarchmoney-cli
monarch version
Go:
go install github.com/thedavidweng/monarchmoney-cli/cmd/monarch@latest
Manual download: grab the archive for your platform from the latest GitHub Release, extract it, and place the monarch binary on your PATH.
Set up
monarch doctor
monarch auth login
Then try it:
monarch accounts list --json
monarch transactions search "Amazon" --from 2024-01-01 --json
monarch cashflow spending --from 2024-01-01 --to 2024-01-31 --json
# own your history as plain text (after `monarch cache sync`)
monarch hledger backup ~/finances/monarch.journal
Uninstall
# Homebrew Cask
brew uninstall --cask thedavidweng/tap/monarchmoney-cli
# install.sh
curl -fsSL https://raw.githubusercontent.com/thedavidweng/monarchmoney-cli/main/install.sh | sh -s uninstall
# Go
rm "$(go env GOPATH)/bin/monarch"
Remove local data if desired: rm -rf ~/.monarchmoney-cli (on Linux, the state directory may live under $XDG_STATE_HOME/monarchmoney-cli).
Documentation
Guides — task-oriented walkthroughs with real command output:
- Configuration — config file, env vars, and precedence
- Ledger backup — own your history as plain text with hledger
- Transactions workflow — search, inspect, dry-run, confirm, tag, rule
- Monthly review — budgets, cashflow, and analysis in ten minutes
- Agent automation — run AI agents safely and unattended
Reference:
- Commands — full list of supported commands and features
- Authentication — MFA support and session management
- Safety Model — how we protect your financial data
- JSON Schema — stable output contract details
- Agent Guide — guide for connecting with AI agents
- Contributing — development setup and contribution guidelines
Related
money is an open-source, self-hosted, fully local personal finance backend. It borrows the same JSON-first CLI contract and safety gates from monarchmoney-cli, but stores data on your own machine with no Monarch subscription required.
Disclaimer
monarchmoney-cli is an independent, community-maintained project and is not affiliated with, sponsored by, or endorsed by Monarch Money, Inc.
Acknowledgements
This project builds on work and ideas from:
hammem/monarchmoney— the original Python API project for accessing Monarch Money databradleyseanf/monarchmoneycommunity— the maintained community fork documenting the current unofficial Monarch Money API surface
Infrastructure
License
Built for the Monarch Money community.
探索相关项目
加载中…