SmartWallet CLI - finance tracker
Project description
SmartWallet
A terminal-based personal finance tracker with a tree-structured budget system.
Overview
SmartWallet is an offline-first TUI application for managing personal finances. It organizes income and expenses in a hierarchical tree structure — categories can nest infinitely (e.g., Home -> Bills -> Electricity), and each leaf holds a signed transaction. The entire budget persists locally as a JSON file with schema versioning.
Built as a university project demonstrating the Composite and Factory Method design patterns with a clean MVC architecture separating business logic from the Textual-powered terminal UI.
Features
- Tree-structured budget — infinite category nesting with recursive balance calculation
- Modern TUI — custom dark theme with color-coded income/expenses
- Keyboard-driven — modal dialogs for add, edit, delete, and navigation
- Offline-first — all data stored locally in
~/.smartwallet/budget.json - Schema versioning — safe data migrations for future releases
- 27 unit tests — full coverage of model, factory, and persistence layers
Installation
Requires uv (recommended) or pipx.
Install as a standalone CLI tool (isolated environment, added to PATH):
uv tool install smartwallet
Or with pipx:
pipx install smartwallet
Then run:
smartwallet
To upgrade or uninstall:
uv tool upgrade smartwallet # or: pipx upgrade smartwallet
uv tool uninstall smartwallet # or: pipx uninstall smartwallet
Local Setup (development)
- Clone the repository:
git clone https://github.com/alwoodm/smartwallet.git cd smartwallet
- Install dependencies (requires uv):
uv sync - Run the application:
uv run smartwallet
Keybindings
| Key | Action |
|---|---|
a |
Add subcategory |
t |
Add transaction |
e |
Edit selected |
d |
Delete selected |
Tab |
Next tree node |
Shift+Tab |
Previous tree node |
q |
Quit |
Development
uv run ruff check . # Lint
uv run ruff format --check . # Format check
uv run pytest # Run tests
uv run pytest --cov # Tests with coverage
uv build # Build package
Architecture
The project follows an MVC architecture with four independent modules:
| Module | Location | Responsibility |
|---|---|---|
| Model | src/smartwallet/model/ |
Data structures, balance calculation |
| Factory | src/smartwallet/factory/ |
Validated object creation |
| Persistence | src/smartwallet/persistence.py |
JSON serialization/deserialization |
| UI | src/smartwallet/ui/ |
Textual TUI (screens, widgets, modals) |
For detailed documentation including design pattern analysis, see docs/architecture.md.
License
This project is licensed under the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file smartwallet-1.0.1.tar.gz.
File metadata
- Download URL: smartwallet-1.0.1.tar.gz
- Upload date:
- Size: 469.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2afb76fff1b1710bfd479585462be6aa50ccb0daf54e970aadf1202f0e4b924
|
|
| MD5 |
549127fcc828f32a61e17e09f352c3a0
|
|
| BLAKE2b-256 |
6594c548bb145d395b37f7e19eaad7706dae75c63353ad88d719d865ed3f59a0
|
Provenance
The following attestation bundles were made for smartwallet-1.0.1.tar.gz:
Publisher:
ci.yml on alwoodm/smartwallet
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
smartwallet-1.0.1.tar.gz -
Subject digest:
c2afb76fff1b1710bfd479585462be6aa50ccb0daf54e970aadf1202f0e4b924 - Sigstore transparency entry: 947339237
- Sigstore integration time:
-
Permalink:
alwoodm/smartwallet@f81f6177beeedb5550de0605361f5cdc2d647c26 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/alwoodm
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@f81f6177beeedb5550de0605361f5cdc2d647c26 -
Trigger Event:
push
-
Statement type:
File details
Details for the file smartwallet-1.0.1-py3-none-any.whl.
File metadata
- Download URL: smartwallet-1.0.1-py3-none-any.whl
- Upload date:
- Size: 20.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05108b0cae58d263d3469591d77b8fb89b2a1b77fe19c9f651e464cff3ff0aa4
|
|
| MD5 |
764ccc92d7898a8878960d6e00f4c54d
|
|
| BLAKE2b-256 |
78d2fc2bb2758783e335586cd13c46c00d14c653ad81f804a01e8754c1678c49
|
Provenance
The following attestation bundles were made for smartwallet-1.0.1-py3-none-any.whl:
Publisher:
ci.yml on alwoodm/smartwallet
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
smartwallet-1.0.1-py3-none-any.whl -
Subject digest:
05108b0cae58d263d3469591d77b8fb89b2a1b77fe19c9f651e464cff3ff0aa4 - Sigstore transparency entry: 947339239
- Sigstore integration time:
-
Permalink:
alwoodm/smartwallet@f81f6177beeedb5550de0605361f5cdc2d647c26 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/alwoodm
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@f81f6177beeedb5550de0605361f5cdc2d647c26 -
Trigger Event:
push
-
Statement type: