How arvidsgertners/expense-tracker-cli works
Expense Tracker is a single-file CLI for adding, listing, deleting, and summarizing expenses. The user supplies a command and options; the script dispatches to the matching handler, which loads or updates local data and prints a result. Listing filters by category, and summaries can filter by category and month. Saves also refresh a CSV export. The graph reflects the sampled script and README; there are no separate application modules or external services.
Main entry points: expense_tracker.py JSON expense file
Components 13
CLI interface
- CLI parser and dispatcher
expense_tracker.py
Expense operations
- Add expense
expense_tracker.py - Delete expense
expense_tracker.py - List expenses
expense_tracker.py - Summarize spending
expense_tracker.py - Expense lookup
expense_tracker.py - ID generation
expense_tracker.py - Timestamp creation
expense_tracker.py
Local persistence
- JSON expense file
expense_tracker.py - CSV export
expense_tracker.py - CSV file
Other components
- User
- Terminal
Connections 20
- User → CLI parser and dispatcher: runs command
- CLI parser and dispatcher → Add expense: dispatches
- CLI parser and dispatcher → Delete expense: dispatches
- CLI parser and dispatcher → List expenses: dispatches
- CLI parser and dispatcher → Summarize spending: dispatches
- Add expense → JSON expense file: loads data
- Add expense → ID generation: gets ID
- Add expense → Timestamp creation: gets timestamp
- Add expense → JSON expense file: saves data
- Delete expense → Expense lookup: finds expense
- Expense lookup → JSON expense file: loads data
- Delete expense → JSON expense file: saves data
- List expenses → JSON expense file: loads data
- Summarize spending → JSON expense file: loads data
- JSON expense file → CSV export: refreshes export
- CSV export → CSV file: writes CSV
- Add expense → Terminal: prints result
- Delete expense → Terminal: prints result
- List expenses → Terminal: prints table
- Summarize spending → Terminal: prints total