feat: refactor CLI to subcommands and add dynamic adapter discovery
Introduce structured subcommand architecture for better CLI organization and extensibility. Implement dynamic adapter discovery and validation system in core module for pluggable sources and destinations. Extract client initialization logic into dedicated CLI setup module for cleaner separation of concerns. Update README documentation to reflect new CLI structure and available commands. Add comprehensive tests for adapter validation and discovery functionality. Maintain backward compatibility for existing sync command usage.
This commit is contained in:
27
README.md
27
README.md
@@ -1,6 +1,6 @@
|
||||
# Banks2FF
|
||||
|
||||
A robust command-line tool to synchronize bank transactions from GoCardless (formerly Nordigen) to Firefly III.
|
||||
A robust command-line tool to synchronize bank transactions between various sources and destinations. Currently supports GoCardless (formerly Nordigen) to Firefly III, with extensible architecture for additional sources and destinations.
|
||||
|
||||
## ✨ Key Benefits
|
||||
|
||||
@@ -31,15 +31,33 @@ A robust command-line tool to synchronize bank transactions from GoCardless (for
|
||||
### Usage
|
||||
```bash
|
||||
# Sync all accounts (automatic date range)
|
||||
cargo run -p banks2ff
|
||||
cargo run -p banks2ff -- sync gocardless firefly
|
||||
|
||||
# Preview changes without saving
|
||||
cargo run -p banks2ff -- --dry-run
|
||||
cargo run -p banks2ff -- --dry-run sync gocardless firefly
|
||||
|
||||
# Sync specific date range
|
||||
cargo run -p banks2ff -- --start 2023-01-01 --end 2023-01-31
|
||||
cargo run -p banks2ff -- sync gocardless firefly --start 2023-01-01 --end 2023-01-31
|
||||
|
||||
# List available sources and destinations
|
||||
cargo run -p banks2ff -- sources
|
||||
cargo run -p banks2ff -- destinations
|
||||
|
||||
# Additional inspection commands available in future releases
|
||||
```
|
||||
|
||||
## 🖥️ CLI Structure
|
||||
|
||||
Banks2FF uses a structured command-line interface with the following commands:
|
||||
|
||||
- `sync <SOURCE> <DESTINATION>` - Synchronize transactions between source and destination
|
||||
- `sources` - List all available source types
|
||||
- `destinations` - List all available destination types
|
||||
|
||||
Additional inspection commands (accounts, transactions, status) will be available in future releases.
|
||||
|
||||
Use `cargo run -p banks2ff -- --help` for detailed command information.
|
||||
|
||||
## 📋 What It Does
|
||||
|
||||
Banks2FF automatically:
|
||||
@@ -62,6 +80,7 @@ The cache requires `BANKS2FF_CACHE_KEY` to be set in your `.env` file for secure
|
||||
|
||||
## 🔧 Troubleshooting
|
||||
|
||||
- **Unknown source/destination?** Use `sources` and `destinations` commands to see what's available
|
||||
- **Account not syncing?** Check that the IBAN matches between GoCardless and Firefly III
|
||||
- **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