kontist-cli
v0.0.0
Published
command line interface tool for kontist banking
Maintainers
Readme
Project is work in progress.
Command Line Interface (CLI) Tool for using the Kontist API which under the hood relies on their marvelous GraphQL API [Kontist Javascript SDK](https://kontist.dev/sdk/ #using-the-sdk)
Overview
- login and use multiple account(s)
- show status & current balance
- list & filter transaction(s)
- subscribe to incoming transactions
- create transfer
- list, show, block, unblock card(s)
See list of "ideas" for upcoming features …
Install
npm install kontist-cliNPX
npx kontist-cliSetup
Obtain valid client id for authentication. Request your client id in the API Client Management on https://kontist.dev/client-management/.
Create Access- & Refresh Token (valid for 1year) and store in system user preferences (using nconf package):
kontist-cli login <oauth-client-id> <username>You’ll be promted for the password. There’s also the ability to setup multiple accounts.
Examples
The command-line-tool does not include any table formater or filtering mechanism as there are other nice tools for that like table-printer-cli for formatting JSON output to a nice-looking table and jq for transforming and filtering JSON.
Transactions
Both tools in combination can be used to create a nice-looking, customizable list of transactions:
kontist-cli transactions | jq -c 'map({bookingDate,valutaDate,amount,name,iban})' | npx table-printer-cli -sList transactions between two dates:
kontist-cli transactions --from 2022-02-01 --to 2022-02-28Transfer
Create a standing order that repeats every month
kontist-cli transfer 3000 GB33BUKB20201555555555 "Hulk Hogan" "Wrestling Club Membership fee" \
--note "created after entering the wrestling club" \
--repeat MONTHLY \
--last 2022-12-31Wait until you receive the confirmation code and enter it when prompted. You’ll also get a confirmation before the transaction is made.
Locale
Some commands rely on the systems LC_ALL, LC_TIME, or LC_NUMERIC variables to format monetary values or provide additional formatted dates. The balance sub-command:
$ LC_ALL=de-de kontist-cli balance
50,20 €Output
All comands print out JSON to make it easy to filter and process the output using jq and other tools like [ctp(table-printer-cli)
Ideas
- [x] balance (
kontist-cli balance, returnsavailableBalance)- [x] get current balance
- [ ] different output when availableBalance doesn’t match balance
- [ ] add notification when card fraud is on
- [x] option to permanently set different LC_ALL
- [x] status command returns current overall status (
kontist-cli account) - [x] validate IBAN (checksum)
- [x] prevent invalid characters in purpose, e2eid
- [ ] add multiple output formats
- [ ]
--prettyas table - [ ]
--jsonas json (default) - [ ]
--plainas tsv (easy for additional processing withxargs)
- [ ]
- [x] multi-account
- [x] add account (name defaults to "default")
kontist-cli account login --account myalias <client-id> <username> - [x] add account with named alias
kontist-cli account login --name myAlias <client-id> <username> - [x] list accounts
kontist-cli accounts list - [x] remove account with alias
kontist-cli account delete <alias> - [x] use specific account
kontist-cli transfer create --account accountName <iban> <recipient> <amount>
- [x] add account (name defaults to "default")
- [ ] cards
- [x] list
kontist-cli cards list- [ ] including card settings
- [ ] including card limits
- [x] get specific card
kontist-cli cards <id> - [x] block
kontist-cli cards block <id>(changeCardStatus) - [x] unblock
kontist-cli cards unblock <id>(changeCardStatus) - [ ] replace
kontist-cli cards replace <id>(replaceCard) - [ ] reorder
kontist-cli cards reorder <id>(reorderCard) - [ ] update card settings / limits
- [x] list
- [ ] invoice
- [ ] list
- [ ] update invoice
- [ ] add product
- [ ] remove product
- [ ] create invoice
- [ ] delete invoice
- [x] money format?
- [x] currency?
- [ ] transfers
- [ ] make it easier to repeat transactions
- [ ] proposal: re-use transactions by id
- [ ] proposal: auto-completion for
kontist-cli transferarguments - [ ] proposal: address-book like presets?
- [x] list
- [ ] cancel (mutation
cancelTransfer&confirmCancelTransfer)kontist-cli transfer cancel <id> - [x] create
- [x] enable IBAN with spacing
- [x] convert umlauts to eu, ß to ss
- [x] normal order
kontist-cli transfer create [amount] [iban] [recipient] [purpose] \ --executeAt <executionDate> - [x] confirmation mfa
- [x] timed order
kontist-cli transfer create [amount] [iban] [recipient] [purpose] \ --at <executionDate> - [x] standing order with additional StandingOrderReoccurenceType
kontist-cli transfer create [amount] [iban] [recipient] [purpose] \ --executeAt <executionDate>` \ --last <optionalDate> \ --repeat <reoccurenceType>;
- [ ] update
- [ ] make it easier to repeat transactions
- [ ] transactions
- [x] list
- [x] limit transactions
- [x] search transactions
- [ ] paginate transactions
- [ ] filter transactions
- [x] by iban(s)
- [x] short filter for incoming / outgoing
kontist-cli transactions list --outgoing kontist-cli transactions list --incoming - [x] by date-range
kontist-cli transactions list --from 2021-01-01 --to 2021-02-32 - [ ] by date-range names
kontist-cli transactions list this-month; kontist-cli transactions list last-month; kontist-cli transactions list this-year; kontist-cli transactions list today; kontist-cli transactions list yesterday;
- [x] listen for new transactions (https://kontist.dev/sdk/#subscribe-to-new-transactions)
- [x] list
- [ ] cli auto-completion
- [ ] cli tui interface
- [ ] list transactions
- [ ] show details of transaction
- [ ] new transaction
- [ ] maintenance tasks
- [ ] publish on NPM
- [x] use version from package.json
- [ ] setup semantic release
- [ ] setup discussions
