Skip to content

Headless Mode

Terminal window
oa --run "<query>"

Runs a single AI query without the interactive TUI. Open Accountant processes the query, executes any necessary tools, and prints the result to stdout.

Terminal window
# Quick spending check
oa --run "How much did I spend on dining this month?"
# Generate a summary
oa --run "Give me a spending summary for last month"
# Find anomalies
oa --run "Are there any duplicate charges or unusual transactions?"
# Run a skill
oa --run "Run the subscription audit skill"

Combine with other CLI commands:

Terminal window
# Import and summarize
oa --run "Import transactions from ~/Downloads/chase.csv" && \
oa --summary month
# Daily import via cron
0 9 * * * cd ~/oa && bun start --run "Import ~/Downloads/latest.csv"

Headless mode prints the AI’s final answer to stdout. Tool execution details are suppressed. Use --status or --summary for structured reports instead of --run when you need predictable output formats.

For automated reporting, prefer the dedicated report flags over --run:

Terminal window
# Weekly spending email
oa --summary week --offset 0 > /tmp/weekly.txt && \
mail -s "Weekly Spending" you@email.com < /tmp/weekly.txt
# Monthly P&L export
oa --pnl month --offset 1 > ~/reports/pnl-$(date +%Y-%m).txt