feat(transactions-list): add interactive selection and details view
The transactions list command now supports interactive account selection when no account is specified, allowing users to easily choose from accounts with transaction data. Added a --details flag to show recent transactions with amounts, descriptions, and counterparties, while maintaining security through proper data masking. Users can now flexibly inspect their transaction data without needing to know exact account IDs.
This commit is contained in:
49
README.md
49
README.md
@@ -16,11 +16,13 @@ A robust command-line tool to synchronize bank transactions between various sour
|
||||
## 🚀 Quick Start
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- Rust (latest stable)
|
||||
- GoCardless Bank Account Data account
|
||||
- Running Firefly III instance
|
||||
|
||||
### Setup
|
||||
|
||||
1. Copy environment template: `cp env.example .env`
|
||||
2. Fill in your credentials in `.env`:
|
||||
- `GOCARDLESS_ID`: Your GoCardless Secret ID
|
||||
@@ -30,6 +32,7 @@ A robust command-line tool to synchronize bank transactions between various sour
|
||||
- `BANKS2FF_CACHE_KEY`: Required encryption key for secure transaction caching
|
||||
|
||||
### Usage
|
||||
|
||||
```bash
|
||||
# Sync all accounts (automatic date range)
|
||||
cargo run -p banks2ff -- sync gocardless firefly
|
||||
@@ -57,7 +60,9 @@ cargo run -p banks2ff -- accounts link create "Account Name" # Smart mode -
|
||||
cargo run -p banks2ff -- accounts link create <source> <dest> # Direct mode - for scripts
|
||||
|
||||
# Inspect transactions and cache
|
||||
cargo run -p banks2ff -- transactions list <account_id>
|
||||
cargo run -p banks2ff -- transactions list # Interactive account selection
|
||||
cargo run -p banks2ff -- transactions list "Account Name" # By name/IBAN
|
||||
cargo run -p banks2ff -- transactions list --details # Show actual transactions
|
||||
cargo run -p banks2ff -- transactions cache-status
|
||||
```
|
||||
|
||||
@@ -71,9 +76,9 @@ Banks2FF uses a structured command-line interface with the following commands:
|
||||
- `accounts list [gocardless|firefly]` - List all discovered accounts (optionally filter by adapter type)
|
||||
- `accounts status` - Show sync status for all accounts
|
||||
- `accounts link` - Manage account links between sources and destinations (with interactive and smart modes)
|
||||
- `transactions list <account_id>` - Show transaction information for a specific account
|
||||
- `transactions list [account] [--details] [--limit N]` - Show transaction summary or details for an account (interactive selection if no account specified)
|
||||
- `transactions cache-status` - Display cache status and statistics
|
||||
- `transactions clear-cache` - Clear transaction cache (implementation pending)
|
||||
- `transactions clear-cache` - Clear transaction cache
|
||||
|
||||
Use `cargo run -p banks2ff -- --help` for detailed command information.
|
||||
|
||||
@@ -93,29 +98,65 @@ The account linking system automatically matches accounts by IBAN, but also prov
|
||||
Banks2FF provides multiple ways to link your bank accounts to Firefly III accounts:
|
||||
|
||||
### Interactive Mode
|
||||
|
||||
```bash
|
||||
cargo run -p banks2ff -- accounts link create
|
||||
```
|
||||
|
||||
Shows you unlinked bank accounts and guides you through selecting destination accounts with human-readable names.
|
||||
|
||||
### Smart Resolution
|
||||
|
||||
```bash
|
||||
cargo run -p banks2ff -- accounts link create "Main Checking"
|
||||
```
|
||||
|
||||
Automatically finds accounts by name, IBAN, or ID and shows appropriate linking options.
|
||||
|
||||
### Direct Linking (for Scripts)
|
||||
|
||||
```bash
|
||||
cargo run -p banks2ff -- accounts link create <source_id> <destination_id>
|
||||
```
|
||||
|
||||
Perfect for automation - uses exact account IDs for reliable scripting.
|
||||
|
||||
### Key Features
|
||||
|
||||
- **Auto-Linking**: Automatically matches accounts with identical IBANs during sync
|
||||
- **Manual Override**: Create custom links when auto-matching isn't sufficient
|
||||
- **Constraint Enforcement**: One bank account can only link to one Firefly account (prevents duplicates)
|
||||
- **Human-Friendly**: Uses account names and masked IBANs for easy identification
|
||||
|
||||
## 📊 Transaction Inspection
|
||||
|
||||
Banks2FF provides flexible ways to inspect your transaction data without needing to access Firefly III directly:
|
||||
|
||||
### Summary View (Default)
|
||||
|
||||
```bash
|
||||
cargo run -p banks2ff -- transactions list
|
||||
```
|
||||
|
||||
Shows an interactive menu of accounts with transaction data, then displays summary statistics including total count, date range, and last update.
|
||||
|
||||
### Transaction Details
|
||||
|
||||
```bash
|
||||
cargo run -p banks2ff -- transactions list --details --limit 50
|
||||
```
|
||||
|
||||
Shows recent transactions with amounts, descriptions, and counterparties.
|
||||
|
||||
### Account Selection
|
||||
|
||||
```bash
|
||||
cargo run -p banks2ff -- transactions list "Main Checking"
|
||||
cargo run -p banks2ff -- transactions list NL12ABCD0123456789
|
||||
```
|
||||
|
||||
Find accounts by name, IBAN, or ID. Use no argument for interactive selection.
|
||||
|
||||
## 🔐 Secure Transaction Caching
|
||||
|
||||
Banks2FF automatically caches your transaction data to make future syncs much faster:
|
||||
@@ -133,6 +174,8 @@ The cache requires `BANKS2FF_CACHE_KEY` to be set in your `.env` file for secure
|
||||
- **Account not syncing?** Check that the IBAN matches between GoCardless and Firefly III, or use `accounts link create` for interactive linking
|
||||
- **Can't find account by name?** Use `accounts list` to see all available accounts with their IDs and names
|
||||
- **Link creation failed?** Each bank account can only link to one Firefly account - check existing links with `accounts link list`
|
||||
- **No transactions showing?** Use `transactions list` to check if data has been cached; run sync first if needed
|
||||
- **Can't find account for transactions?** Use `transactions list` without arguments for interactive account selection
|
||||
- **Missing transactions?** The tool syncs from the last transaction date forward
|
||||
- **Rate limited?** The tool automatically handles API limits and retries appropriately
|
||||
|
||||
|
||||
Reference in New Issue
Block a user