AtlatestRenderedmarkdown
Readme

tally

Personal finance management CLI and MCP server. Pulls transactions from Wise, categorizes them, writes to hledger journal files, and generates financial summaries.

Features

  • Pull transactions from Wise API across all currency balances
  • Map Wise transactions to hledger journal format with proper double-entry bookkeeping
  • Deduplicate imports — safe to run repeatedly without double-counting
  • Run hledger reports (balance, register, income statement)
  • List uncategorized transactions for review
  • Dual-mode: works as both a CLI tool and an MCP server for AI-assisted bookkeeping

CLI Usage

tally serve                              Start MCP server
tally pull [--since DATE] [--until DATE] [--profile TYPE]
                                         Pull transactions from Wise
tally import [--journal FILE] [--since DATE] [--until DATE]
                                         Pull and write to journal
tally balance [--profile TYPE]           Show Wise balances
tally report [--journal FILE] [--type bal|reg|is] [QUERY]
                                         Run hledger reports
tally categorize [--journal FILE]        List uncategorized transactions

Examples

# Pull recent transactions
tally pull --since 2026-03-01T00:00:00Z

# Pull transactions within a date range
tally pull --since 2026-01-01T00:00:00Z --until 2026-03-31T23:59:59Z

# Import transactions to journal with deduplication
tally import --journal finances.journal --since 2026-01-01T00:00:00Z

# Check current Wise balances
tally balance

# Run a balance report
tally report --type bal assets

# Monthly income statement
tally report --type is

# List uncategorized transactions
tally categorize --journal finances.journal

MCP Server Tools

When running as an MCP server (tally serve), the following tools are available:

ToolDescription
tally/pullPull recent transactions from Wise API
tally/importPull and import new transactions into journal
tally/balanceShow current Wise account balances
tally/reportRun hledger reports (bal, reg, is)
tally/categorizeList uncategorized transactions for review

Configuration

Environment variables:

VariableRequiredDescription
WISE_API_TOKENYes (for Wise operations)Wise personal API token
TALLY_JOURNALNoDefault journal file path (default: main.journal)
TALLY_PROFILENoDefault Wise profile type: personal or business (default: personal)

Account Mapping

Wise transactions are mapped to hledger accounts as follows:

  • Wise balances: assets:wise:{currency} (e.g., assets:wise:eur, assets:wise:usd)
  • Debit transactions: expenses:uncategorized (re-categorize after import)
  • Credit transactions: income:uncategorized (re-categorize after import)

Each imported transaction includes the Wise reference number as both a transaction code and a ref tag for deduplication.

Dependencies

Building

Requires a C toolchain. On Guix:

guix shell -m ../sigil/manifest.scm -- env CC=gcc sigil build --redirects dev-redirects.sgl

Testing

guix shell -m ../sigil/manifest.scm -- env CC=gcc sigil test --redirects dev-redirects.sgl

Note: tests require a lib symlink to the build output for dependency resolution:

ln -s build/dev/lib lib