Skip to main content
BankScrap provides a command-line interface to interact with your bank accounts directly from the terminal. All commands follow the pattern bankscrap [command] [bank] [options].

Available Commands

balance

Retrieve account balance information for all your accounts.
bankscrap balance BBVA --credentials user:12345678 password:my_password
Terminal Output:
Account: Main Account (ES7921000813610123456789)
Balance: €2,450.00
Available: €2,400.00

Account: Savings Account (ES1234567890123456789012)
Balance: €10,523.45
The “Available” balance is only shown when it differs from the regular balance, indicating pending transactions or holds.

transactions

Fetch transaction history for an account.
bankscrap transactions BBVA --credentials user:12345678 password:my_password
Terminal Output:
Transactions for: Main Account (ES7921000813610123456789)

DATE         DESCRIPTION                                           AMOUNT         BALANCE
---------------------------------------------------------------------------------------------------
15/01/2024   Salary Deposit - Company ABC                       €2,500.00      €5,450.00
14/01/2024   Grocery Store - Downtown                             €-85.50      €2,950.00
13/01/2024   ATM Withdrawal                                      €-100.00      €3,035.50
12/01/2024   Electric Company - Monthly Bill                      €-65.30      €3,135.50
Positive amounts are displayed in green, negative amounts in red when viewing in a color-enabled terminal.
Options:
  • --from - Start date in format DD-MM-YYYY
  • --to - End date in format DD-MM-YYYY
  • --iban - Filter transactions for a specific account
The --from date must be earlier than the --to date. Dates must use the format DD-MM-YYYY (e.g., 31-12-2024).

cards

Retrieve information about your credit and debit cards.
bankscrap cards BBVA --credentials user:12345678 password:my_password
Terminal Output:
Card: VISA Gold Premium Card €-245.50
Card: Mastercard Debit Personal Account €0.00

loans

Fetch information about your active loans.
bankscrap loans BBVA --credentials user:12345678 password:my_password
Terminal Output:
Loan: Home Mortgage Loan #123456 €-150,000.00
Loan: Car Loan Personal Vehicle €-12,500.00

generate_adapter

Generate a template for creating a new bank adapter.
bankscrap generate_adapter MyBankName
This command scaffolds the necessary files and structure to build support for a new bank. See the Building Adapters guide for more information.

Global Options

These options are available for all commands:

—credentials

Provide authentication credentials as key-value pairs.
bankscrap balance BBVA --credentials user:12345678 password:my_password
The required credential fields vary by bank. Check your bank adapter’s documentation for specific requirements.

—iban

Filter operations to a specific account by IBAN.
bankscrap transactions BBVA \
  --credentials user:12345678 password:my_password \
  --iban ES7921000813610123456789

—format

Export data in a specific format. Supported formats: csv, json.
bankscrap balance BBVA \
  --credentials user:12345678 password:my_password \
  --format csv

—output

Specify the output file path for exports. Use - for stdout.
bankscrap transactions BBVA \
  --credentials user:12345678 password:my_password \
  --format json \
  --output ~/Downloads/transactions.json

—log

Enable logging output.
bankscrap balance BBVA \
  --credentials user:12345678 password:my_password \
  --log

—debug

Enable debug mode with verbose output.
bankscrap balance BBVA \
  --credentials user:12345678 password:my_password \
  --debug
Debug mode may output sensitive information including credentials. Only use in development environments.

Command Workflow

1

Authenticate with bank

BankScrap connects to your bank using the provided credentials
2

Fetch requested data

The command retrieves accounts, transactions, cards, or loans from the bank’s API
3

Display or export

Data is either displayed in the terminal with formatted output or exported to a file

Error Handling

Invalid Bank Name

$ bankscrap balance InvalidBank --credentials user:123 password:pass
Invalid bank name.
Make sure the bank adapter is installed: gem install bankscrap-bbva

Invalid Date Format

$ bankscrap transactions BBVA --credentials user:123 password:pass --from 2024-01-01
Invalid date format. Correct format d-m-Y (eg: 31-12-2016)

Date Range Error

$ bankscrap transactions BBVA --credentials user:123 password:pass --from 31-12-2024 --to 01-01-2024
From date must be lower than to date

Unsupported Export Format

$ bankscrap balance BBVA --credentials user:123 password:pass --format xml
Sorry, file format not supported.

Build docs developers (and LLMs) love