How siamonas/expense-tracker-cli works
This is a small Python expense-tracking CLI: users invoke commands to add, list, summarize, or delete expenses. The CLI dispatches to command handlers, which read or update JSON-backed expense data; listing and summary format results for display. The README also advertises categorization and period reports, though the sampled add handler does not accept or persist a category, and the CLI only exposes month filtering. Relationships below follow the shown calls; the runtime JSON file is not part of the repository tree.
Main entry points: expense-tracker.py Argument dispatch · utils.py JSON utilities · add.py Add expense · list.py List expenses
Components 9
CLI entry
- Argument dispatch
expense-tracker.py
Expense commands
- Add expense
commands/add.py - List expenses
commands/list.py - Expense summary
commands/summary.py - Delete expense
commands/delete.py
Expense storage
- JSON utilities
commands/utils.py - Expense records
Other components
- CLI user
- Rich display
Connections 14
- CLI user → Argument dispatch: runs commands
README.md - Argument dispatch → Add expense: dispatches add
expense-tracker.py - Argument dispatch → List expenses: dispatches list
expense-tracker.py - Argument dispatch → Expense summary: dispatches summary
expense-tracker.py - Argument dispatch → Delete expense: dispatches delete
expense-tracker.py - Add expense → JSON utilities: reads and writes
commands/add.py - List expenses → JSON utilities: reads
commands/list.py - Expense summary → JSON utilities: reads
commands/summary.py - Delete expense → JSON utilities: reads and writes
commands/delete.py - JSON utilities → Expense records: reads and writes
commands/utils.py - Add expense → Rich display: prints status
commands/add.py - List expenses → Rich display: renders table
commands/list.py - Expense summary → Rich display: prints totals
commands/summary.py - Delete expense → Rich display: prints status
commands/delete.py