CLI tool for querying Copilot.money financial data via CSV exports.
npm install
npm run build
npm link # Makes 'copilot' command available globally$ copilot tx -d 7
┌────────────┬────────────────────────────────────────┬────────────────────┬────────────┐
│ Date │ Description │ Category │ Amount │
├────────────┼────────────────────────────────────────┼────────────────────┼────────────┤
│ 2025-11-22 │ Whole Foods Market │ Groceries │ 87.43 │
│ 2025-11-21 │ Shell Gas Station │ Auto │ 45.00 │
│ 2025-11-21 │ Starbucks │ Restaurants │ 6.50 │
│ 2025-11-20 │ Amazon Prime │ Shopping │ 14.99 │
│ 2025-11-19 │ Netflix │ Entertainment │ 15.99 │
└────────────┴────────────────────────────────────────┴────────────────────┴────────────┘
$ copilot summary --by-category -d 30
Spending by Category (last 30 days)
┌─────────────────────────┬───────────────┬───────────────┐
│ Category │ Spent │ Transactions │
├─────────────────────────┼───────────────┼───────────────┤
│ Groceries │ 543.21 │ 12 │
│ Restaurants │ 287.50 │ 18 │
│ Auto │ 156.00 │ 4 │
│ Entertainment │ 45.99 │ 3 │
└─────────────────────────┴───────────────┴───────────────┘
# Import a CSV file manually exported from Copilot
copilot import ~/Downloads/copilot-export.csv
# Preview without importing
copilot import ~/Downloads/copilot-export.csv --dry-run# Last 30 days
copilot transactions
# Shortcuts
copilot tx -d 7 # Last 7 days
copilot tx -c groceries # Filter by category
copilot tx -s "amazon" # Search description
copilot tx --min -100 # Minimum amount
copilot tx --json # JSON output# Overview of last 30 days
copilot summary
# Spending by category
copilot summary --by-category
# Monthly breakdown
copilot summary --by-month
# Custom period
copilot summary -d 90 --by-categorycopilot db-path # Show database locationData is stored in ~/.copilot-cli/copilot.db (SQLite).
- Export CSV from Copilot.money app (Settings → Account → Export)
- Run
copilot import ~/Downloads/copilot-export.csv - Query with
copilot txorcopilot summary
Re-import anytime to add new transactions (duplicates are automatically skipped).
The TypeScript compiler doesn't preserve execute permissions. Fix with:
chmod +x $(npm prefix -g)/lib/node_modules/copilot-cli/dist/cli.jsOr rebuild (this runs automatically now):
npm run build # postbuild script sets +xYour shell may not have the npm global bin in PATH. Check with:
echo $PATH | grep -o '[^:]*npm[^:]*'
npm prefix -g # Shows where npm installs global packagesAdd to your shell config (~/.zshrc or ~/.bashrc):
export PATH="$(npm prefix -g)/bin:$PATH"Make sure you're exporting from Copilot.money, not another app. The CSV should have columns like: date, name, amount, category, account.
Searches look at the transaction description. Run copilot tx -d 7 to see recent transactions and verify descriptions are populated.
This can happen with corrupted or partial imports. Reset the database:
rm ~/.copilot-cli/copilot.db
copilot import your-file.csv- Open Copilot app on Mac/iPhone
- Go to Settings → Account → Export
- Choose date range and export as CSV
- Import with
copilot import ~/Downloads/copilot-export.csv
The CSV parser is flexible and handles common column names (date, description, amount, category, account). If your app exports similar CSV format, it may work. Test with --dry-run first.
copilot db-path # Shows: ~/.copilot-cli/copilot.dbThis is a SQLite database. You can query it directly:
sqlite3 ~/.copilot-cli/copilot.db "SELECT COUNT(*) FROM transactions"cp ~/.copilot-cli/copilot.db ~/copilot-backup-$(date +%Y%m%d).dbThis software is a data management tool only. Nothing in this software constitutes financial, investment, legal, or tax advice. The developers are not financial advisors, accountants, or attorneys. Always consult qualified professionals for financial decisions.
This project is not affiliated with, endorsed by, or connected to:
- Copilot.money or its parent company
- Microsoft Corporation or GitHub Copilot
- Any other "Copilot" branded product or service
"Copilot" in this project name refers solely to compatibility with CSV exports from the Copilot.money personal finance app. All trademarks belong to their respective owners.
This software processes data you provide via CSV exports. The developers make no guarantees about:
- Accuracy of parsed data
- Completeness of imports
- Correctness of calculations or summaries
You are responsible for verifying all financial data. Do not rely on this tool for tax preparation, financial reporting, or legal compliance without independent verification.
This software is provided "as is" without warranty of any kind. See the LICENSE file for complete terms.
This tool stores your financial transaction data locally in an unencrypted SQLite database (~/.copilot-cli/copilot.db). You are responsible for:
- Securing access to your computer
- Backing up your data
- Protecting exported CSV files containing sensitive financial information
This tool operates entirely offline. No data is transmitted to external servers. Your financial data never leaves your machine.
MIT License - see LICENSE for details.