A powerful, privacy-focused command-line tool for personal finance tracking
Track expenses, import bank statements, and generate insightful reportsβall from your terminal. Your financial data stays on your computer, under your control.
- π° Track Expenses: Add, view, and manage expenses with detailed categorization
- π₯ Smart Import: Import transactions from CSV/JSON with automatic format detection
- π Rich Reports: Category summaries, monthly trends, and top expense analysis
- π€ Easy Export: Export your data to CSV or JSON for backups or spreadsheets
- π Privacy-First: All data stored locally in SQLiteβno cloud, no tracking
- π¨ Beautiful CLI: Color-coded output with ASCII charts and tables
- π§ͺ Well-Tested: 91 passing tests ensure reliability
Get up and running in 5 minutes:
# Install
git clone https://github.com/PSthelyBlog/finance-cli.git
cd finance-cli
npm install && npm run build
# Add your first expense
npm run cli -- add -a 5.50 -c coffee --description "Morning latte"
# View your expenses
npm run cli -- list
# See spending breakdown
npm run cli -- report categoryβ‘οΈ Full Quick Start Guide - Get started in 5 minutes
- Quick Start Guide - Fast setup for new users (5 min read)
- User Guide - Comprehensive documentation (30 min read)
- Architecture Review - Technical architecture (for developers)
- Development Guide - Patterns and anti-patterns (for contributors)
finance add -a 12.50 -c lunch --description "Burrito bowl"
finance add -a 45.99 -c groceries --description "Weekly shopping"# Preview first
finance import bank_statement.csv --dry-run
# Import transactions
finance import bank_statement.csv --date-format US --skip-duplicates# Category breakdown
finance report category --from 2025-10-01 --to 2025-10-31
# Monthly trends
finance report monthly --limit 12
# Top expenses
finance report top --limit 10finance export 2025_expenses.csv --from 2025-01-01 --to 2025-12-31| Command | Purpose | Example |
|---|---|---|
add |
Add an expense | finance add -a 50 -c groceries |
list |
View expenses | finance list --category groceries --from 2025-10-01 |
delete |
Remove expense | finance delete a3d5e7f9 |
import |
Import CSV/JSON | finance import bank_statement.csv |
report category |
Spending by category | finance report category |
report monthly |
Monthly trends | finance report monthly --limit 6 |
report top |
Largest expenses | finance report top --limit 10 |
export |
Export data | finance export backup.csv |
See all options: finance <command> --help
- Node.js 18.0.0 or higher
- npm or yarn
# Clone repository
git clone https://github.com/PSthelyBlog/finance-cli.git
cd finance-cli
# Install dependencies
npm install
# Build
npm run build
# Verify installation
npm run cli -- --helpnpm link
# Now use "finance" directly instead of "npm run cli --"
finance --help=== Category Summary ===
Groceries ββββββββββββββββββββ 45.5%
Utilities ββββββββββββ 25.2%
Dining ββββββ 15.3%
Transport ββββ 10.0%
Other β 4.0%
Total: $2,898.66
=== Monthly Spending Report ===
Trend: βββ
ββββ
ββ
October 2025
Total: $2,898.66 | Transactions: 73
Top categories:
Groceries $1,234.56 ββββββββββββββββββββ 42.5%
Utilities $689.90 ββββββββββββ 23.8%
Coffee $523.50 ββββββββ 18.0%
=== Top 10 Expenses ===
# | Date | Amount | Category | Description
-------------------------------------------------------------
1. | 2025-10-15 | $1,200.00 | rent | Monthly rent π₯
2. | 2025-10-20 | $450.00 | insurance | Car insurance π₯
3. | 2025-10-08 | $289.99 | shopping | Winter coat π₯
- β Local-only: All data stored on your computer
- β No tracking: No analytics or telemetry
- β No cloud: No remote servers or accounts
- β Open source: Audit the code yourself
- β Encrypted backups: Use OS encryption for backups
Your data location: ~/.finance-cli/data.db
npm test # Run all tests
npm run test:watch # Watch mode
npm run test:coverage # Coverage reportTest Status: 91 passing tests
- Integration tests with real database
- Unit tests for all utilities
- Fixture-based CSV import tests
CLI Layer (Commander.js)
β
Service Layer (Business Logic)
β
Data Layer (SQLite + Models)
See Architecture Review for detailed analysis.
Contributions welcome! Please read:
- Development Guide - Patterns and anti-patterns
- Architecture Review - System design
- Submit issues for bugs or feature requests
- Submit pull requests with tests
See CLAUDE.md for critical patterns:
- Date handling (UTC storage, date-fns)
- Currency handling (integer cents)
- Validation (early validation, specific errors)
- Error handling (context-rich errors)
Current: v0.1.0 - Core functionality complete
Planned:
- π Budget tracking with alerts
- π Recurring expense templates
- π·οΈ Smart category suggestions
- π Advanced visualizations
- π± Multi-currency support with conversion
- π± Mobile companion app
- βοΈ Optional cloud sync
Import not working?
# Try specifying date format explicitly
finance import file.csv --date-format US # or EU or ISO
# Preview first
finance import file.csv --dry-runCommand not found?
# Use npm run cli instead
npm run cli -- add -a 10 -c lunch
# Or link globally
npm linkMore help: See User Guide - Troubleshooting
MIT License - see LICENSE file for details
Built with:
- Commander.js - CLI framework
- better-sqlite3 - SQLite database
- date-fns - Date utilities
- PapaParse - CSV parsing
- chalk - Terminal colors
- inquirer - Interactive prompts
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Take control of your finances. Start tracking today.
Quick Start β’ User Guide β’ GitHub