npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

kontist-cli

v0.0.0

Published

command line interface tool for kontist banking

Downloads

5

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-cli

NPX

npx kontist-cli

Setup

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 -s

List transactions between two dates:

kontist-cli transactions --from 2022-02-01 --to 2022-02-28

Transfer

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-31

Wait 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, returns availableBalance)
    • [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
    • [ ] --pretty as table
    • [ ] --json as json (default)
    • [ ] --plain as tsv (easy for additional processing with xargs)
  • [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>
  • [ ] 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
  • [ ] 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 transfer arguments
      • [ ] 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
  • [ ] 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)
  • [ ] 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

Other Projects / Bookmarks